|
||
class CCoeBrushAndPenContext : public CBase, public MCoeControlContext;
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.
MCoeControlContext
- Interface to allow sharing of graphics settings between controls.
CBase
-
Base class for all classes to be instantiated on the heap.
CCoeBrushAndPenContext
- Brush and pen graphics context.
Defined in CCoeBrushAndPenContext
:
BrushBitmap()const
Gets a reference to the bitmap used to pattern the drawing brush.BrushColor()const
Gets the brush colour.BrushStyle()const
Gets the brush style.NewL()
Allocates and constructs a new brush and pen graphics context object.PenColor()const
Gets the pen colour.PrepareContext(CWindowGc &)const
Prepares the graphics context for drawing the control in its normal state.SetBrushBitmap(const CFbsBitmap &)
Sets the drawing brush pattern bitmap.SetBrushColor(TRgb)
Sets the brush colour.SetPenColor(TRgb)
Sets the pen colour.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from MCoeControlContext
:
ActivateContext(CWindowGc &,RDrawableWindow &)const
Activates a graphics context for the specified window.ResetContext(CWindowGc &)const
Resets the control context.IMPORT_C static CCoeBrushAndPenContext* NewL();
Allocates and constructs a new brush and pen graphics context object.
|
IMPORT_C void SetBrushStyle(CWindowGc::TBrushStyle aBrushStyle);
Sets the brush style.
|
IMPORT_C void SetBrushColor(TRgb aColor);
Sets the brush colour.
|
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.
|
IMPORT_C void SetPenColor(TRgb aColor);
Sets the pen colour.
|
IMPORT_C CWindowGc::TBrushStyle BrushStyle() const;
Gets the brush style.
|
IMPORT_C TRgb BrushColor() const;
Gets the brush colour.
|
IMPORT_C const CFbsBitmap& BrushBitmap() const;
Gets a reference to the bitmap used to pattern the drawing brush.
|
IMPORT_C TRgb PenColor() const;
Gets the pen colour.
|
protected: IMPORT_C virtual void PrepareContext(CWindowGc &aGc) 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
|