Isle
|
LEGO color representation with 8-bit RGB channels. More...
#include <legocolor.h>
Public Member Functions | |
LegoColor () | |
Default constructor. More... | |
LegoU8 | GetRed () |
Get the red channel value. More... | |
void | SetRed (LegoU8 p_red) |
Set the red channel value. More... | |
LegoU8 | GetGreen () |
Get the green channel value. More... | |
void | SetGreen (LegoU8 p_green) |
Set the green channel value. More... | |
LegoU8 | GetBlue () |
Get the blue channel value. More... | |
void | SetBlue (LegoU8 p_blue) |
Set the blue channel value. More... | |
LegoResult | Read (LegoStorage *p_storage) |
Read the color from a storage object in the order red, green, blue (each as a byte). More... | |
Protected Attributes | |
LegoU8 | m_red |
Red color component (0x00 offset). [AI]. More... | |
LegoU8 | m_green |
Green color component (0x01 offset). [AI]. More... | |
LegoU8 | m_blue |
Blue color component (0x02 offset). [AI]. More... | |
LEGO color representation with 8-bit RGB channels.
[AI]
This class encapsulates a 24-bit RGB color using three 8-bit unsigned integers for red, green, and blue components, as used for LEGO elements and rendering. It provides accessors, mutators, and reading from serialized storage. [AI]
Definition at line 10 of file legocolor.h.
|
inline |
Default constructor.
[AI]
Initializes all RGB channels to zero (black color). [AI]
Definition at line 14 of file legocolor.h.
|
inline |
Get the blue channel value.
[AI]
Definition at line 34 of file legocolor.h.
|
inline |
Get the green channel value.
[AI]
Definition at line 26 of file legocolor.h.
|
inline |
Get the red channel value.
[AI]
Definition at line 18 of file legocolor.h.
LegoResult LegoColor::Read | ( | LegoStorage * | p_storage | ) |
Read the color from a storage object in the order red, green, blue (each as a byte).
[AI]
Reads three bytes from the provided LegoStorage: red, green, and blue, setting this color's components accordingly. Returns the result status of the storage read operation. [AI]
p_storage | Storage instance to read color data from. [AI] |
Definition at line 9 of file legocolor.cpp.
|
inline |
Set the blue channel value.
[AI]
p_blue | New value for the blue component (0-255). [AI] |
Definition at line 38 of file legocolor.h.
|
inline |
Set the green channel value.
[AI]
p_green | New value for the green component (0-255). [AI] |
Definition at line 30 of file legocolor.h.
|
inline |
Set the red channel value.
[AI]
p_red | New value for the red component (0-255). [AI] |
Definition at line 22 of file legocolor.h.
|
protected |
Blue color component (0x02 offset). [AI].
Definition at line 49 of file legocolor.h.
|
protected |
Green color component (0x01 offset). [AI].
Definition at line 48 of file legocolor.h.
|
protected |
Red color component (0x00 offset). [AI].
Definition at line 47 of file legocolor.h.