CartoType .NET API 7.8.2, 2022-03-25
for development in C#, Visual Basic and other .NET languages
|
A color> More...
#include <CartoTypeWrapper.h>
Public Member Functions | |
Color (int aValue) | |
Creates a color from an integer value. | |
Color (int aRed, int aGreen, int aBlue) | |
Creates a color from red, green, and blue values. | |
Color (int aRed, int aGreen, int aBlue, int aAlpha) | |
Creates a color from red, green, blue and alpha values. | |
Color (String^ aColor) | |
Creates a color from a string. For the format of the string see the documentation on CartoType style sheets. | |
int | Red () |
Returns the red component as a value in the range 0...255. | |
int | Green () |
Returns the green component as a value in the range 0...255. | |
int | Blue () |
Returns the blue component as a value in the range 0...255. | |
int | Gray () |
Returns the gray level (average of red, green and blue levels) as a value in the range 0...255. | |
int | Alpha () |
Returns the alpha (transparency) level as a value in the range 0...255: 0 = transparent, 255 = opaque. | |
bool | IsNull () |
Returns true if the colour is null. | |
void | SetAlpha (int aAlpha) |
Sets the alpha (transparency) level to a value in the range 0...255: 0 = transparent, 255 = opaque. | |
Public Attributes | |
int | m_value |
The color value as a 32-bit integer. | |
Static Public Attributes | |
static const Color | KBlack = Color(0xFF000000) |
Opaque black. | |
static const Color | KDarkGray = Color(0xFF555555) |
Opaque dark gray. | |
static const Color | KDarkRed = Color(0xFF000080) |
Opaque dark red. | |
static const Color | KDarkGreen = Color(0xFF008000) |
Opaque dark green. | |
static const Color | KDarkYellow = Color(0xFF008080) |
Opaque dark yellow. | |
static const Color | KDarkBlue = Color(0xFF800000) |
Opaque dark blue. | |
static const Color | KDarkMagenta = Color(0xFF800080) |
Opaque dark magenta. | |
static const Color | KDarkCyan = Color(0xFF808000) |
Opaque dark cyan. | |
static const Color | KRed = Color(0xFF0000FF) |
Opaque red. | |
static const Color | KGreen = Color(0xFF00FF00) |
Opaque green. | |
static const Color | KYellow = Color(0xFF00FFFF) |
Opaque yellow. | |
static const Color | KBlue = Color(0xFFFF0000) |
Opaque blue. | |
static const Color | KMagenta = Color(0xFFFF00FF) |
Opaque magenta. | |
static const Color | KCyan = Color(0xFFFFFF00) |
Opaque cyan. | |
static const Color | KGray = Color(0xFFAAAAAA) |
Opaque gray. | |
static const Color | KWhite = Color(0xFFFFFFFF) |
Opaque white. | |
static const Color | KTransparentBlack = Color(0x00000000) |
The 'null color' transparent black. | |
A color>
Colors are represented by 32-bit integers containing 8 bits each of red, green, blue and alpha channel (transparency) data.