Package org.refcodes.graphical
Class RgbPixelImpl
- java.lang.Object
-
- org.refcodes.graphical.RgbPixelImpl
-
-
Constructor Summary
Constructors Constructor Description RgbPixelImpl()
Instantiates a new rgb pixel impl.RgbPixelImpl(int aRgbValue)
Instantiates a new rgb pixel impl.RgbPixelImpl(int aAlphaPortion, int aRedPortion, int aGreenPortion, int aBluePortion)
Instantiates a new rgb pixel impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAlphaPortion()
Gets the alpha portion.int
getBluePortion()
Gets the blue portion.int
getGreenPortion()
Gets the green portion.int
getRedPortion()
Gets the red portion.void
setAlphaPortion(int aAlphaPortion)
Sets the alpha portion.void
setBluePortion(int aBluePortion)
Sets the blue portion.void
setGreenPortion(int aGreenPortion)
Sets the green portion.void
setRedPortion(int aRedPortion)
Sets the red portion.void
setRgbValue(int aRgbValue)
Sets the rgb value.int
toRgbValue()
To rgb value.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.refcodes.graphical.RgbPixel
withAlphaPortion, withBluePortion, withGreenPortion, withRedPortion, withRgbValue
-
-
-
-
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 portionaRedPortion
- the red portionaGreenPortion
- the green portionaBluePortion
- 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 interfaceRgbPixel
- Returns:
- the alpha portion
-
getRedPortion
public int getRedPortion()
Gets the red portion.- Specified by:
getRedPortion
in interfaceRgbPixel
- Returns:
- the red portion
-
getGreenPortion
public int getGreenPortion()
Gets the green portion.- Specified by:
getGreenPortion
in interfaceRgbPixel
- Returns:
- the green portion
-
getBluePortion
public int getBluePortion()
Gets the blue portion.- Specified by:
getBluePortion
in interfaceRgbPixel
- Returns:
- the blue portion
-
toRgbValue
public int toRgbValue()
To rgb value.- Specified by:
toRgbValue
in interfaceRgbPixel
- Returns:
- the int
-
setRgbValue
public void setRgbValue(int aRgbValue)
Sets the rgb value.- Specified by:
setRgbValue
in interfaceRgbPixel
- Parameters:
aRgbValue
- the new rgb value
-
setAlphaPortion
public void setAlphaPortion(int aAlphaPortion)
Sets the alpha portion.- Specified by:
setAlphaPortion
in interfaceRgbPixel
- Parameters:
aAlphaPortion
- the new alpha portion
-
setRedPortion
public void setRedPortion(int aRedPortion)
Sets the red portion.- Specified by:
setRedPortion
in interfaceRgbPixel
- Parameters:
aRedPortion
- the new red portion
-
setGreenPortion
public void setGreenPortion(int aGreenPortion)
Sets the green portion.- Specified by:
setGreenPortion
in interfaceRgbPixel
- Parameters:
aGreenPortion
- the new green portion
-
setBluePortion
public void setBluePortion(int aBluePortion)
Sets the blue portion.- Specified by:
setBluePortion
in interfaceRgbPixel
- Parameters:
aBluePortion
- the new blue portion
-
-