citro2d
|
Functions | |
C2D_CONSTEXPR float | C2D_Clamp (float x, float min, float max) |
Clamps a value between bounds. More... | |
C2D_CONSTEXPR u8 | C2D_FloatToU8 (float x) |
Converts a float to u8. More... | |
C2D_CONSTEXPR u32 | C2D_Color32 (u8 r, u8 g, u8 b, u8 a) |
Builds a 32-bit RGBA color value. More... | |
C2D_CONSTEXPR u32 | C2D_Color32f (float r, float g, float b, float a) |
Builds a 32-bit RGBA color value from float values. More... | |
static void | C2D_SetImageTint (C2D_ImageTint *tint, C2D_Corner corner, u32 color, float blend) |
Configures one corner of an image tint structure. More... | |
static void | C2D_PlainImageTint (C2D_ImageTint *tint, u32 color, float blend) |
Configures an image tint structure with the specified tint parameters applied to all corners. More... | |
static void | C2D_AlphaImageTint (C2D_ImageTint *tint, float alpha) |
Configures an image tint structure to just apply transparency to the image. More... | |
static void | C2D_TopImageTint (C2D_ImageTint *tint, u32 color, float blend) |
Configures an image tint structure with the specified tint parameters applied to the top side (e.g. More... | |
static void | C2D_BottomImageTint (C2D_ImageTint *tint, u32 color, float blend) |
Configures an image tint structure with the specified tint parameters applied to the bottom side (e.g. More... | |
static void | C2D_LeftImageTint (C2D_ImageTint *tint, u32 color, float blend) |
Configures an image tint structure with the specified tint parameters applied to the left side (e.g. More... | |
static void | C2D_RightImageTint (C2D_ImageTint *tint, u32 color, float blend) |
Configures an image tint structure with the specified tint parameters applied to the right side (e.g. More... | |
|
inlinestatic |
Configures an image tint structure to just apply transparency to the image.
[in] | tint | Image tint structure |
[in] | alpha | Alpha transparency value to apply to the image |
|
inlinestatic |
Configures an image tint structure with the specified tint parameters applied to the bottom side (e.g.
for gradients)
[in] | tint | Image tint structure |
[in] | color | RGB tint color and Alpha transparency |
[in] | blend | Blending strength of the tint color (0.0~1.0) |
C2D_CONSTEXPR float C2D_Clamp | ( | float | x, |
float | min, | ||
float | max | ||
) |
Clamps a value between bounds.
[in] | x | The value to clamp |
[in] | min | The lower bound |
[in] | max | The upper bound |
C2D_CONSTEXPR u32 C2D_Color32 | ( | u8 | r, |
u8 | g, | ||
u8 | b, | ||
u8 | a | ||
) |
Builds a 32-bit RGBA color value.
[in] | r | Red component (0~255) |
[in] | g | Green component (0~255) |
[in] | b | Blue component (0~255) |
[in] | a | Alpha component (0~255) |
C2D_CONSTEXPR u32 C2D_Color32f | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
Builds a 32-bit RGBA color value from float values.
[in] | r | Red component (0.0~1.0) |
[in] | g | Green component (0.0~1.0) |
[in] | b | Blue component (0.0~1.0) |
[in] | a | Alpha component (0.0~1.0) |
C2D_CONSTEXPR u8 C2D_FloatToU8 | ( | float | x | ) |
Converts a float to u8.
[in] | x | Input value (0.0~1.0) |
|
inlinestatic |
Configures an image tint structure with the specified tint parameters applied to the left side (e.g.
for gradients)
[in] | tint | Image tint structure |
[in] | color | RGB tint color and Alpha transparency |
[in] | blend | Blending strength of the tint color (0.0~1.0) |
|
inlinestatic |
Configures an image tint structure with the specified tint parameters applied to all corners.
[in] | tint | Image tint structure |
[in] | color | RGB tint color and Alpha transparency |
[in] | blend | Blending strength of the tint color (0.0~1.0) |
|
inlinestatic |
Configures an image tint structure with the specified tint parameters applied to the right side (e.g.
for gradients)
[in] | tint | Image tint structure |
[in] | color | RGB tint color and Alpha transparency |
[in] | blend | Blending strength of the tint color (0.0~1.0) |
|
inlinestatic |
Configures one corner of an image tint structure.
[in] | tint | Image tint structure |
[in] | corner | The corner of the image to tint |
[in] | color | RGB tint color and Alpha transparency |
[in] | blend | Blending strength of the tint color (0.0~1.0) |
|
inlinestatic |
Configures an image tint structure with the specified tint parameters applied to the top side (e.g.
for gradients)
[in] | tint | Image tint structure |
[in] | color | RGB tint color and Alpha transparency |
[in] | blend | Blending strength of the tint color (0.0~1.0) |