MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLRGB Struct Reference

Detailed Description

A colour defined as Red, Green, and Blue

This struct may be converted to and from an int for use with drawing surface or data layer setFeatureRendering functions

Public Member Functions

 TSLRGB ()
 
 TSLRGB (const TSLRGB &other)
 Copy Constructor.
 
TSLRGBoperator= (const TSLRGB &other)
 Assignment Operator.
 
bool operator== (const TSLRGB &rhs) const
 Equality Operator.
 
bool operator!= (const TSLRGB &rhs) const
 Inequality Operator.
 
 TSLRGB (unsigned char r, unsigned char g, unsigned char b)
 
int composeRGB ()
 
bool decomposeRGB (int colour)
 

Public Attributes

unsigned char m_b
 Blue.
 
unsigned char m_g
 Green.
 
unsigned char m_r
 Red.
 

Constructor & Destructor Documentation

◆ TSLRGB() [1/3]

TSLRGB::TSLRGB ( )
inline

Constructor All colour components will be initialised to 0x00

◆ TSLRGB() [2/3]

TSLRGB::TSLRGB ( const TSLRGB & other)
inline

Copy Constructor.

◆ TSLRGB() [3/3]

TSLRGB::TSLRGB ( unsigned char r,
unsigned char g,
unsigned char b )
inline

Constructor

Parameters
rRed
gGreen
bBlue

Member Function Documentation

◆ composeRGB()

int TSLRGB::composeRGB ( )
inline

The equivalent of TSLComposeRGB

Composes the RGB values and returns them as an integer which can be passed to the setFeatureRendering methods on the drawing surface or data layers in place of a colour index.

Any alpha value will be ignored

Returns
The RGB values converted to an int

◆ decomposeRGB()

bool TSLRGB::decomposeRGB ( int colour)
inline

The equivalent of TSLDecomposeRGB

Given an RGB value as created by TSLComposeRGB or TSLRGBA::composeRGB, this method will set this object's RGB values.

Parameters
colourAn RGB value as created by composeRGB
Returns
false if colour is invalid, true otherwise.

◆ operator!=()

bool TSLRGB::operator!= ( const TSLRGB & rhs) const
inline

Inequality Operator.

◆ operator=()

TSLRGB & TSLRGB::operator= ( const TSLRGB & other)
inline

Assignment Operator.

◆ operator==()

bool TSLRGB::operator== ( const TSLRGB & rhs) const
inline

Equality Operator.

Member Data Documentation

◆ m_b

unsigned char TSLRGB::m_b

Blue.

◆ m_g

unsigned char TSLRGB::m_g

Green.

◆ m_r

unsigned char TSLRGB::m_r

Red.