#include <mw/coeccntx.h>
class CCoeBrushAndPenContext : public CBase |
Public Member Functions | |
---|---|
IMPORT_C const CFbsBitmap & | BrushBitmap() |
IMPORT_C TRgb | BrushColor() |
IMPORT_C CWindowGc::TBrushStyle | BrushStyle() |
IMPORT_C CCoeBrushAndPenContext * | NewL() |
IMPORT_C TRgb | PenColor() |
IMPORT_C void | SetBrushBitmap(const CFbsBitmap &) |
IMPORT_C void | SetBrushColor(TRgb) |
IMPORT_C void | SetBrushStyle(CWindowGc::TBrushStyle) |
IMPORT_C void | SetPenColor(TRgb) |
Protected Member Functions | |
---|---|
IMPORT_C void | PrepareContext(CWindowGc &) |
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.
IMPORT_C const CFbsBitmap & | BrushBitmap | ( | ) | const |
Gets a reference to the bitmap used to pattern the drawing brush.
Returns: The pattern bitmap.
IMPORT_C CWindowGc::TBrushStyle | BrushStyle | ( | ) | const |
Gets the brush style.
Returns: The current brush style.
IMPORT_C CCoeBrushAndPenContext * | NewL | ( | ) | [static] |
Allocates and constructs a new brush and pen graphics context object.
Returns: A pointer to the newly created object
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
Parameter | Description |
---|---|
aGc | The window graphics context. |
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.
Parameter | Description |
---|---|
aBitmap | The pattern bitmap. |
IMPORT_C void | SetBrushColor | ( | TRgb | aColor | ) |
Sets the brush colour.
Parameter | Description |
---|---|
aColor | The brush colour. |
IMPORT_C void | SetBrushStyle | ( | CWindowGc::TBrushStyle | aBrushStyle | ) |
Sets the brush style.
Parameter | Description |
---|---|
aBrushStyle | The brush style to be used for drawing. |