Class RgbPixelImpl

  • All Implemented Interfaces:
    RgbPixel


    public class RgbPixelImpl
    extends java.lang.Object
    implements RgbPixel
    The Class RgbPixelImpl.
    Author:
    steiner
    • Constructor Detail

      • RgbPixelImpl

        public RgbPixelImpl​()
        Instantiates a new rgb pixel impl.
      • RgbPixelImpl

        public RgbPixelImpl​(int aAlphaPortion,
                            int aRedPortion,
                            int aGreenPortion,
                            int aBluePortion)
        Instantiates a new rgb pixel impl.
        Parameters:
        aAlphaPortion - the alpha portion
        aRedPortion - the red portion
        aGreenPortion - the green portion
        aBluePortion - the blue portion
      • RgbPixelImpl

        public RgbPixelImpl​(int aRgbValue)
        Instantiates a new rgb pixel impl.
        Parameters:
        aRgbValue - the rgb value
    • Method Detail

      • getAlphaPortion

        public int getAlphaPortion​()
        Gets the alpha portion.
        Specified by:
        getAlphaPortion in interface RgbPixel
        Returns:
        the alpha portion
      • getRedPortion

        public int getRedPortion​()
        Gets the red portion.
        Specified by:
        getRedPortion in interface RgbPixel
        Returns:
        the red portion
      • getGreenPortion

        public int getGreenPortion​()
        Gets the green portion.
        Specified by:
        getGreenPortion in interface RgbPixel
        Returns:
        the green portion
      • getBluePortion

        public int getBluePortion​()
        Gets the blue portion.
        Specified by:
        getBluePortion in interface RgbPixel
        Returns:
        the blue portion
      • toRgbValue

        public int toRgbValue​()
        To rgb value.
        Specified by:
        toRgbValue in interface RgbPixel
        Returns:
        the int
      • setRgbValue

        public void setRgbValue​(int aRgbValue)
        Sets the rgb value.
        Specified by:
        setRgbValue in interface RgbPixel
        Parameters:
        aRgbValue - the new rgb value
      • setAlphaPortion

        public void setAlphaPortion​(int aAlphaPortion)
        Sets the alpha portion.
        Specified by:
        setAlphaPortion in interface RgbPixel
        Parameters:
        aAlphaPortion - the new alpha portion
      • setRedPortion

        public void setRedPortion​(int aRedPortion)
        Sets the red portion.
        Specified by:
        setRedPortion in interface RgbPixel
        Parameters:
        aRedPortion - the new red portion
      • setGreenPortion

        public void setGreenPortion​(int aGreenPortion)
        Sets the green portion.
        Specified by:
        setGreenPortion in interface RgbPixel
        Parameters:
        aGreenPortion - the new green portion
      • setBluePortion

        public void setBluePortion​(int aBluePortion)
        Sets the blue portion.
        Specified by:
        setBluePortion in interface RgbPixel
        Parameters:
        aBluePortion - the new blue portion