#include <GDI.H>
Link against:
gdi.lib
class TRgb;
Description
24-bit RGB colour value with 8 bits each for red, green and blue.
All Graphics drawing functions are specified in terms of a 32-bit TRgb colour containing the three colour values plus 8 bits
for alpha channel. For hardware which does not support 24-bit colour, a mapping from TRgb to display colours is performed.
Generally, the convention for the alpha blending fact is 0 = transparent, 255 = opaque, unless otherwise stated. The exception
to this are the TRgb constructor taking a single value, where the top byte of the passed in parameter is used for alpha information
and the function TRgb::Value()const
, which returns alpha information in the top byte. In both these cases, 0 means opaque, 255 means transparent.
The supported display modes are enumerated in the TDisplayMode type. In each display mode a unique index can represent each
physical colours supported, and which can be mapped onto a full RGB value. The mappings are as follows:
16-colour displays use the EGA colour set: black, white, and then both light and dark versions of grey, red, green, blue,
cyan, magenta and yellow
256-colour displays support 216 colours made up of 6x6x6 RGB values, each containing all possible multiples of 51 for R,G,B
values. Additionally, all remaining 10 shades of pure red, green, blue and grey are represented, by adding all remaining multiples
of 17. This use of 256 colours is sometimes known as the Netscape colour cube.
4096-colour displays effectively support RGB values with 4 bits per primary colour
64k-colour displays effectively support RGB values with 5 bits allocated to red, 6 to green and 5 to blue
16 million-colour displays support true colour with 8 bits allocated to each primary colour
Members
Defined in TRgb
:
Alpha()const
Gets the alpha component.
Blue()const
Gets the blue component.
Color16()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Color16(TInt)
Gets TRgb from 4 bit colour index.
Color16M()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Color16M(TInt)
Gets TRgb from 16M colour index.
Color16MA()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Color16MA(TUint)
Gets TRgb from 16MA colour index. The function takes a 32 bit colour value with ...
Color16MAP()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Color16MAP(TUint)
Gets TRgb from 16MAP colour index. The function takes a 32 bit colour value with...
Color16MU()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Color16MU(TInt)
Gets TRgb from 16MU colour index. The function takes a 24 bit colour value with ...
Color256()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Color256(TInt)
Gets TRgb from 8 bit colour index.
Color4K()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Color4K(TInt)
Gets TRgb from 4K colour index.
Color64K()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Color64K(TInt)
Gets TRgb from 64K colour index.
Difference(const TRgb &)const
Gets the difference between two TRgbs.
ExternalizeL(RWriteStream &)const
Externalises a TRgb object to a stream.
Gray16()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Gray16(TInt)
Gets TRgb from 16 level grayscale.
Gray2()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Gray2(TInt)
Gets TRgb from 2 level grayscale.
Gray256()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Gray256(TInt)
Gets TRgb from 256 level grayscale.
Gray4()const
Gets the index of the closest TRgb value to this, based on the matching display ...
Gray4(TInt)
Gets TRgb from 4 level grayscale.
Green()const
Gets the green component.
Internal()const
Gets the 32-bit value of the TRgb as an integer.
InternalizeL(RReadStream &)
Internalises a TRgb object from a stream.
Red()const
Gets the red component.
SetAlpha(TInt)
Sets the alpha component.
SetBlue(TInt)
Sets the blue component.
SetGreen(TInt)
Sets the green component.
SetInternal(TUint32)
Sets the 32-bit value of the TRgb as a 32-bit integer.
SetRed(TInt)
Sets the red component.
TRgb()
Constructs a TRgb initialised to KRgbWhite.
TRgb(TInt,TInt,TInt)
Constructs a TRgb from its three component colours.
TRgb(TInt,TInt,TInt,TInt)
Constructs a TRgb from its three colour components and alpha component.
TRgb(TUint32)
Constructs a TRgb directly from a single 32-bit integer.
TRgb(TUint32,TInt)
Constructs a TRgb from a 32-bit integer (which corresponds to a colour) and from...
Value()const
Gets the 32-bit value of the TRgb as an integer. This function is deprecated. Us...
_Color16M()const
Gets the index of the closest TRgb value to this, based on the matching display ...
_Color16M(TInt)
Gets TRgb from 16M colour index.
_Color16MA()const
Gets the index of the closest TRgb value to this, based on the matching display ...
_Color16MA(TUint)
Gets TRgb from 16MA colour index. The function takes a 32 bit colour value with ...
_Color16MAP()const
Converts the TRgb to EColor16MAP (with color channels pre-multiplied with the al...
_Color16MAP(TUint)
Gets TRgb from 16MAP colour index. The function takes a 32 bit colour value with...
_Color16MU()const
Gets the index of the closest TRgb value to this, based on the matching display ...
_Color16MU(TInt)
Gets TRgb from 16MU colour index. The function takes a 24 bit colour value with ...
_Color4K()const
Gets the index of the closest TRgb value to this, based on the matching display ...
_Color4K(TInt)
Gets TRgb from 4K colour index.
_Color64K()const
Gets the index of the closest TRgb value to this, based on the matching display ...
_Color64K(TInt)
Gets TRgb from 64K colour index.
_Gray16()const
Gets the index of the closest TRgb value to this, based on the matching display ...
_Gray16(TInt)
Gets TRgb from 16 level grayscale.
_Gray2()const
Gets the index of the closest TRgb value to this, based on the matching display ...
_Gray2(TInt)
Gets TRgb from 2 level grayscale.
_Gray256()const
Gets the index of the closest TRgb value to this, based on the matching display ...
_Gray256(TInt)
Gets TRgb from 256 level grayscale.
_Gray4()const
Gets the index of the closest TRgb value to this, based on the matching display ...
_Gray4(TInt)
Gets TRgb from 4 level grayscale.
operator &(const TRgb &)
Bitwise logical AND operator.
operator &=(const TRgb &)
Logical AND assignment operator.
operator!=(const TRgb &)const
Compares this colour with the specified colour for inequality.
operator==(const TRgb &)const
Compares this colour with the specified colour for equality.
operator^(const TRgb &)
Bitwise EXCLUSIVE OR operator
operator^=(const TRgb &)
Logical EXCLUSIVE OR assignment operator.
operator|(const TRgb &)
Bitwise logical OR operator.
operator|=(const TRgb &)
Logical OR assignment operator.
operator~()const
Bitwise logical inversion operator.
See also:
Construction and destruction
inline TRgb();
Description
Constructs a TRgb initialised to KRgbWhite.
Interface status: |
deprecated |
|
inline TRgb(TUint32 aValue);
Description
Constructs a TRgb directly from a single 32-bit integer.
The integer is of the form 0xaabbggrr, where bb is the hex number of blue, gg is the hex number for green, and rr is the hex
number for red, aa is the hex number of alpha (0 means opaque, 255 means transparent).
For example, TRgb(2,4,8) using the 3 colour constructor is equal to TRgb(0x00080402) using this constructor.
The constructor is deprecated. Use others constructor or TRgb::SetInternal(TUint32)
instead.
Parameters
TUint32 aValue |
Integer representing colour value. Takes form 0x00bbggrr.
|
|
inline TRgb(TUint32 aInternalValue, TInt aAlpha);
Description
Constructs a TRgb from a 32-bit integer (which corresponds to a colour) and from an alpha value.
The first parameter is of the form 0x00rrggbb, where rr is the hex number for red, gg is the hex number for green, and bb
is the hex number of blue.
The second parameter corresponds to an alpha channel (0 means transparent, 255 means opaque).
For example, TRgb(2,4,8,255) using the 3 colour constructor is equal to TRgb(0x00020408, 255) using this constructor.
The constructor is a replacement for TRgb::TRgb(TUint32)
.
Parameters
TUint32 aInternalValue |
Integer representing a colour value, which takes the form 0x00rrggbb.
|
TInt aAlpha |
Alpha component of the colour (0 - 255).
|
|
inline TRgb(TInt aRed, TInt aGreen, TInt aBlue);
Description
Constructs a TRgb from its three component colours.
Each colour has a value between 0 and 255.
Parameters
TInt aRed |
Red component of the colour (0 - 255).
|
TInt aGreen |
Green component of the colour (0 - 255).
|
TInt aBlue |
Blue component of the colour (0 - 255).
|
|
TRgb(TInt,TInt,TInt,TInt)
inline TRgb(TInt aRed, TInt aGreen, TInt aBlue, TInt aAlpha);
Description
Constructs a TRgb from its three colour components and alpha component.
Each component has a value between 0 and 255. The fourth parameter corresponds to an alpha channel (0 means transparent, 255
means opaque).
Parameters
TInt aRed |
Red component of the colour (0 - 255).
|
TInt aGreen |
Green component of the colour (0 - 255).
|
TInt aBlue |
Blue component of the colour (0 - 255).
|
TInt aAlpha |
Alpha component of the colour (0 - 255).
|
|
inline TInt Red() const;
Description
Gets the red component.
Return value
TInt
|
The red component (0 - 255).
|
|
inline TInt Green() const;
Description
Gets the green component.
Return value
TInt
|
The green component (0 - 255).
|
|
inline TInt Blue() const;
Description
Gets the blue component.
Return value
TInt
|
The blue component (0 - 255).
|
|
inline TInt Alpha() const;
Description
Gets the alpha component.
Return value
TInt
|
The alpha component (0 - 255).
|
|
IMPORT_C void SetRed(TInt aRed);
Description
Sets the red component.
Parameters
TInt aRed |
Red component (0 - 255).
|
|
IMPORT_C void SetGreen(TInt aGreen);
Description
Sets the green component.
Parameters
TInt aGreen |
Green component (0 - 255).
|
|
IMPORT_C void SetBlue(TInt aBlue);
Description
Sets the blue component.
Parameters
TInt aBlue |
Blue component (0 - 255).
|
|
IMPORT_C void SetAlpha(TInt aAlpha);
Description
Sets the alpha component.
Parameters
TInt aAlpha |
Alpha component (0 - 255).
|
|
IMPORT_C static TRgb Gray2(TInt aGray2);
Description
Gets TRgb from 2 level grayscale.
The function takes a grayscale argument and return a TRgb whose red, green and blue values are set to an appropriate level.
Parameters
TInt aGray2 |
Grayscale value to be converted.
|
|
Return value
TRgb
|
Equivalent 24 bit colour. Gray2 has only 2 levels (black and white), the function returns r=g=b=0 or r=g=b=255.
|
|
IMPORT_C static TRgb Gray4(TInt aGray4);
Description
Gets TRgb from 4 level grayscale.
The function takes a grayscale argument and return a TRgb whose red, green and blue values are set to an appropriate level.
Parameters
TInt aGray4 |
Grayscale value to be converted.
|
|
Return value
TRgb
|
Equivalent 24 bit colour. Gray4 has 4 levels- the function returns r=g=b=85*c, where c=0,1,2, or 3.
|
|
IMPORT_C static TRgb Gray16(TInt aGray16);
Description
Gets TRgb from 16 level grayscale.
The function takes a grayscale argument and return a TRgb whose red, green and blue values are set to an appropriate level.
Parameters
TInt aGray16 |
Grayscale value to be converted.
|
|
Return value
TRgb
|
Equivalent 24 bit colour. Gray16 has 16 levels - the function returns r=g=b=17*c, where c=0, 1, ... 15.
|
|
IMPORT_C static TRgb Gray256(TInt aGray256);
Description
Gets TRgb from 256 level grayscale.
The function takes a grayscale argument and return a TRgb whose red, green and blue values are set to an appropriate level.
Parameters
TInt aGray256 |
Grayscale value to be converted.
|
|
Return value
TRgb
|
Equivalent 24 bit colour. Gray256 has 256 levels- the function returns r=g=b=c, where c=0, 1, ... 255.
|
|
IMPORT_C static TRgb Color16(TInt aColor16);
Description
Gets TRgb from 4 bit colour index.
The function takes a 4 bit index into a colour palette and returns a TRgb whose red, green and blue values are set to an appropriate
level.
Parameters
TInt aColor16 |
4 bit index into a colour palette
|
|
Return value
TRgb
|
Equivalent 24 bit colour.
|
|
IMPORT_C static TRgb Color256(TInt aColor256);
Description
Gets TRgb from 8 bit colour index.
The function takes an 8 bit index into a colour palette and returns a TRgb whose red, green and blue values are set to an
appropriate level.
Parameters
TInt aColor256 |
8 bit index into a colour palette.
|
|
Return value
TRgb
|
Equivalent 24 bit colour.
|
|
IMPORT_C static TRgb Color4K(TInt aColor4K);
Description
Gets TRgb from 4K colour index.
The function takes a 12 bit index into a colour palette and returns a TRgb whose red, green and blue values are set to an
appropriate level.
Parameters
TInt aColor4K |
12 bit index into a colour palette
|
|
Return value
TRgb
|
Equivalent 24 bit colour.
|
|
IMPORT_C static TRgb Color64K(TInt aColor64K);
Description
Gets TRgb from 64K colour index.
The function takes a 16 bit index into a colour palette and returns a TRgb whose red, green and blue values are set to an
appropriate level.
Parameters
TInt aColor64K |
16 bit index into a colour palette
|
|
Return value
TRgb
|
Equivalent 24 bit colour.
|
|
IMPORT_C static TRgb Color16M(TInt aColor16M);
Description
Gets TRgb from 16M colour index.
The function takes a 24 bit index into a colour palette and returns the TRgb whose red, green and blue values represent it
exactly.
Parameters
TInt aColor16M |
24 bit index into a colour palette
|
|
Return value
TRgb
|
The TRgb which represents the index exactly.
|
|
IMPORT_C TInt Gray2() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 1) representing the nearest TRgb.
|
|
IMPORT_C TInt Gray4() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 3) representing the nearest TRgb.
|
|
IMPORT_C TInt Gray16() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 15) representing the nearest TRgb.
|
|
IMPORT_C TInt Gray256() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 255) representing the nearest TRgb.
|
|
IMPORT_C TInt Color16() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 15) representing the nearest TRgb.
|
|
IMPORT_C TInt Color256() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 255) representing the nearest TRgb.
|
|
IMPORT_C TInt Color4K() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 4095) representing the nearest TRgb.
|
|
IMPORT_C TInt Color64K() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 65535) representing the nearest TRgb.
|
|
IMPORT_C TInt Color16M() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 16777215) representing the nearest TRgb.
|
|
operator==(const TRgb &)const
inline TBool operator==(const TRgb &aColor) const;
Description
Compares this colour with the specified colour for equality.
For two colours to be equal, their red, green and blue components must all be equal.
Parameters
const TRgb &aColor |
Colour to be compared.
|
|
Return value
TBool
|
ETrue. if the colours are equal; EFalse, otherwise.
|
|
operator!=(const TRgb &)const
inline TBool operator!=(const TRgb &aColor) const;
Description
Compares this colour with the specified colour for inequality.
Two colours are unequal if one at least one of their red, green and blue components are unequal.
Parameters
const TRgb &aColor |
Colour to be compared.
|
|
Return value
TBool
|
ETrue, if the colours are not equal; EFalse, otherwise.
|
|
inline TRgb operator~() const;
Description
Bitwise logical inversion operator.
Return value
TRgb
|
Contains results of logical inversion.
|
|
inline TRgb operator &(const TRgb &aColor);
Description
Bitwise logical AND operator.
Parameters
const TRgb &aColor |
Colour to be compared.
|
|
Return value
TRgb
|
Contains results of logical AND.
|
|
inline TRgb operator|(const TRgb &aColor);
Description
Bitwise logical OR operator.
Parameters
const TRgb &aColor |
Colour to be compared.
|
|
Return value
TRgb
|
Contains results of logical OR.
|
|
inline TRgb operator^(const TRgb &aColor);
Description
Bitwise EXCLUSIVE OR operator
Parameters
const TRgb &aColor |
Colour to be compared.
|
|
Return value
TRgb
|
Contains results of logical EXCLUSIVE OR.
|
|
operator &=(const TRgb &)
inline TRgb& operator &=(const TRgb &aColor);
Description
Logical AND assignment operator.
The operator ANDs the first operand with the second and then assigns the result back to the first operand.
Note:
This operates in the TRgb domain. Graphics defines logical operations for drawing primitives which operate in the device colour
domain.
Parameters
const TRgb &aColor |
Colour to be compared.
|
|
Return value
TRgb & |
First operand-contains result of logical AND.
|
|
inline TRgb& operator|=(const TRgb &aColor);
Description
Logical OR assignment operator.
The operator ORs the first operand with the second and then assigns the result back to the first operand.
Note:
This operates in the TRgb domain. Graphics defines logical operations for drawing primitives which operate in the device colour
domain.
Parameters
const TRgb &aColor |
Colour to be compared.
|
|
Return value
TRgb & |
First operand- contains result of logical OR.
|
|
inline TRgb& operator^=(const TRgb &aColor);
Description
Logical EXCLUSIVE OR assignment operator.
The operator Exclusive ORs the first operand with the second and then assigns the result back to the first operand.
Note:
This operates in the TRgb domain. Graphics defines logical operations for drawing primitives which operate in the device colour
domain.
Parameters
const TRgb &aColor |
Colour to be compared.
|
|
Return value
TRgb & |
First operand contains result of logical Exclusive OR.
|
|
Interface status: |
deprecated |
|
inline TUint32 Value() const;
Description
Gets the 32-bit value of the TRgb as an integer. This function is deprecated. Use TRgb::Internal()const
instead.
Return value
TUint32
|
The 32 bit value of the TRgb. Has the form 0xaabbggrr, where bb is the hex number of blue, gg is the hex number for green,
rr is the hex number for red and aa is the hex number of alpha (0 means opaque, 255 means transparent).
|
|
inline TUint32 Internal() const;
Description
Gets the 32-bit value of the TRgb as an integer.
Return value
TUint32
|
The 32 bit value of the TRgb. Has the form 0xaarrggbb.
|
|
inline void SetInternal(TUint32 aInternal);
Description
Sets the 32-bit value of the TRgb as a 32-bit integer.
Parameters
TUint32 aInternal |
Colour internal representation. Has the form 0xaarrggbb.
|
|
Difference(const TRgb &)const
IMPORT_C TInt Difference(const TRgb &aColor) const;
Description
Gets the difference between two TRgbs.
This difference is defined as the sum of the absolute values of the difference in the red, green and blue components.
Parameters
const TRgb &aColor |
The TRgb to be compared.
|
|
Return value
TInt
|
The sum of the absolute value of the differences between the red, green and blue components.
|
|
InternalizeL(RReadStream &)
IMPORT_C void InternalizeL(RReadStream &aStream);
Description
Internalises a TRgb object from a stream.
The presence of this function means that the standard templated stream operator>>(RReadStream &,T &)
is available to internalise objects of this class.
Parameters
RReadStream &aStream |
Stream from which the object is internalised.
|
|
ExternalizeL(RWriteStream &)const
IMPORT_C void ExternalizeL(RWriteStream &aStream) const;
Description
Externalises a TRgb object to a stream.
The presence of this function means that the standard templated stream operator<<(RWriteStream &,const T &)
is available to externalise objects of this class.
Parameters
RWriteStream &aStream |
Stream to which the object is externalised.
|
|
IMPORT_C static TRgb Color16MU(TInt a0RGB);
Description
Gets TRgb from 16MU colour index. The function takes a 24 bit colour value with eight bits for each component, blue in the
low byte, and returns the TRgb whose red, green and blue values represent it exactly.
Parameters
TInt a0RGB |
The color - 0, R, G, B bytes. / BGR0 - little endian format /
|
|
Return value
TRgb
|
The TRgb which represents the index exactly.
|
|
IMPORT_C TInt Color16MU() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 16777215) representing the nearest TRgb.
|
|
IMPORT_C static TRgb Color16MA(TUint aARGB);
Description
Gets TRgb from 16MA colour index. The function takes a 32 bit colour value with eight bits for each component, blue in the
low byte, and returns the TRgb whose red, green, blue and alpha values represent it exactly.
Parameters
TUint aARGB |
The color - A, R, G, B bytes. / BGRA - little endian format /
|
|
Return value
TRgb
|
The TRgb which represents the index exactly.
|
|
IMPORT_C TUint Color16MA() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TUint
|
The index (0 - 16777215) representing the nearest TRgb.
|
|
IMPORT_C static TRgb Color16MAP(TUint aARGB);
Description
Gets TRgb from 16MAP colour index. The function takes a 32 bit colour value with eight bits for each component, blue in the
low byte, and returns the TRgb whose red, green, and blue vales are divided by the alpha value.
Parameters
TUint aARGB |
The pre-multiplied (EColor16MAP) color value.
|
|
Return value
TRgb
|
The TRgb which represents the color channel and alpha information.
|
|
IMPORT_C TUint Color16MAP() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode. pre-multiplies the alpha channels with
the color channel.
Return value
TUint
|
The pre-multiplied color value
|
|
IMPORT_C TUint _Color16MAP() const;
Description
Converts the TRgb to EColor16MAP (with color channels pre-multiplied with the alpha channel.
Return value
TUint
|
The index which represents the TRgb values after multiplication with Alpha value.
|
|
IMPORT_C static TRgb _Color16MAP(TUint aARGB);
Description
Gets TRgb from 16MAP colour index. The function takes a 32 bit colour value with eight bits for each component, blue in the
low byte, and returns the TRgb whose red, green, and blue vales are divided by the alpha value.
Parameters
TUint aARGB |
The pre-multiplied (EColor16MAP) color value.
|
|
Return value
TRgb
|
The TRgb which represents the color channel and alpha information.
|
|
inline TInt _Gray2() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 1) representing the nearest TRgb.
|
|
inline TInt _Gray4() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 3) representing the nearest TRgb.
|
|
inline TInt _Gray16() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 15) representing the nearest TRgb.
|
|
inline TInt _Gray256() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 255) representing the nearest TRgb.
|
|
inline TInt _Color4K() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 4095) representing the nearest TRgb.
|
|
inline TInt _Color64K() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 65535) representing the nearest TRgb.
|
|
inline TInt _Color16M() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 16777215) representing the nearest TRgb.
|
|
inline TInt _Color16MU() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TInt
|
The index (0 - 16777215) representing the nearest TRgb.
|
|
inline TUint _Color16MA() const;
Description
Gets the index of the closest TRgb value to this, based on the matching display mode.
Return value
TUint
|
The index (0 - 16777215) representing the nearest TRgb.
|
|
static inline TRgb _Gray2(TInt aGray2);
Description
Gets TRgb from 2 level grayscale.
The function takes a grayscale argument and return a TRgb whose red, green and blue values are set to an appropriate level.
Parameters
TInt aGray2 |
Grayscale value to be converted.
|
|
Return value
TRgb
|
Equivalent 24 bit colour. Gray2 has only 2 levels (black and white), the function returns r=g=b=0 or r=g=b=255.
|
|
static inline TRgb _Gray4(TInt aGray4);
Description
Gets TRgb from 4 level grayscale.
The function takes a grayscale argument and return a TRgb whose red, green and blue values are set to an appropriate level.
Parameters
TInt aGray4 |
Grayscale value to be converted.
|
|
Return value
TRgb
|
Equivalent 24 bit colour. Gray4 has 4 levels- the function returns r=g=b=85*c, where c=0,1,2, or 3.
|
|
static inline TRgb _Gray16(TInt aGray16);
Description
Gets TRgb from 16 level grayscale.
The function takes a grayscale argument and return a TRgb whose red, green and blue values are set to an appropriate level.
Parameters
TInt aGray16 |
Grayscale value to be converted.
|
|
Return value
TRgb
|
Equivalent 24 bit colour. Gray16 has 16 levels - the function returns r=g=b=17*c, where c=0, 1, ... 15.
|
|
static inline TRgb _Gray256(TInt aGray256);
Description
Gets TRgb from 256 level grayscale.
The function takes a grayscale argument and return a TRgb whose red, green and blue values are set to an appropriate level.
Parameters
TInt aGray256 |
Grayscale value to be converted.
|
|
Return value
TRgb
|
Equivalent 24 bit colour. Gray256 has 256 levels- the function returns r=g=b=c, where c=0, 1, ... 255.
|
|
static inline TRgb _Color4K(TInt aColor4K);
Description
Gets TRgb from 4K colour index.
The function takes a 12 bit index into a colour palette and returns a TRgb whose red, green and blue values are set to an
appropriate level.
Parameters
TInt aColor4K |
12 bit index into a colour palette
|
|
Return value
TRgb
|
Equivalent 24 bit colour.
|
|
static inline TRgb _Color64K(TInt aColor64K);
Description
Gets TRgb from 64K colour index.
The function takes a 16 bit index into a colour palette and returns a TRgb whose red, green and blue values are set to an
appropriate level.
Parameters
TInt aColor64K |
16 bit index into a colour palette
|
|
Return value
TRgb
|
Equivalent 24 bit colour.
|
|
static inline TRgb _Color16M(TInt aColor16M);
Description
Gets TRgb from 16M colour index.
The function takes a 24 bit index into a colour palette and returns the TRgb whose red, green and blue values represent it
exactly.
Parameters
TInt aColor16M |
24 bit index into a colour palette
|
|
Return value
TRgb
|
The TRgb which represents the index exactly.
|
|
static inline TRgb _Color16MU(TInt a0RGB);
Description
Gets TRgb from 16MU colour index. The function takes a 24 bit colour value with eight bits for each component, blue in the
low byte, and returns the TRgb whose red, green and blue values represent it exactly.
Parameters
TInt a0RGB |
The color - 0, R, G, B bytes. / BGR0 - little endian format /
|
|
Return value
TRgb
|
The TRgb which represents the index exactly.
|
|
static inline TRgb _Color16MA(TUint aARGB);
Description
Gets TRgb from 16MA colour index. The function takes a 32 bit colour value with eight bits for each component, blue in the
low byte, and returns the TRgb whose red, green, blue and alpha values represent it exactly.
Parameters
TUint aARGB |
The color - A, R, G, B bytes. / BGR0 - little endian format /
|
|
Return value
TRgb
|
The TRgb which represents the index exactly.
|
|