- All Known Subinterfaces:
RgbPixel
- All Known Implementing Classes:
RgbColorImpl
,RgbPixelImpl
public interface RgbColor
The Interface RgbPixel.
-
Method Summary
Modifier and Type Method Description int
getAlpha()
Gets the alpha portion.int
getBlue()
Gets the blue portion.int
getGreen()
Gets the green portion.int
getRed()
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.default Color
toColor()
Returns theColor
representation of this RGB pixel.int
toRgbValue()
To rgb value.default RgbColor
withAlphaPortion(int aAlphaPortion)
With alpha portion.default RgbColor
withBluePortion(int aBluePortion)
With blue portion.default RgbColor
withGreenPortion(int aGreenPortion)
With green portion.default RgbColor
withRedPortion(int aRedPortion)
With red portion.default RgbColor
withRgbValue(int aRgbValue)
With rgb value.
-
Method Details
-
getAlpha
int getAlpha()Gets the alpha portion.- Returns:
- the alpha portion
-
getRed
int getRed()Gets the red portion.- Returns:
- the red portion
-
getGreen
int getGreen()Gets the green portion.- Returns:
- the green portion
-
getBlue
int getBlue()Gets the blue portion.- Returns:
- the blue portion
-
toRgbValue
int toRgbValue()To rgb value.- Returns:
- the int
-
toColor
Returns theColor
representation of this RGB pixel. -
setAlphaPortion
void setAlphaPortion(int aAlphaPortion)Sets the alpha portion.- Parameters:
aAlphaPortion
- the new alpha portion
-
setRedPortion
void setRedPortion(int aRedPortion)Sets the red portion.- Parameters:
aRedPortion
- the new red portion
-
setGreenPortion
void setGreenPortion(int aGreenPortion)Sets the green portion.- Parameters:
aGreenPortion
- the new green portion
-
setBluePortion
void setBluePortion(int aBluePortion)Sets the blue portion.- Parameters:
aBluePortion
- the new blue portion
-
setRgbValue
void setRgbValue(int aRgbValue)Sets the rgb value.- Parameters:
aRgbValue
- the new rgb value
-
withAlphaPortion
With alpha portion.- Parameters:
aAlphaPortion
- the alpha portion- Returns:
- the rgb pixel
-
withRedPortion
With red portion.- Parameters:
aRedPortion
- the red portion- Returns:
- the rgb pixel
-
withGreenPortion
With green portion.- Parameters:
aGreenPortion
- the green portion- Returns:
- the rgb pixel
-
withBluePortion
With blue portion.- Parameters:
aBluePortion
- the blue portion- Returns:
- the rgb pixel
-
withRgbValue
With rgb value.- Parameters:
aRgbValue
- the rgb value- Returns:
- the rgb pixel
-