CCoeBrushAndPenContext Class Reference

#include <mw/coeccntx.h>

Link against: cone.lib

class CCoeBrushAndPenContext : public CBase, public MCoeControlContext

Inherits from

Detailed Description

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.

Member Function Documentation

BrushBitmap ( )

IMPORT_C const CFbsBitmap &BrushBitmap()const

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

Return Value
The pattern bitmap.

BrushColor ( )

IMPORT_C TRgbBrushColor()const

Gets the brush colour.

Return Value
The current brush colour.

BrushStyle ( )

IMPORT_C CWindowGc::TBrushStyleBrushStyle()const

Gets the brush style.

Return Value
The current brush style.

NewL ( )

IMPORT_C CCoeBrushAndPenContext *NewL()[static]

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

Return Value
A pointer to the newly created object

PenColor ( )

IMPORT_C TRgbPenColor()const

Gets the pen colour.

Return Value
The current pen colour.

PrepareContext ( CWindowGc & )

IMPORT_C voidPrepareContext(CWindowGc &aGc)const [protected, virtual]

Reimplemented from MCoeControlContext::PrepareContext(CWindowGc &)const

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
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
aBitmapThe pattern bitmap.

SetBrushColor ( TRgb )

IMPORT_C voidSetBrushColor(TRgbaColor)

Sets the brush colour.

Parameters
aColorThe brush colour.

SetBrushStyle ( CWindowGc::TBrushStyle )

IMPORT_C voidSetBrushStyle(CWindowGc::TBrushStyleaBrushStyle)

Sets the brush style.

Parameters
aBrushStyleThe brush style to be used for drawing.

SetPenColor ( TRgb )

IMPORT_C voidSetPenColor(TRgbaColor)

Sets the pen colour.

Parameters
aColorThe pen colour.