class ColorUtils |
Provides static functions for manipulating colours.
TDisplayMode
Public Member Functions | |
---|---|
IMPORT_C TRgb | ColorAdjust ( TRgb , TInt ) |
IMPORT_C void | CreateGradientBitmapL ( CFbsBitmap &, const RWsSession &, TInt , TBitmapOrientation , TRgb , TRgb ) |
IMPORT_C CColorList * | CreateSystemColorListL ( RFs &) |
IMPORT_C CColorList * | CreateSystemColorListL ( RFs &, const CColorList &) |
IMPORT_C void | GetRgbDerivedBorderColors ( TGulBorder::TColors &, TRgb , TDisplayMode ) |
IMPORT_C TRgb | RgbDarkerColor ( TRgb , TDisplayMode ) |
IMPORT_C TRgb | RgbLighterColor ( TRgb , TDisplayMode ) |
IMPORT_C TRgb | RgbMidDarkerColor ( TRgb , TDisplayMode ) |
IMPORT_C void | UpdateSystemColorListL ( RFs &, CColorList &) |
Public Member Enumerations | |
---|---|
enum | TBitmapOrientation { EBitmapOrientationVertical , EBitmapOrientationHorizontal } |
IMPORT_C TRgb | ColorAdjust | ( | TRgb | aColor, |
TInt | aPercentage | |||
) | [static] |
Brightens or darkens a 24-bit colour by a percentage.
If the percentage given is less than 100%, a darker colour will be returned. The algorithm brightens or darkens each of the R, G and B channels equally.
IMPORT_C void | CreateGradientBitmapL | ( | CFbsBitmap & | aBitmap, |
const RWsSession & | aWs, | |||
TInt | aBreadth, | |||
TBitmapOrientation | aOrientation, | |||
TRgb | aStartColor, | |||
TRgb | aEndColor | |||
) | [static] |
Creates a CFbsBitmap containing a colour gradient.
To create a gradient, the end colour aEndColor must be different to the start colour aStartingColor.
CFbsBitmap & aBitmap | Bitmap which on return contains the colour gradient. |
const RWsSession & aWs | Handle to a window server session. |
TInt aBreadth | The width or the height of the bitmap, depending on the orientation. |
TBitmapOrientation aOrientation | The bitmap's orientation (vertical or horizontal). |
TRgb aStartColor | The start color. |
TRgb aEndColor | The end color. |
IMPORT_C CColorList * | CreateSystemColorListL | ( | RFs & | aFs | ) | [static] |
RFs & aFs |
IMPORT_C CColorList * | CreateSystemColorListL | ( | RFs & | aFs, |
const CColorList & | aColorList | |||
) | [static] |
RFs & aFs | |
const CColorList & aColorList |
IMPORT_C void | GetRgbDerivedBorderColors | ( | TGulBorder::TColors & | aBorderColors, |
TRgb | aBackgroundColor, | |||
TDisplayMode | aMode | |||
) | [static] |
Gets the colours to use for a control's border.
Lighter and darker tones in the border are derived from the specified TRgb background colour using an algorithm operating on the RGB value of this color or a lookup table, depending on the display mode aMode. It sets the values of the aBorderColors members iBack, iLight, iMidlight, iMid, and iDark.
TGulBorder::TColors & aBorderColors | On return, the derived border colours. |
TRgb aBackgroundColor | The control's background colour. |
TDisplayMode aMode | The display mode. |
IMPORT_C TRgb | RgbDarkerColor | ( | TRgb | aRgb, |
TDisplayMode | aMode | |||
) | [static] |
Creates a darker color.
TRgb aRgb | The RGB color. |
TDisplayMode aMode | The display mode, which indicates the screen output of the colour e.g. 256 colour display mode (8 bpp). |
IMPORT_C TRgb | RgbLighterColor | ( | TRgb | aRgb, |
TDisplayMode | aMode | |||
) | [static] |
Creates a lighter colour.
TRgb aRgb | The Rgb colour. |
TDisplayMode aMode | The display mode, which indicates the screen output of the colour e.g. 256 colour display mode (8 bpp). |
IMPORT_C TRgb | RgbMidDarkerColor | ( | TRgb | aRgb, |
TDisplayMode | aMode | |||
) | [static] |
Creates a medium dark version of the colour.
This function darkens the colour 50% less than RgbDarkerColor() .
TRgb aRgb | The Rgb color. |
TDisplayMode aMode | The display mode, which indicates the screen output of the colour e.g. 256 colour display mode (8 bpp). |
IMPORT_C void | UpdateSystemColorListL | ( | RFs & | aFs, |
CColorList & | aColorList | |||
) | [static] |
RFs & aFs | |
CColorList & aColorList |
The orientation of a bitmap.
EBitmapOrientationVertical |
The bitmap is vertical. |
EBitmapOrientationHorizontal |
The bitmap is horizontal. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.