TRgb Class Reference

#include <gdi.h>

Link against: gdi.lib

class TRgb
Public Member Functions
TRgb()
TRgb(TUint32)
TRgb(TUint32, TInt)
TRgb(TInt, TInt, TInt)
TRgb(TInt, TInt, TInt, TInt)
TInt Alpha()
TInt Blue()
IMPORT_C TRgbColor16(TInt)
IMPORT_C TIntColor16()
IMPORT_C TRgbColor16M(TInt)
IMPORT_C TIntColor16M()
IMPORT_C TRgbColor16MA(TUint)
IMPORT_C TUintColor16MA()
IMPORT_C TRgbColor16MAP(TUint)
IMPORT_C TUintColor16MAP()
IMPORT_C TRgbColor16MU(TInt)
IMPORT_C TIntColor16MU()
IMPORT_C TRgbColor256(TInt)
IMPORT_C TIntColor256()
IMPORT_C TRgbColor4K(TInt)
IMPORT_C TIntColor4K()
IMPORT_C TRgbColor64K(TInt)
IMPORT_C TIntColor64K()
IMPORT_C TIntDifference(const TRgb &)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C TRgbGray16(TInt)
IMPORT_C TIntGray16()
IMPORT_C TRgbGray2(TInt)
IMPORT_C TIntGray2()
IMPORT_C TRgbGray256(TInt)
IMPORT_C TIntGray256()
IMPORT_C TRgbGray4(TInt)
IMPORT_C TIntGray4()
TInt Green()
TUint32 Internal()
IMPORT_C voidInternalizeL(RReadStream &)
TInt Red()
IMPORT_C voidSetAlpha(TInt)
IMPORT_C voidSetBlue(TInt)
IMPORT_C voidSetGreen(TInt)
voidSetInternal(TUint32)
IMPORT_C voidSetRed(TInt)
TUint32 Value()
TInt _Color16M()
TRgb _Color16M(TInt)
TUint _Color16MA()
TRgb _Color16MA(TUint)
IMPORT_C TUint_Color16MAP()
IMPORT_C TRgb_Color16MAP(TUint)
TInt _Color16MU()
TRgb _Color16MU(TInt)
TInt _Color4K()
TRgb _Color4K(TInt)
TInt _Color64K()
TRgb _Color64K(TInt)
TInt _Gray16()
TRgb _Gray16(TInt)
TInt _Gray2()
TRgb _Gray2(TInt)
TInt _Gray256()
TRgb _Gray256(TInt)
TInt _Gray4()
TRgb _Gray4(TInt)
TBool operator!=(const TRgb &)
TRgb operator&(const TRgb &)
TRgb &operator&=(const TRgb &)
TBool operator==(const TRgb &)
TRgb operator^(const TRgb &)
TRgb &operator^=(const TRgb &)
TRgb operator|(const TRgb &)
TRgb &operator|=(const TRgb &)
TRgb operator~()

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

Constructor & Destructor Documentation

TRgb ( )

TRgb()[inline]

Constructs a TRgb initialised to KRgbWhite.

TRgb ( TUint32 )

TRgb(TUint32aValue)[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.

Deprecated

Parameters
aValueInteger representing colour value. Takes form 0x00bbggrr.

TRgb ( TUint32, TInt )

TRgb(TUint32aInternalValue,
TIntaAlpha
)[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).

TRgb ( TInt, TInt, TInt )

TRgb(TIntaRed,
TIntaGreen,
TIntaBlue
)[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).

TRgb ( TInt, TInt, TInt, TInt )

TRgb(TIntaRed,
TIntaGreen,
TIntaBlue,
TIntaAlpha
)[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).

Member Function Documentation

Alpha ( )

TInt Alpha()const [inline]

Gets the alpha component.

Return Value
The alpha component (0 - 255).

Blue ( )

TInt Blue()const [inline]

Gets the blue component.

Return Value
The blue component (0 - 255).

Color16 ( TInt )

IMPORT_C TRgbColor16(TIntaColor16)[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
Return Value
Equivalent 24 bit colour.

Color16 ( )

IMPORT_C TIntColor16()const

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

Return Value
The index (0 - 15) representing the nearest TRgb.

Color16M ( TInt )

IMPORT_C TRgbColor16M(TIntaColor16M)[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
Return Value
The TRgb which represents the index exactly.

Color16M ( )

IMPORT_C TIntColor16M()const

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

Return Value
The index (0 - 16777215) representing the nearest TRgb.

Color16MA ( TUint )

IMPORT_C TRgbColor16MA(TUintaARGB)[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 /
Return Value
The TRgb which represents the index exactly.

Color16MA ( )

IMPORT_C TUintColor16MA()const

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

Return Value
The index (0 - 16777215) representing the nearest TRgb.

Color16MAP ( TUint )

IMPORT_C TRgbColor16MAP(TUintaARGB)[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.
Return Value
The TRgb which represents the color channel and alpha information.

Color16MAP ( )

IMPORT_C TUintColor16MAP()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.

Return Value
The pre-multiplied color value

Color16MU ( TInt )

IMPORT_C TRgbColor16MU(TInta0RGB)[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 /
Return Value
The TRgb which represents the index exactly.

Color16MU ( )

IMPORT_C TIntColor16MU()const

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

Return Value
The index (0 - 16777215) representing the nearest TRgb.

Color256 ( TInt )

IMPORT_C TRgbColor256(TIntaColor256)[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.
Return Value
Equivalent 24 bit colour.

Color256 ( )

IMPORT_C TIntColor256()const

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

Return Value
The index (0 - 255) representing the nearest TRgb.

Color4K ( TInt )

IMPORT_C TRgbColor4K(TIntaColor4K)[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
Return Value
Equivalent 24 bit colour.

Color4K ( )

IMPORT_C TIntColor4K()const

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

Return Value
The index (0 - 4095) representing the nearest TRgb.

Color64K ( TInt )

IMPORT_C TRgbColor64K(TIntaColor64K)[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
Return Value
Equivalent 24 bit colour.

Color64K ( )

IMPORT_C TIntColor64K()const

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

Return Value
The index (0 - 65535) representing the nearest TRgb.

Difference ( const TRgb & )

IMPORT_C TIntDifference(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.
Return Value
The sum of the absolute value of the differences between the red, green and blue components.

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(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.

Gray16 ( TInt )

IMPORT_C TRgbGray16(TIntaGray16)[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.
Return Value
Equivalent 24 bit colour. Gray16 has 16 levels - the function returns r=g=b=17*c, where c=0, 1, ... 15.

Gray16 ( )

IMPORT_C TIntGray16()const

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

Return Value
The index (0 - 15) representing the nearest TRgb.

Gray2 ( TInt )

IMPORT_C TRgbGray2(TIntaGray2)[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.
Return Value
Equivalent 24 bit colour. Gray2 has only 2 levels (black and white), the function returns r=g=b=0 or r=g=b=255.

Gray2 ( )

IMPORT_C TIntGray2()const

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

Return Value
The index (0 - 1) representing the nearest TRgb.

Gray256 ( TInt )

IMPORT_C TRgbGray256(TIntaGray256)[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.
Return Value
Equivalent 24 bit colour. Gray256 has 256 levels- the function returns r=g=b=c, where c=0, 1, ... 255.

Gray256 ( )

IMPORT_C TIntGray256()const

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

Return Value
The index (0 - 255) representing the nearest TRgb.

Gray4 ( TInt )

IMPORT_C TRgbGray4(TIntaGray4)[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.
Return Value
Equivalent 24 bit colour. Gray4 has 4 levels- the function returns r=g=b=85*c, where c=0,1,2, or 3.

Gray4 ( )

IMPORT_C TIntGray4()const

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

Return Value
The index (0 - 3) representing the nearest TRgb.

Green ( )

TInt Green()const [inline]

Gets the green component.

Return Value
The green component (0 - 255).

Internal ( )

TUint32 Internal()const [inline]

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

Return Value
The 32 bit value of the TRgb. Has the form 0xaarrggbb.

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(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.

See also: operator>>()

Parameters
aStreamStream from which the object is internalised.

Red ( )

TInt Red()const [inline]

Gets the red component.

Return Value
The red component (0 - 255).

SetAlpha ( TInt )

IMPORT_C voidSetAlpha(TIntaAlpha)

Sets the alpha component.

Parameters
aAlphaAlpha component (0- 255).

SetBlue ( TInt )

IMPORT_C voidSetBlue(TIntaBlue)

Sets the blue component.

Parameters
aBlueBlue component (0- 255).

SetGreen ( TInt )

IMPORT_C voidSetGreen(TIntaGreen)

Sets the green component.

Parameters
aGreenGreen component (0 - 255).

SetInternal ( TUint32 )

voidSetInternal(TUint32aInternal)[inline]

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

Parameters
aInternalColour internal representation. Has the form 0xaarrggbb.

SetRed ( TInt )

IMPORT_C voidSetRed(TIntaRed)

Sets the red component.

Parameters
aRedRed component (0 - 255).

Value ( )

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

Deprecated

Return Value
The 32 bit value of the TRgb. Has 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).

_Color16M ( )

TInt _Color16M()const [inline]

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

Return Value
The index (0 - 16777215) representing the nearest TRgb.

_Color16M ( TInt )

TRgb _Color16M(TIntaColor16M)[static, inline]

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
Return Value
The TRgb which represents the index exactly.

_Color16MA ( )

TUint _Color16MA()const [inline]

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

Return Value
The index (0 - 16777215) representing the nearest TRgb.

_Color16MA ( TUint )

TRgb _Color16MA(TUintaARGB)[static, inline]

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 /
Return Value
The TRgb which represents the index exactly.

_Color16MAP ( )

IMPORT_C TUint_Color16MAP()const

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

Return Value
The index which represents the TRgb values after multiplication with Alpha value.

_Color16MAP ( TUint )

IMPORT_C TRgb_Color16MAP(TUintaARGB)[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.
Return Value
The TRgb which represents the color channel and alpha information.

_Color16MU ( )

TInt _Color16MU()const [inline]

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

Return Value
The index (0 - 16777215) representing the nearest TRgb.

_Color16MU ( TInt )

TRgb _Color16MU(TInta0RGB)[static, inline]

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 /
Return Value
The TRgb which represents the index exactly.

_Color4K ( )

TInt _Color4K()const [inline]

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

Return Value
The index (0 - 4095) representing the nearest TRgb.

_Color4K ( TInt )

TRgb _Color4K(TIntaColor4K)[static, inline]

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
Return Value
Equivalent 24 bit colour.

_Color64K ( )

TInt _Color64K()const [inline]

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

Return Value
The index (0 - 65535) representing the nearest TRgb.

_Color64K ( TInt )

TRgb _Color64K(TIntaColor64K)[static, inline]

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
Return Value
Equivalent 24 bit colour.

_Gray16 ( )

TInt _Gray16()const [inline]

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

Return Value
The index (0 - 15) representing the nearest TRgb.

_Gray16 ( TInt )

TRgb _Gray16(TIntaGray16)[static, inline]

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.
Return Value
Equivalent 24 bit colour. Gray16 has 16 levels - the function returns r=g=b=17*c, where c=0, 1, ... 15.

_Gray2 ( )

TInt _Gray2()const [inline]

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

Return Value
The index (0 - 1) representing the nearest TRgb.

_Gray2 ( TInt )

TRgb _Gray2(TIntaGray2)[static, inline]

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.
Return Value
Equivalent 24 bit colour. Gray2 has only 2 levels (black and white), the function returns r=g=b=0 or r=g=b=255.

_Gray256 ( )

TInt _Gray256()const [inline]

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

Return Value
The index (0 - 255) representing the nearest TRgb.

_Gray256 ( TInt )

TRgb _Gray256(TIntaGray256)[static, inline]

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.
Return Value
Equivalent 24 bit colour. Gray256 has 256 levels- the function returns r=g=b=c, where c=0, 1, ... 255.

_Gray4 ( )

TInt _Gray4()const [inline]

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

Return Value
The index (0 - 3) representing the nearest TRgb.

_Gray4 ( TInt )

TRgb _Gray4(TIntaGray4)[static, inline]

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.
Return Value
Equivalent 24 bit colour. Gray4 has 4 levels- the function returns r=g=b=85*c, where c=0,1,2, or 3.

operator!= ( const TRgb & )

TBool 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.
Return Value
ETrue, if the colours are not equal; EFalse, otherwise.

operator& ( const TRgb & )

TRgb operator&(const TRgb &aColor)[inline]

Bitwise logical AND operator.

Parameters
aColorColour to be compared.
Return Value
Contains results of logical AND.

operator&= ( const 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.
Return Value
First operand-contains result of logical AND.

operator== ( const TRgb & )

TBool 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.
Return Value
ETrue. if the colours are equal; EFalse, otherwise.

operator^ ( const TRgb & )

TRgb operator^(const TRgb &aColor)[inline]

Bitwise EXCLUSIVE OR operator

Parameters
aColorColour to be compared.
Return Value
Contains results of logical EXCLUSIVE OR.

operator^= ( const 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.
Return Value
First operand contains result of logical Exclusive OR.

operator| ( const TRgb & )

TRgb operator|(const TRgb &aColor)[inline]

Bitwise logical OR operator.

Parameters
aColorColour to be compared.
Return Value
Contains results of logical OR.

operator|= ( const 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.
Return Value
First operand- contains result of logical OR.

operator~ ( )

TRgb operator~()const [inline]

Bitwise logical inversion operator.

Return Value
Contains results of logical inversion.