CCoeBrushAndPenContext Class Reference

#include <mw/coeccntx.h>

Link against: cone.lib

class CCoeBrushAndPenContext : public CBase

Inherits from

  • CCoeBrushAndPenContext

    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.

    Returns: The pattern bitmap.

    BrushColor ( )

    IMPORT_C TRgbBrushColor()const

    Gets the brush colour.

    Returns: The current brush colour.

    BrushStyle ( )

    IMPORT_C CWindowGc::TBrushStyleBrushStyle()const

    Gets the brush style.

    Returns: The current brush style.

    NewL ( )

    IMPORT_C CCoeBrushAndPenContext *NewL()[static]

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

    Returns: A pointer to the newly created object

    PenColor ( )

    IMPORT_C TRgbPenColor()const

    Gets the pen colour.

    Returns: The current 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

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

    ParameterDescription
    aBitmapThe pattern bitmap.

    SetBrushColor ( TRgb )

    IMPORT_C voidSetBrushColor(TRgbaColor)

    Sets the brush colour.

    ParameterDescription
    aColorThe brush colour.

    SetBrushStyle ( CWindowGc::TBrushStyle )

    IMPORT_C voidSetBrushStyle(CWindowGc::TBrushStyleaBrushStyle)

    Sets the brush style.

    ParameterDescription
    aBrushStyleThe brush style to be used for drawing.

    SetPenColor ( TRgb )

    IMPORT_C voidSetPenColor(TRgbaColor)

    Sets the pen colour.

    ParameterDescription
    aColorThe pen colour.