Defines an RGBA color (with alpha channel). More...
Inherits global.SystemIDisposable.
Public Member Functions | |
| Color (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| void | Dispose () |
| Color () | |
| Constructor. | |
| Color (uint theRGB, float theAlpha) | |
| Color (uint theRGB) | |
| Color (string theHexCode) | |
| Constructor. | |
| Color (int theR, int theG, int theB, int theAlpha) | |
| Constructor. | |
| Color (int theR, int theG, int theB) | |
| Color (float theR, float theG, float theB, float theAlpha) | |
| Constructor. | |
| Color (float theR, float theG, float theB) | |
| float | R () |
| float | G () |
| float | B () |
| float | A () |
| void | SetR (float theR) |
| void | SetG (float theG) |
| void | SetB (float theB) |
| void | SetA (float theA) |
| void | SetValue (int theIndex, float theValue) |
| Sets individual color components. | |
| void | SetValues (float theR, float theG, float theB, float theAlpha) |
| Sets color components. | |
| uint | ToRGB () |
| uint | ToRGBA () |
| bool | IsNull () |
| Returns true if color components were unset. | |
| bool | IsEqual (cadex.Materials.Color theOther, float theTolerance) |
| Returns true if two colors are equal with an accuracy of theTolerance. | |
| bool | IsEqual (cadex.Materials.Color theOther) |
| float | Access (uint theIndex) |
Static Public Member Functions | |
| static cadex.Materials.Color | FromRGB (uint theRGB) |
| static cadex.Materials.Color | FromRGBA (uint theRGBA) |
Protected Member Functions | |
| virtual void | Dispose (bool disposing) |
Defines an RGBA color (with alpha channel).
Components must be within a [0, 1] range.
|
inline |
Constructor.
Creates an uninitialized color. IsNull() will return true.
|
inline |
Constructor.
Creates a color from a hex code in RGB ("#FF0000") or RGBA ("#FF0000FF") formats.
|
inline |
Constructor.
Creates a color with explicit values. Each value must be within [0, 255] range.
|
inline |
Constructor.
Creates a color with explicit values. Each value must be within [0, 1] range.
|
inline |
Sets individual color components.
theIndex must be in the [0, 3] range.