Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
TRgb Class Reference

24-bit RGB colour value with 8 bits each for red, green and blue. More...

#include <gdi.h>

Public Member Functions

 TRgb ()
 Constructs a TRgb initialised to KRgbWhite.
 
 TRgb (TUint32 aValue)
 Constructs a TRgb directly from a single 32-bit integer.
 
 TRgb (TUint32 aInternalValue, TInt aAlpha)
 Constructs a TRgb from a 32-bit integer (which corresponds to a colour) and from an alpha value.
 
 TRgb (TInt aRed, TInt aGreen, TInt aBlue)
 Constructs a TRgb from its three component colours.
 
 TRgb (TInt aRed, TInt aGreen, TInt aBlue, TInt aAlpha)
 Constructs a TRgb from its three colour components and alpha component.
 
TInt Red () const
 Gets the red component.
 
TInt Green () const
 Gets the green component.
 
TInt Blue () const
 Gets the blue component.
 
TInt Alpha () const
 Gets the alpha component.
 
IMPORT_C void SetRed (TInt aRed)
 Sets the red component.
 
IMPORT_C void SetGreen (TInt aGreen)
 Sets the green component.
 
IMPORT_C void SetBlue (TInt aBlue)
 Sets the blue component.
 
IMPORT_C void SetAlpha (TInt aAlpha)
 Sets the alpha component.
 
IMPORT_C TInt Gray2 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TInt Gray4 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TInt Gray16 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TInt Gray256 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TInt Color16 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TInt Color256 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TInt Color4K () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TInt Color64K () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TInt Color16M () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
TBool operator== (const TRgb &aColor) const
 Compares this colour with the specified colour for equality.
 
TBool operator!= (const TRgb &aColor) const
 Compares this colour with the specified colour for inequality.
 
TRgb operator~ () const
 Bitwise logical inversion operator.
 
TRgb operator& (const TRgb &aColor)
 Bitwise logical AND operator.
 
TRgb operator| (const TRgb &aColor)
 Bitwise logical OR operator.
 
TRgb operator^ (const TRgb &aColor)
 Bitwise EXCLUSIVE OR operator.
 
TRgb & operator&= (const TRgb &aColor)
 Logical AND assignment operator.
 
TRgb & operator|= (const TRgb &aColor)
 Logical OR assignment operator.
 
TRgb & operator^= (const TRgb &aColor)
 Logical EXCLUSIVE OR assignment operator.
 
TUint32 Value () const
 Gets the 32-bit value of the TRgb as an integer.
 
TUint32 Internal () const
 Gets the 32-bit value of the TRgb as an integer.
 
void SetInternal (TUint32 aInternal)
 Sets the 32-bit value of the TRgb as a 32-bit integer.
 
IMPORT_C TInt Difference (const TRgb &aColor) const
 Gets the difference between two TRgbs.
 
IMPORT_C void InternalizeL (RReadStream &aStream)
 Internalises a TRgb object from a stream.
 
IMPORT_C void ExternalizeL (RWriteStream &aStream) const
 Externalises a TRgb object to a stream.
 
IMPORT_C TInt Color16MU () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TUint Color16MA () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TUint Color16MAP () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
IMPORT_C TUint _Color16MAP () const
 Converts the TRgb to EColor16MAP (with color channels pre-multiplied with the alpha channel.
 
TInt _Gray2 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
TInt _Gray4 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
TInt _Gray16 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
TInt _Gray256 () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
TInt _Color4K () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
TInt _Color64K () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
TInt _Color16M () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
TInt _Color16MU () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 
TUint _Color16MA () const
 Gets the index of the closest TRgb value to this, based on the matching display mode.
 

Static Public Member Functions

static IMPORT_C TRgb Gray2 (TInt aGray2)
 Gets TRgb from 2 level grayscale.
 
static IMPORT_C TRgb Gray4 (TInt aGray4)
 Gets TRgb from 4 level grayscale.
 
static IMPORT_C TRgb Gray16 (TInt aGray16)
 Gets TRgb from 16 level grayscale.
 
static IMPORT_C TRgb Gray256 (TInt aGray256)
 Gets TRgb from 256 level grayscale.
 
static IMPORT_C TRgb Color16 (TInt aColor16)
 Gets TRgb from 4 bit colour index.
 
static IMPORT_C TRgb Color256 (TInt aColor256)
 Gets TRgb from 8 bit colour index.
 
static IMPORT_C TRgb Color4K (TInt aColor4K)
 Gets TRgb from 4K colour index.
 
static IMPORT_C TRgb Color64K (TInt aColor64K)
 Gets TRgb from 64K colour index.
 
static IMPORT_C TRgb Color16M (TInt aColor16M)
 Gets TRgb from 16M colour index.
 
static IMPORT_C TRgb Color16MU (TInt a0RGB)
 Gets TRgb from 16MU colour index.
 
static IMPORT_C TRgb Color16MA (TUint aARGB)
 Gets TRgb from 16MA colour index.
 
static IMPORT_C TRgb Color16MAP (TUint aARGB)
 Gets TRgb from 16MAP colour index.
 
static IMPORT_C TRgb _Color16MAP (TUint aARGB)
 Gets TRgb from 16MAP colour index.
 
static TRgb _Gray2 (TInt aGray2)
 Gets TRgb from 2 level grayscale.
 
static TRgb _Gray4 (TInt aGray4)
 Gets TRgb from 4 level grayscale.
 
static TRgb _Gray16 (TInt aGray16)
 Gets TRgb from 16 level grayscale.
 
static TRgb _Gray256 (TInt aGray256)
 Gets TRgb from 256 level grayscale.
 
static TRgb _Color4K (TInt aColor4K)
 Gets TRgb from 4K colour index.
 
static TRgb _Color64K (TInt aColor64K)
 Gets TRgb from 64K colour index.
 
static TRgb _Color16M (TInt aColor16M)
 Gets TRgb from 16M colour index.
 
static TRgb _Color16MU (TInt a0RGB)
 Gets TRgb from 16MU colour index.
 
static TRgb _Color16MA (TUint aARGB)
 Gets TRgb from 16MA colour index.
 

Detailed 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 Value(), 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

See also
TDisplayMode
DynamicPalette
API status
Published to all clients. Released API.

Definition at line 220 of file gdi.h.

Constructor & Destructor Documentation

◆ TRgb() [1/5]

TRgb::TRgb ( )
inline

Constructs a TRgb initialised to KRgbWhite.

(generated from Symbian Developer Library)

◆ TRgb() [2/5]

TRgb::TRgb ( TUint32  aValue)
inline

Constructs a TRgb directly from a single 32-bit integer.

The integer is of the form 0xaabbggrr, where bb is the hex number for blue, gg is the hex number for green, rr is the hex number for red, and aa is the hex number for "transparency" alpha (0 means opaque, 255 means transparent).

This constructor is deprecated. The byte order of Red ,Green and Blue does not match other constructors and methods in this class, and the meaning of alpha is reversed compared to current convention.

For example, TRgb(0x00080402) using this constructor can be replaced with the 3 colour constructor TRgb(2,4,8). The equivalent explicit alpha constructors are TRgb(0x020408,0xff) and TRgb(2,4,8,255). The equivalent call to SetInternal is SetInternal(0xff020408).

This constructor is deprecated. Use other constructors or SetInternal() instead.

Parameters
aValueInteger representing colour value. Takes form 0x00bbggrr.

(generated from Symbian Developer Library)

◆ TRgb() [3/5]

TRgb::TRgb ( TUint32  aInternalValue,
TInt  aAlpha 
)
inline

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 for 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+alpha constructor is equal to TRgb(0x00020408, 255) using this constructor.

This constructor, which implements alpha in the conventional way, replaces TRgb( TUint32 aValue ) which is deprecated.

Parameters
aInternalValueInteger representing a colour value, which takes the form 0x00rrggbb.
aAlphaAlpha component of the colour (0 - 255).

(generated from Symbian Developer Library)

◆ TRgb() [4/5]

TRgb::TRgb ( TInt  aRed,
TInt  aGreen,
TInt  aBlue 
)
inline

Constructs a TRgb from its three component colours.

Each colour has a value between 0 and 255. The alpha component is always set to opaque (255)

Parameters
aRedRed component of the colour (0 - 255).
aGreenGreen component of the colour (0 - 255).
aBlueBlue component of the colour (0 - 255).

(generated from Symbian Developer Library)

◆ TRgb() [5/5]

TRgb::TRgb ( TInt  aRed,
TInt  aGreen,
TInt  aBlue,
TInt  aAlpha 
)
inline

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).

This constructor, which implements alpha in the conventional way, replaces TRgb( TUint32 aValue ) which is deprecated.

Parameters
aRedRed component of the colour (0 - 255).
aGreenGreen component of the colour (0 - 255).
aBlueBlue component of the colour (0 - 255).
aAlphaAlpha component of the colour (0 - 255).

(generated from Symbian Developer Library)

Member Function Documentation

◆ _Color16M() [1/2]

TInt TRgb::_Color16M ( ) const
inline

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ _Color16M() [2/2]

static TRgb TRgb::_Color16M ( TInt  aColor16M)
inlinestatic

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
aColor16M24 bit index into a colour palette

(generated from Symbian Developer Library)

◆ _Color16MA() [1/2]

TUint TRgb::_Color16MA ( ) const
inline

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ _Color16MA() [2/2]

static TRgb TRgb::_Color16MA ( TUint  aARGB)
inlinestatic

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
aARGBThe color - A, R, G, B bytes. / BGR0 - little endian format /

(generated from Symbian Developer Library)

◆ _Color16MAP() [1/2]

IMPORT_C TUint TRgb::_Color16MAP ( ) const

Converts the TRgb to EColor16MAP (with color channels pre-multiplied with the alpha channel.

(generated from Symbian Developer Library)

◆ _Color16MAP() [2/2]

static IMPORT_C TRgb TRgb::_Color16MAP ( TUint  aARGB)
static

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
aARGBThe pre-multiplied (EColor16MAP) color value.

(generated from Symbian Developer Library)

◆ _Color16MU() [1/2]

TInt TRgb::_Color16MU ( ) const
inline

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ _Color16MU() [2/2]

static TRgb TRgb::_Color16MU ( TInt  a0RGB)
inlinestatic

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
a0RGBThe color - 0, R, G, B bytes. / BGR0 - little endian format /

(generated from Symbian Developer Library)

◆ _Color4K() [1/2]

TInt TRgb::_Color4K ( ) const
inline

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ _Color4K() [2/2]

static TRgb TRgb::_Color4K ( TInt  aColor4K)
inlinestatic

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
aColor4K12 bit index into a colour palette

(generated from Symbian Developer Library)

◆ _Color64K() [1/2]

TInt TRgb::_Color64K ( ) const
inline

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ _Color64K() [2/2]

static TRgb TRgb::_Color64K ( TInt  aColor64K)
inlinestatic

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
aColor64K16 bit index into a colour palette

(generated from Symbian Developer Library)

◆ _Gray16() [1/2]

TInt TRgb::_Gray16 ( ) const
inline

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ _Gray16() [2/2]

static TRgb TRgb::_Gray16 ( TInt  aGray16)
inlinestatic

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
aGray16Grayscale value to be converted.

(generated from Symbian Developer Library)

◆ _Gray2() [1/2]

TInt TRgb::_Gray2 ( ) const
inline

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ _Gray2() [2/2]

static TRgb TRgb::_Gray2 ( TInt  aGray2)
inlinestatic

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
aGray2Grayscale value to be converted.

(generated from Symbian Developer Library)

◆ _Gray256() [1/2]

TInt TRgb::_Gray256 ( ) const
inline

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ _Gray256() [2/2]

static TRgb TRgb::_Gray256 ( TInt  aGray256)
inlinestatic

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
aGray256Grayscale value to be converted.

(generated from Symbian Developer Library)

◆ _Gray4() [1/2]

TInt TRgb::_Gray4 ( ) const
inline

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ _Gray4() [2/2]

static TRgb TRgb::_Gray4 ( TInt  aGray4)
inlinestatic

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
aGray4Grayscale value to be converted.

(generated from Symbian Developer Library)

◆ Alpha()

TInt TRgb::Alpha ( ) const
inline

Gets the alpha component.

(generated from Symbian Developer Library)

◆ Blue()

TInt TRgb::Blue ( ) const
inline

Gets the blue component.

(generated from Symbian Developer Library)

◆ Color16() [1/2]

IMPORT_C TInt TRgb::Color16 ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Color16() [2/2]

static IMPORT_C TRgb TRgb::Color16 ( TInt  aColor16)
static

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
aColor164 bit index into a colour palette

(generated from Symbian Developer Library)

◆ Color16M() [1/2]

IMPORT_C TInt TRgb::Color16M ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Color16M() [2/2]

static IMPORT_C TRgb TRgb::Color16M ( TInt  aColor16M)
static

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
aColor16M24 bit index into a colour palette

(generated from Symbian Developer Library)

◆ Color16MA() [1/2]

IMPORT_C TUint TRgb::Color16MA ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Color16MA() [2/2]

static IMPORT_C TRgb TRgb::Color16MA ( TUint  aARGB)
static

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
aARGBThe color - A, R, G, B bytes. / BGRA - little endian format /

(generated from Symbian Developer Library)

◆ Color16MAP() [1/2]

IMPORT_C TUint TRgb::Color16MAP ( ) const

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.

(generated from Symbian Developer Library)

◆ Color16MAP() [2/2]

static IMPORT_C TRgb TRgb::Color16MAP ( TUint  aARGB)
static

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
aARGBThe pre-multiplied (EColor16MAP) color value.

(generated from Symbian Developer Library)

◆ Color16MU() [1/2]

IMPORT_C TInt TRgb::Color16MU ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Color16MU() [2/2]

static IMPORT_C TRgb TRgb::Color16MU ( TInt  a0RGB)
static

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
a0RGBThe color - 0, R, G, B bytes. / BGR0 - little endian format /

(generated from Symbian Developer Library)

◆ Color256() [1/2]

IMPORT_C TInt TRgb::Color256 ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Color256() [2/2]

static IMPORT_C TRgb TRgb::Color256 ( TInt  aColor256)
static

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
aColor2568 bit index into a colour palette.

(generated from Symbian Developer Library)

◆ Color4K() [1/2]

IMPORT_C TInt TRgb::Color4K ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Color4K() [2/2]

static IMPORT_C TRgb TRgb::Color4K ( TInt  aColor4K)
static

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
aColor4K12 bit index into a colour palette

(generated from Symbian Developer Library)

◆ Color64K() [1/2]

IMPORT_C TInt TRgb::Color64K ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Color64K() [2/2]

static IMPORT_C TRgb TRgb::Color64K ( TInt  aColor64K)
static

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
aColor64K16 bit index into a colour palette

(generated from Symbian Developer Library)

◆ Difference()

IMPORT_C TInt TRgb::Difference ( const TRgb &  aColor) const

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
aColorThe TRgb to be compared.

(generated from Symbian Developer Library)

◆ ExternalizeL()

IMPORT_C void TRgb::ExternalizeL ( RWriteStream &  aStream) const

Externalises a TRgb object to a stream.

The presence of this function means that the standard templated stream operator<<() is available to externalise objects of this class.

Parameters
aStreamStream to which the object is externalised.

(generated from Symbian Developer Library)

◆ Gray16() [1/2]

IMPORT_C TInt TRgb::Gray16 ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Gray16() [2/2]

static IMPORT_C TRgb TRgb::Gray16 ( TInt  aGray16)
static

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
aGray16Grayscale value to be converted.

(generated from Symbian Developer Library)

◆ Gray2() [1/2]

IMPORT_C TInt TRgb::Gray2 ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Gray2() [2/2]

static IMPORT_C TRgb TRgb::Gray2 ( TInt  aGray2)
static

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
aGray2Grayscale value to be converted.

(generated from Symbian Developer Library)

◆ Gray256() [1/2]

IMPORT_C TInt TRgb::Gray256 ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Gray256() [2/2]

static IMPORT_C TRgb TRgb::Gray256 ( TInt  aGray256)
static

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
aGray256Grayscale value to be converted.

(generated from Symbian Developer Library)

◆ Gray4() [1/2]

IMPORT_C TInt TRgb::Gray4 ( ) const

Gets the index of the closest TRgb value to this, based on the matching display mode.

(generated from Symbian Developer Library)

◆ Gray4() [2/2]

static IMPORT_C TRgb TRgb::Gray4 ( TInt  aGray4)
static

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
aGray4Grayscale value to be converted.

(generated from Symbian Developer Library)

◆ Green()

TInt TRgb::Green ( ) const
inline

Gets the green component.

(generated from Symbian Developer Library)

◆ Internal()

TUint32 TRgb::Internal ( ) const
inline

Gets the 32-bit value of the TRgb as an integer.

(generated from Symbian Developer Library)

◆ InternalizeL()

IMPORT_C void TRgb::InternalizeL ( RReadStream &  aStream)

Internalises a TRgb object from a stream.

The presence of this function means that the standard templated stream operator>>() is available to internalise objects of this class.

operator>>()

Parameters
aStreamStream from which the object is internalised.

(generated from Symbian Developer Library)

◆ operator!=()

TBool TRgb::operator!= ( const TRgb &  aColor) const
inline

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
aColorColour to be compared.

(generated from Symbian Developer Library)

◆ operator&()

TRgb TRgb::operator& ( const TRgb &  aColor)
inline

Bitwise logical AND operator.

Parameters
aColorColour to be compared.

(generated from Symbian Developer Library)

◆ operator&=()

TRgb & TRgb::operator&= ( const TRgb &  aColor)
inline

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
aColorColour to be compared.

(generated from Symbian Developer Library)

◆ operator==()

TBool TRgb::operator== ( const TRgb &  aColor) const
inline

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
aColorColour to be compared.

(generated from Symbian Developer Library)

◆ operator^()

TRgb TRgb::operator^ ( const TRgb &  aColor)
inline

Bitwise EXCLUSIVE OR operator.

Parameters
aColorColour to be compared.

(generated from Symbian Developer Library)

◆ operator^=()

TRgb & TRgb::operator^= ( const TRgb &  aColor)
inline

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
aColorColour to be compared.

(generated from Symbian Developer Library)

◆ operator|()

TRgb TRgb::operator| ( const TRgb &  aColor)
inline

Bitwise logical OR operator.

Parameters
aColorColour to be compared.

(generated from Symbian Developer Library)

◆ operator|=()

TRgb & TRgb::operator|= ( const TRgb &  aColor)
inline

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
aColorColour to be compared.

(generated from Symbian Developer Library)

◆ operator~()

TRgb TRgb::operator~ ( ) const
inline

Bitwise logical inversion operator.

(generated from Symbian Developer Library)

◆ Red()

TInt TRgb::Red ( ) const
inline

Gets the red component.

(generated from Symbian Developer Library)

◆ SetAlpha()

IMPORT_C void TRgb::SetAlpha ( TInt  aAlpha)

Sets the alpha component.

Parameters
aAlphaAlpha component (0 - 255).

(generated from Symbian Developer Library)

◆ SetBlue()

IMPORT_C void TRgb::SetBlue ( TInt  aBlue)

Sets the blue component.

Parameters
aBlueBlue component (0 - 255).

(generated from Symbian Developer Library)

◆ SetGreen()

IMPORT_C void TRgb::SetGreen ( TInt  aGreen)

Sets the green component.

Parameters
aGreenGreen component (0 - 255).

(generated from Symbian Developer Library)

◆ SetInternal()

void TRgb::SetInternal ( TUint32  aInternal)
inline

Sets the 32-bit value of the TRgb as a 32-bit integer.

Parameters
aInternalColour internal representation. Has the form 0xaarrggbb.

(generated from Symbian Developer Library)

◆ SetRed()

IMPORT_C void TRgb::SetRed ( TInt  aRed)

Sets the red component.

Parameters
aRedRed component (0 - 255).

(generated from Symbian Developer Library)

◆ Value()

TUint32 TRgb::Value ( ) const
inline

Gets the 32-bit value of the TRgb as an integer.

This function is deprecated. Use Internal() instead. Note: the order of Red, Green and Blue components returned by this method is reversed compared to all other methods. The alpha value is also reversed in meaning compared to current convention, such that 0 represents opaque and 0xff represents transparent.

(generated from Symbian Developer Library)


The documentation for this class was generated from the following files: