CCoeBrushAndPenContext Class Reference

class CCoeBrushAndPenContext : public CBase

Brush and pen graphics context.

This class allows an MCoeControlContext to be instantiated and used to set brush and pen properties before drawing a control.

Inherits from

  • CCoeBrushAndPenContext

Constructor & Destructor Documentation

CCoeBrushAndPenContext()

CCoeBrushAndPenContext()[private]

Member Functions Documentation

BrushBitmap()

IMPORT_C const CFbsBitmap &BrushBitmap()const

Gets a reference to the bitmap used to pattern the drawing brush.

BrushColor()

IMPORT_C TRgbBrushColor()const

Gets the brush colour.

BrushStyle()

IMPORT_C CWindowGc::TBrushStyleBrushStyle()const

Gets the brush style.

NewL()

IMPORT_C CCoeBrushAndPenContext *NewL()[static]

Allocates and constructs a new brush and pen graphics context object.

PenColor()

IMPORT_C TRgbPenColor()const

Gets the pen colour.

PrepareContext(CWindowGc &)

IMPORT_C voidPrepareContext(CWindowGc &aGc)const [protected]

Prepares the graphics context for drawing the control in its normal state.

The function uses the brush and pen properties which have been set, or uses a black pen and a black solid brush by default. When a bitmap has been set a patterned style brush is selected

Parameters

CWindowGc & aGcThe window graphics context.

SetBrushBitmap(const CFbsBitmap &)

IMPORT_C voidSetBrushBitmap(const CFbsBitmap &aBitmap)

Sets the drawing brush pattern bitmap.

When a bitmap has been set, a patterned style brush is selected automatically.

Parameters

const CFbsBitmap & aBitmapThe pattern bitmap.

SetBrushColor(TRgb)

IMPORT_C voidSetBrushColor(TRgbaColor)

Sets the brush colour.

Parameters

TRgb aColorThe brush colour.

SetBrushStyle(CWindowGc::TBrushStyle)

IMPORT_C voidSetBrushStyle(CWindowGc::TBrushStyleaBrushStyle)

Sets the brush style.

Parameters

CWindowGc::TBrushStyle aBrushStyleThe brush style to be used for drawing.

SetPenColor(TRgb)

IMPORT_C voidSetPenColor(TRgbaColor)

Sets the pen colour.

Parameters

TRgb aColorThe pen colour.

Member Data Documentation

const CFbsBitmap * iBitmap

const CFbsBitmap *iBitmap[private]

TRgb iBrushColor

TRgb iBrushColor[private]

CWindowGc::TBrushStyle iBrushStyle

CWindowGc::TBrushStyle iBrushStyle[private]

TRgb iPenColor

TRgb iPenColor[private]