Class that holds details of colours for the four corners of a rectangle. More...
Public Member Functions | |
| void | setAlpha (float alpha) |
| Set the alpha value to use for all four corners of the ColourRect. | |
| void | setTopAlpha (float alpha) |
| Set the alpha value to use for the top edge of the ColourRect. | |
| void | setBottomAlpha (float alpha) |
| Set the alpha value to use for the bottom edge of the ColourRect. | |
| void | setLeftAlpha (float alpha) |
| Set the alpha value to use for the left edge of the ColourRect. | |
| void | setRightAlpha (float alpha) |
| Set the alpha value to use for the right edge of the ColourRect. | |
| bool | isMonochromatic () |
| Determinate the ColourRect is monochromatic or variegated. | |
| ColourRect | getSubRectangle (float left, float right, float top, float bottom) |
| Gets a portion of this ColourRect as a subset ColourRect. | |
| Colour | getColourAtPoint (float x, float y) |
| Get the colour at a point in the rectangle. | |
| void | setColours (Colour col) |
| Set the colour of all four corners simultaneously. | |
| void | modulateAlpha (float alpha) |
| Module the alpha components of each corner's colour by a constant. | |
| void | modulateColours (ColourRect other) |
| Modulate all components of this colour rect with corresponding components from another colour rect. | |
Writable Variables | |
| Colour | top_left |
| Colour | top_right |
| Colour | bottom_left |
| Colour | bottom_right |
| ColourRect component colours. | |
Class that holds details of colours for the four corners of a rectangle.
| void GUI::ColourRect::setAlpha | ( | float | alpha | ) |
Set the alpha value to use for all four corners of the ColourRect.
| alpha | Alpha value to use. |
| void GUI::ColourRect::setTopAlpha | ( | float | alpha | ) |
Set the alpha value to use for the top edge of the ColourRect.
| alpha | Alpha value to use. |
| void GUI::ColourRect::setBottomAlpha | ( | float | alpha | ) |
Set the alpha value to use for the bottom edge of the ColourRect.
| alpha | Alpha value to use. |
| void GUI::ColourRect::setLeftAlpha | ( | float | alpha | ) |
Set the alpha value to use for the left edge of the ColourRect.
| alpha | Alpha value to use. |
| void GUI::ColourRect::setRightAlpha | ( | float | alpha | ) |
Set the alpha value to use for the right edge of the ColourRect.
| alpha | Alpha value to use. |
| bool GUI::ColourRect::isMonochromatic | ( | ) |
Determinate the ColourRect is monochromatic or variegated.
| ColourRect GUI::ColourRect::getSubRectangle | ( | float | left, |
| float | right, | ||
| float | top, | ||
| float | bottom | ||
| ) |
Gets a portion of this ColourRect as a subset ColourRect.
| left | The left side of this subrectangle (in the range of 0-1 float) |
| right | The right side of this subrectangle (in the range of 0-1 float) |
| top | The top side of this subrectangle (in the range of 0-1 float) |
| bottom | The bottom side of this subrectangle (in the range of 0-1 float) |
| Colour GUI::ColourRect::getColourAtPoint | ( | float | x, |
| float | y | ||
| ) |
Get the colour at a point in the rectangle.
| x | The x coordinate of the point |
| y | The y coordinate of the point |
| void GUI::ColourRect::setColours | ( | Colour | col | ) |
Set the colour of all four corners simultaneously.
| col | colour that is to be set for all four corners of the ColourRect; |
| void GUI::ColourRect::modulateAlpha | ( | float | alpha | ) |
Module the alpha components of each corner's colour by a constant.
| alpha | The constant factor to modulate all alpha colour components by. |
1.8.1.1