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 intgetAlphaPortion()Gets the alpha portion.intgetBluePortion()Gets the blue portion.intgetGreenPortion()Gets the green portion.intgetRedPortion()Gets the red portion.voidsetAlphaPortion(int aAlphaPortion)Sets the alpha portion.voidsetBluePortion(int aBluePortion)Sets the blue portion.voidsetGreenPortion(int aGreenPortion)Sets the green portion.voidsetRedPortion(int aRedPortion)Sets the red portion.voidsetRgbValue(int aRgbValue)Sets the rgb value.inttoRgbValue()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:
getAlphaPortionin interfaceRgbPixel- Returns:
- the alpha portion
-
getRedPortion
public int getRedPortion()
Gets the red portion.- Specified by:
getRedPortionin interfaceRgbPixel- Returns:
- the red portion
-
getGreenPortion
public int getGreenPortion()
Gets the green portion.- Specified by:
getGreenPortionin interfaceRgbPixel- Returns:
- the green portion
-
getBluePortion
public int getBluePortion()
Gets the blue portion.- Specified by:
getBluePortionin interfaceRgbPixel- Returns:
- the blue portion
-
toRgbValue
public int toRgbValue()
To rgb value.- Specified by:
toRgbValuein interfaceRgbPixel- Returns:
- the int
-
setRgbValue
public void setRgbValue(int aRgbValue)
Sets the rgb value.- Specified by:
setRgbValuein interfaceRgbPixel- Parameters:
aRgbValue- the new rgb value
-
setAlphaPortion
public void setAlphaPortion(int aAlphaPortion)
Sets the alpha portion.- Specified by:
setAlphaPortionin interfaceRgbPixel- Parameters:
aAlphaPortion- the new alpha portion
-
setRedPortion
public void setRedPortion(int aRedPortion)
Sets the red portion.- Specified by:
setRedPortionin interfaceRgbPixel- Parameters:
aRedPortion- the new red portion
-
setGreenPortion
public void setGreenPortion(int aGreenPortion)
Sets the green portion.- Specified by:
setGreenPortionin interfaceRgbPixel- Parameters:
aGreenPortion- the new green portion
-
setBluePortion
public void setBluePortion(int aBluePortion)
Sets the blue portion.- Specified by:
setBluePortionin interfaceRgbPixel- Parameters:
aBluePortion- the new blue portion
-
-