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

Detailed Description

A colour defined as Red, Green, Blue and Alpha

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

Public Member Functions

 TSLRGBA ()
 
 TSLRGBA (const TSLRGBA &other)
 Copy Constructor.
 
TSLRGBAoperator= (const TSLRGBA &other)
 Assignment Operator.
 
bool operator== (const TSLRGBA &rhs) const
 Equality Operator.
 
bool operator!= (const TSLRGBA &rhs) const
 Inequality Operator.
 
 TSLRGBA (unsigned char r, unsigned char g, unsigned char b, unsigned char a=0x00)
 
int composeRGB ()
 
bool decomposeRGB (int colour)
 

Public Attributes

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

Constructor & Destructor Documentation

◆ TSLRGBA() [1/3]

TSLRGBA::TSLRGBA ( )
inline

Constructor All colour components will be initialised to 0x00

◆ TSLRGBA() [2/3]

TSLRGBA::TSLRGBA ( const TSLRGBA & other)
inline

Copy Constructor.

◆ TSLRGBA() [3/3]

TSLRGBA::TSLRGBA ( unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a = 0x00 )
inline

Constructor

Parameters
rRed
gGreen
bBlue
aAlpha

Member Function Documentation

◆ composeRGB()

int TSLRGBA::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 TSLRGBA::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.

Alpha (m_a) will be set to 0xff

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

◆ operator!=()

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

Inequality Operator.

◆ operator=()

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

Assignment Operator.

◆ operator==()

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

Equality Operator.

Member Data Documentation

◆ m_a

unsigned char TSLRGBA::m_a

Alpha.

◆ m_b

unsigned char TSLRGBA::m_b

Blue.

◆ m_g

unsigned char TSLRGBA::m_g

Green.

◆ m_r

unsigned char TSLRGBA::m_r

Red.