Helper class for Color.
More...
#include <ColorHelper.hpp>
|
| static RlColor | colorFromNormalized (const Vector4f &normalizedColor) |
| | Returns RlColor from normalized values [0..1]. More...
|
| |
| static Vector3f | colorToHSV (const RlColor &color) |
| | Returns HSV values for a Color, hue [0..360], saturation/value [0..1]. More...
|
| |
| static RlColor | colorFromHSV (float hue, float saturation, float value) |
| | Returns a RlColor from HSV values, hue [0..360], saturation/value [0..1]. More...
|
| |
| static RlColor | colorAlpha (const RlColor &color, float alpha) |
| | Returns color with alpha applied, alpha goes from 0.0f to 1.0f. More...
|
| |
| static RlColor | colorAlphaBlend (const RlColor &dst, const RlColor &src, const RlColor &tint) |
| | Returns src alpha-blended into dst color with tint. More...
|
| |
| static RlColor | getColor (unsigned int hexValue) |
| | Get RlColor structure from hexadecimal value. More...
|
| |
| static RlColor | getPixelColor (void *srcPtr, int format) |
| | Get RlColor from a source pixel pointer of certain format. More...
|
| |
| static void | setPixelColor (void *dstPtr, const RlColor &color, int format) |
| | Set color formatted into destination pixel pointer. More...
|
| |
| static int | getPixelDataSize (int width, int height, int format) |
| | Get pixel data size in bytes for certain format. More...
|
| |
◆ colorAlpha()
Returns color with alpha applied, alpha goes from 0.0f to 1.0f.
- Parameters
-
| color | to apply alpha to |
| alpha | to apply |
- Returns
- the color with alpha applied
◆ colorAlphaBlend()
Returns src alpha-blended into dst color with tint.
- Parameters
-
| dst | to blend into |
| src | to blend |
| tint | to blend with |
- Returns
- the src alpha-blended into dst color with tint
◆ colorFromHSV()
| raylib::RlColor raylib::helper::ColorHelper::colorFromHSV |
( |
float |
hue, |
|
|
float |
saturation, |
|
|
float |
value |
|
) |
| |
|
static |
Returns a RlColor from HSV values, hue [0..360], saturation/value [0..1].
- Parameters
-
| hue | to convert |
| saturation | to convert |
| value | to convert |
- Returns
- the RlColor from HSV values
◆ colorFromNormalized()
Returns RlColor from normalized values [0..1].
- Parameters
-
| normalizedColor | to convert |
- Returns
- the RlColor from normalized values
- See also
- RlColor(Vector4f)
◆ colorToHSV()
Returns HSV values for a Color, hue [0..360], saturation/value [0..1].
- Parameters
-
- Returns
- the HSV values for a Color
◆ getColor()
| raylib::RlColor raylib::helper::ColorHelper::getColor |
( |
unsigned int |
hexValue | ) |
|
|
static |
Get RlColor structure from hexadecimal value.
- Parameters
-
- Returns
- the RlColor structure from hexadecimal value
- See also
- RlColor(std::uint32_t)
◆ getPixelColor()
| raylib::RlColor raylib::helper::ColorHelper::getPixelColor |
( |
void * |
srcPtr, |
|
|
int |
format |
|
) |
| |
|
static |
Get RlColor from a source pixel pointer of certain format.
- Parameters
-
| srcPtr | to convert |
| format | to convert |
- Returns
- the RlColor from a source pixel pointer of certain format
- Deprecated:
- don't use this
◆ getPixelDataSize()
| int raylib::helper::ColorHelper::getPixelDataSize |
( |
int |
width, |
|
|
int |
height, |
|
|
int |
format |
|
) |
| |
|
static |
Get pixel data size in bytes for certain format.
- Parameters
-
| width | to get |
| height | to get |
| format | to get |
- Returns
- the pixel data size in bytes for certain format
◆ setPixelColor()
| void raylib::helper::ColorHelper::setPixelColor |
( |
void * |
dstPtr, |
|
|
const RlColor & |
color, |
|
|
int |
format |
|
) |
| |
|
static |
Set color formatted into destination pixel pointer.
- Parameters
-
| dstPtr | to set |
| color | to set |
| format | to set |
- Deprecated:
- don't use this
The documentation for this class was generated from the following files: