|
GrooveStomp's 3D Software Renderer
0.1.0
|

Go to the source code of this file.
Classes | |
| struct | color |
| RGBA color quad. More... | |
Macros | |
| #define | COLOR_VERSION "0.1.0" |
| include guard | |
Functions | |
| struct color | ColorInitFloat (float r, float g, float b, float a) |
| Initialize a new color with individual R, G, B, A components as floats. More... | |
| unsigned int | ColorGetInt (struct color color, char component) |
| Get the color component. More... | |
| float | ColorGetFloat (struct color color, char component) |
| Get the color component. More... | |
| void | ColorSetInt (struct color *color, char component, unsigned int value) |
| Set the color component. More... | |
| void | ColorSetFloat (struct color *color, char component, float value) |
| Set the color component. More... | |
Variables | |
| struct color | ColorWhite |
| struct color | ColorBlack |
| struct color | ColorRed |
| struct color | ColorGreen |
| struct color | ColorBlue |
| struct color | ColorPurple |
| struct color | ColorYellow |
| struct color | ColorCyan |
| struct color | ColorPink |
This interface attempts to provide an intuitive wrapper around "raw" unsigned integer colors.
An unsigned integer color is packed 32-bit value consisting of 4 pixel elements: RGBA. These elements are stored as written: RGBA, or, visually mapped as hex symbols: RRGGBBAA.
| float ColorGetFloat | ( | struct color | color, |
| char | component | ||
| ) |
Get the color component.
The component is returned as a float in the range [0.0,1.0]
| color | color object to read |
| component | 'r', 'g', 'b' or 'a' exclusively. |
| unsigned int ColorGetInt | ( | struct color | color, |
| char | component | ||
| ) |
Get the color component.
The component is returned as the raw integer value, in the range [0,255]
| color | color object to read |
| component | 'r', 'g', 'b' or 'a' exclusively. |
| struct color ColorInitFloat | ( | float | r, |
| float | g, | ||
| float | b, | ||
| float | a | ||
| ) |
Initialize a new color with individual R, G, B, A components as floats.
| r | Red component from 0 to 1 |
| g | Green componenet from 0 to 1 |
| b | Blue component from 0 to 1 |
| a | Alpha component, from 0 to 1 |
| void ColorSetFloat | ( | struct color * | color, |
| char | component, | ||
| float | value | ||
| ) |
Set the color component.
The value should be a float in the range [0.0,1.0]
| color | pointer to the color object to write |
| component | 'r', 'g', 'b' or 'a' exclusively. |
| value | value of the color component to set |
| void ColorSetInt | ( | struct color * | color, |
| char | component, | ||
| unsigned int | value | ||
| ) |
Set the color component.
The value should be an integer in the range [0,255]
| color | pointer to the color object to write |
| component | 'r', 'g', 'b' or 'a' exclusively. |
| value | value of the color component to set |
1.8.13