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

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 TRgb BrushColor ( ) const

Gets the brush colour.

BrushStyle()

IMPORT_C CWindowGc::TBrushStyle BrushStyle ( ) 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 TRgb PenColor ( ) const

Gets the pen colour.

PrepareContext(CWindowGc &)

IMPORT_C void PrepareContext ( 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 & aGc The window graphics context.

SetBrushBitmap(const CFbsBitmap &)

IMPORT_C void SetBrushBitmap ( 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 & aBitmap The pattern bitmap.

SetBrushColor(TRgb)

IMPORT_C void SetBrushColor ( TRgb aColor )

Sets the brush colour.

Parameters

TRgb aColor The brush colour.

SetBrushStyle(CWindowGc::TBrushStyle)

IMPORT_C void SetBrushStyle ( CWindowGc::TBrushStyle aBrushStyle )

Sets the brush style.

Parameters

CWindowGc::TBrushStyle aBrushStyle The brush style to be used for drawing.

SetPenColor(TRgb)

IMPORT_C void SetPenColor ( TRgb aColor )

Sets the pen colour.

Parameters

TRgb aColor The 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]