MWsGraphicsContext Class Reference

class MWsGraphicsContext : public MWsObjectProvider

Render Stage abstract graphics context.

This interface is provided by Render Stages. It abstracts the graphics context of the pixel target. The intention is to allow Render Stages to intercept draw operations so that they can be batched (to reduce flickering), modified (to provide transition effects), or re-directed (to alternate back-end architectures).

Inherits from

Nested Classes and Structures

Public Member Functions
void BitBlt (const TPoint &, const CFbsBitmap &)
void BitBlt (const TPoint &, const CFbsBitmap &, const TRect &)
void BitBltMasked (const TPoint &, const CFbsBitmap &, const TRect &, const CFbsBitmap &, TBool )
void BitBltMasked (const TPoint &, const CFbsBitmap &, const TRect &, const CFbsBitmap &, const TPoint &)
TRgb BrushColor ()
void Clear ()
void Clear (const TRect &)
const TRegion & ClippingRegion ()
void CopyRect (const TPoint &, const TRect &)
void DrawArc (const TRect &, const TPoint &, const TPoint &)
void DrawBitmap (const TRect &, const CFbsBitmap &)
void DrawBitmap (const TRect &, const CFbsBitmap &, const TRect &)
void DrawBitmapMasked (const TRect &, const CFbsBitmap &, const TRect &, const CFbsBitmap &, TBool )
void DrawEllipse (const TRect &)
void DrawLine (const TPoint &, const TPoint &)
void DrawLineBy (const TPoint &)
void DrawLineTo (const TPoint &)
void DrawPie (const TRect &, const TPoint &, const TPoint &)
void DrawPolyLine (const TArray < TPoint > &)
void DrawPolyLineNoEndPoint (const TArray < TPoint > &)
void DrawPolygon (const TArray < TPoint > &, TFillRule )
void DrawRect (const TRect &)
void DrawRoundRect (const TRect &, const TSize &)
void DrawText (const TDesC &, const TTextParameters *)
void DrawText (const TDesC &, const TTextParameters *, const TPoint &)
void DrawText (const TDesC &, const TTextParameters *, const TRect &)
void DrawText (const TDesC &, const TTextParameters *, const TRect &, TInt , TTextAlign , TInt )
void DrawTextVertical (const TDesC &, const TTextParameters *, TBool )
void DrawTextVertical (const TDesC &, const TTextParameters *, const TPoint &, TBool )
void DrawTextVertical (const TDesC &, const TTextParameters *, const TRect &, TBool )
void DrawTextVertical (const TDesC &, const TTextParameters *, const TRect &, TInt , TBool , TTextAlign , TInt )
void DrawTextVertical (const TDesC &, const TTextParameters *, const TRect &, TInt , TInt , TBool , TTextAlign , TInt )
TInt GetError ()
TBool HasBrushPattern ()
TBool HasFont ()
void MoveBy (const TPoint &)
void MoveTo (const TPoint &)
TPoint Origin ()
TRgb PenColor ()
void Plot (const TPoint &)
void Pop ()
TInt Push ()
void Reset ()
void ResetBrushPattern ()
void ResetClippingRegion ()
void ResetFont ()
void SetBrushColor (const TRgb &)
void SetBrushOrigin (const TPoint &)
void SetBrushPattern (const CFbsBitmap &)
void SetBrushPattern ( TInt )
void SetBrushStyle ( TBrushStyle )
void SetCharJustification ( TInt , TInt )
void SetClippingRegion (const TRegion &)
void SetDrawMode ( TDrawMode )
void SetFont (const CFont *)
void SetFontNoDuplicate (const CFont *)
void SetOrigin (const TPoint &)
void SetPenColor (const TRgb &)
void SetPenSize (const TSize &)
void SetPenStyle ( TPenStyle )
void SetStrikethroughStyle ( TFontStrikethrough )
void SetTextShadowColor (const TRgb &)
void SetUnderlineStyle ( TFontUnderline )
void SetWordJustification ( TInt , TInt )
TRgb TextShadowColor ()
void UpdateJustification (const TDesC &, const TTextParameters *)
void UpdateJustificationVertical (const TDesC &, const TTextParameters *, TBool )
Inherited Functions
MWsObjectProvider::ObjectInterface()
MWsObjectProvider::ObjectInterface()const
MWsObjectProvider::ResolveObjectInterface(TUint)
Public Member Enumerations
enum anonymous { EWsObjectInterfaceId  = KMWsGraphicsContext }
enum TBrushStyle {
ENullBrush , ESolidBrush , EPatternedBrush , EVerticalHatchBrush , EForwardDiagonalHatchBrush , EHorizontalHatchBrush , ERearwardDiagonalHatchBrush , ESquareCrossHatchBrush , EDiamondCrossHatchBrush
}
enum TDrawMode { EDrawModePEN  = 32, EDrawModeWriteAlpha  = 64 }
enum TFillRule { EAlternate , EWinding }
enum TFontStrikethrough { EStrikethroughOff , EStrikethroughOn }
enum TFontUnderline { EUnderlineOff , EUnderlineOn }
enum TPenStyle {
ENullPen , ESolidPen , EDottedPen , EDashedPen , EDotDashPen , EDotDotDashPen
}
enum TTextAlign { ELeft , ECenter , ERight }

Member Functions Documentation

BitBlt(const TPoint &, const CFbsBitmap &)

void BitBlt ( const TPoint & aDestPos,
const CFbsBitmap & aSourceBitmap
) [pure virtual]

Parameters

const TPoint & aDestPos
const CFbsBitmap & aSourceBitmap

BitBlt(const TPoint &, const CFbsBitmap &, const TRect &)

void BitBlt ( const TPoint & aDestPos,
const CFbsBitmap & aSourceBitmap,
const TRect & aSourceRect
) [pure virtual]

Parameters

const TPoint & aDestPos
const CFbsBitmap & aSourceBitmap
const TRect & aSourceRect

BitBltMasked(const TPoint &, const CFbsBitmap &, const TRect &, const CFbsBitmap &, TBool)

void BitBltMasked ( const TPoint & aDestPos,
const CFbsBitmap & aSourceBitmap,
const TRect & aSourceRect,
const CFbsBitmap & aMaskBitmap,
TBool aInvertMask
) [pure virtual]

Parameters

const TPoint & aDestPos
const CFbsBitmap & aSourceBitmap
const TRect & aSourceRect
const CFbsBitmap & aMaskBitmap
TBool aInvertMask

BitBltMasked(const TPoint &, const CFbsBitmap &, const TRect &, const CFbsBitmap &, const TPoint &)

void BitBltMasked ( const TPoint & aDestPos,
const CFbsBitmap & aSourceBitmap,
const TRect & aSourceRect,
const CFbsBitmap & aMaskBitmap,
const TPoint & aMaskPos
) [pure virtual]

Parameters

const TPoint & aDestPos
const CFbsBitmap & aSourceBitmap
const TRect & aSourceRect
const CFbsBitmap & aMaskBitmap
const TPoint & aMaskPos

BrushColor()

TRgb BrushColor ( ) const [pure virtual]

Clear()

void Clear ( ) [pure virtual]

Clear(const TRect &)

void Clear ( const TRect & aRect ) [pure virtual]

Parameters

const TRect & aRect

ClippingRegion()

const TRegion & ClippingRegion ( ) [pure virtual]

The clipping region currently being used

CopyRect(const TPoint &, const TRect &)

void CopyRect ( const TPoint & aOffset,
const TRect & aRect
) [pure virtual]

Parameters

const TPoint & aOffset
const TRect & aRect

DrawArc(const TRect &, const TPoint &, const TPoint &)

void DrawArc ( const TRect & aRect,
const TPoint & aStart,
const TPoint & aEnd
) [pure virtual]

Parameters

const TRect & aRect
const TPoint & aStart
const TPoint & aEnd

DrawBitmap(const TRect &, const CFbsBitmap &)

void DrawBitmap ( const TRect & aDestRect,
const CFbsBitmap & aSourceBitmap
) [pure virtual]

Parameters

const TRect & aDestRect
const CFbsBitmap & aSourceBitmap

DrawBitmap(const TRect &, const CFbsBitmap &, const TRect &)

void DrawBitmap ( const TRect & aDestRect,
const CFbsBitmap & aSourceBitmap,
const TRect & aSourceRect
) [pure virtual]

Parameters

const TRect & aDestRect
const CFbsBitmap & aSourceBitmap
const TRect & aSourceRect

DrawBitmapMasked(const TRect &, const CFbsBitmap &, const TRect &, const CFbsBitmap &, TBool)

void DrawBitmapMasked ( const TRect & aDestRect,
const CFbsBitmap & aSourceBitmap,
const TRect & aSourceRect,
const CFbsBitmap & aMaskBitmap,
TBool aInvertMask
) [pure virtual]

Parameters

const TRect & aDestRect
const CFbsBitmap & aSourceBitmap
const TRect & aSourceRect
const CFbsBitmap & aMaskBitmap
TBool aInvertMask

DrawEllipse(const TRect &)

void DrawEllipse ( const TRect & aRect ) [pure virtual]

Parameters

const TRect & aRect

DrawLine(const TPoint &, const TPoint &)

void DrawLine ( const TPoint & aStart,
const TPoint & aEnd
) [pure virtual]

Parameters

const TPoint & aStart
const TPoint & aEnd

DrawLineBy(const TPoint &)

void DrawLineBy ( const TPoint & aVector ) [pure virtual]

Parameters

const TPoint & aVector

DrawLineTo(const TPoint &)

void DrawLineTo ( const TPoint & aPoint ) [pure virtual]

Parameters

const TPoint & aPoint

DrawPie(const TRect &, const TPoint &, const TPoint &)

void DrawPie ( const TRect & aRect,
const TPoint & aStart,
const TPoint & aEnd
) [pure virtual]

Parameters

const TRect & aRect
const TPoint & aStart
const TPoint & aEnd

DrawPolyLine(const TArray< TPoint > &)

void DrawPolyLine ( const TArray < TPoint > & aPointList ) [pure virtual]

Parameters

const TArray < TPoint > & aPointList

DrawPolyLineNoEndPoint(const TArray< TPoint > &)

void DrawPolyLineNoEndPoint ( const TArray < TPoint > & aPointList ) [pure virtual]

Parameters

const TArray < TPoint > & aPointList

DrawPolygon(const TArray< TPoint > &, TFillRule)

void DrawPolygon ( const TArray < TPoint > & aPointList,
TFillRule aFillRule = EAlternate
) [pure virtual]

Parameters

const TArray < TPoint > & aPointList
TFillRule aFillRule = EAlternate

DrawRect(const TRect &)

void DrawRect ( const TRect & aRect ) [pure virtual]

Parameters

const TRect & aRect

DrawRoundRect(const TRect &, const TSize &)

void DrawRoundRect ( const TRect & aRect,
const TSize & aEllipse
) [pure virtual]

Parameters

const TRect & aRect
const TSize & aEllipse

DrawText(const TDesC &, const TTextParameters *)

void DrawText ( const TDesC & aText,
const TTextParameters * aParam
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam

DrawText(const TDesC &, const TTextParameters *, const TPoint &)

void DrawText ( const TDesC & aText,
const TTextParameters * aParam,
const TPoint & aPosition
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
const TPoint & aPosition

DrawText(const TDesC &, const TTextParameters *, const TRect &)

void DrawText ( const TDesC & aText,
const TTextParameters * aParam,
const TRect & aClipRect
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
const TRect & aClipRect

DrawText(const TDesC &, const TTextParameters *, const TRect &, TInt, TTextAlign, TInt)

void DrawText ( const TDesC & aText,
const TTextParameters * aParam,
const TRect & aClipFillRect,
TInt aBaselineOffset,
TTextAlign aHrz = ELeft,
TInt aMargin = 0
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
const TRect & aClipFillRect
TInt aBaselineOffset
TTextAlign aHrz = ELeft
TInt aMargin = 0

DrawTextVertical(const TDesC &, const TTextParameters *, TBool)

void DrawTextVertical ( const TDesC & aText,
const TTextParameters * aParam,
TBool aUp
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
TBool aUp

DrawTextVertical(const TDesC &, const TTextParameters *, const TPoint &, TBool)

void DrawTextVertical ( const TDesC & aText,
const TTextParameters * aParam,
const TPoint & aPosition,
TBool aUp
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
const TPoint & aPosition
TBool aUp

DrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TBool)

void DrawTextVertical ( const TDesC & aText,
const TTextParameters * aParam,
const TRect & aClipRect,
TBool aUp
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
const TRect & aClipRect
TBool aUp

DrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TInt, TBool, TTextAlign, TInt)

void DrawTextVertical ( const TDesC & aText,
const TTextParameters * aParam,
const TRect & aClipRect,
TInt aBaselineOffset,
TBool aUp,
TTextAlign aVert = ELeft,
TInt aMargin = 0
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
const TRect & aClipRect
TInt aBaselineOffset
TBool aUp
TTextAlign aVert = ELeft
TInt aMargin = 0

DrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TInt, TInt, TBool, TTextAlign, TInt)

void DrawTextVertical ( const TDesC & aText,
const TTextParameters * aParam,
const TRect & aClipRect,
TInt aBaselineOffset,
TInt aTextWidth,
TBool aUp,
TTextAlign aVert = ELeft,
TInt aMargin = 0
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
const TRect & aClipRect
TInt aBaselineOffset
TInt aTextWidth
TBool aUp
TTextAlign aVert = ELeft
TInt aMargin = 0

GetError()

TInt GetError ( ) [pure virtual]

HasBrushPattern()

TBool HasBrushPattern ( ) const [pure virtual]

HasFont()

TBool HasFont ( ) const [pure virtual]

MoveBy(const TPoint &)

void MoveBy ( const TPoint & aVector ) [pure virtual]

Parameters

const TPoint & aVector

MoveTo(const TPoint &)

void MoveTo ( const TPoint & aPoint ) [pure virtual]

Parameters

const TPoint & aPoint

Origin()

TPoint Origin ( ) const [pure virtual]

The origin of the GC relative to the screen's origin

PenColor()

TRgb PenColor ( ) const [pure virtual]

Plot(const TPoint &)

void Plot ( const TPoint & aPoint ) [pure virtual]

Parameters

const TPoint & aPoint

Pop()

void Pop ( ) [pure virtual]

Restores the last GC state that was saved.

Push()

TInt Push ( ) [pure virtual]

Saves the state of the GC to an internal buffer. Several GC states can be saved in a FILO. Do not restore a GC (using Pop() ) that wasn't properly saved!

Reset()

void Reset ( ) [pure virtual]

ResetBrushPattern()

void ResetBrushPattern ( ) [pure virtual]

ResetClippingRegion()

void ResetClippingRegion ( ) [pure virtual]

ResetFont()

void ResetFont ( ) [pure virtual]

SetBrushColor(const TRgb &)

void SetBrushColor ( const TRgb & aColor ) [pure virtual]

Parameters

const TRgb & aColor

SetBrushOrigin(const TPoint &)

void SetBrushOrigin ( const TPoint & aOrigin ) [pure virtual]

Parameters

const TPoint & aOrigin

SetBrushPattern(const CFbsBitmap &)

void SetBrushPattern ( const CFbsBitmap & aBitmap ) [pure virtual]

Parameters

const CFbsBitmap & aBitmap

SetBrushPattern(TInt)

void SetBrushPattern ( TInt aFbsBitmapHandle ) [pure virtual]

Parameters

TInt aFbsBitmapHandle

SetBrushStyle(TBrushStyle)

void SetBrushStyle ( TBrushStyle aBrushStyle ) [pure virtual]

Parameters

TBrushStyle aBrushStyle

SetCharJustification(TInt, TInt)

void SetCharJustification ( TInt aExcessWidth,
TInt aNumChars
) [pure virtual]

Parameters

TInt aExcessWidth
TInt aNumChars

SetClippingRegion(const TRegion &)

void SetClippingRegion ( const TRegion & aRegion ) [pure virtual]

Parameters

const TRegion & aRegion

SetDrawMode(TDrawMode)

void SetDrawMode ( TDrawMode aDrawMode ) [pure virtual]

Parameters

TDrawMode aDrawMode

SetFont(const CFont *)

void SetFont ( const CFont * aFont ) [pure virtual]

Parameters

const CFont * aFont

SetFontNoDuplicate(const CFont *)

void SetFontNoDuplicate ( const CFont * aFont ) [pure virtual]

Parameters

const CFont * aFont

SetOrigin(const TPoint &)

void SetOrigin ( const TPoint & aPoint =  TPoint (0, 0) ) [pure virtual]

Parameters

const TPoint & aPoint =  TPoint (0, 0)

SetPenColor(const TRgb &)

void SetPenColor ( const TRgb & aColor ) [pure virtual]

Parameters

const TRgb & aColor

SetPenSize(const TSize &)

void SetPenSize ( const TSize & aSize ) [pure virtual]

Parameters

const TSize & aSize

SetPenStyle(TPenStyle)

void SetPenStyle ( TPenStyle aPenStyle ) [pure virtual]

Parameters

TPenStyle aPenStyle

SetStrikethroughStyle(TFontStrikethrough)

void SetStrikethroughStyle ( TFontStrikethrough aStrikethroughStyle ) [pure virtual]

Parameters

TFontStrikethrough aStrikethroughStyle

SetTextShadowColor(const TRgb &)

void SetTextShadowColor ( const TRgb & aColor ) [pure virtual]

Parameters

const TRgb & aColor

SetUnderlineStyle(TFontUnderline)

void SetUnderlineStyle ( TFontUnderline aUnderlineStyle ) [pure virtual]

Parameters

TFontUnderline aUnderlineStyle

SetWordJustification(TInt, TInt)

void SetWordJustification ( TInt aExcessWidth,
TInt aNumGaps
) [pure virtual]

Parameters

TInt aExcessWidth
TInt aNumGaps

TextShadowColor()

TRgb TextShadowColor ( ) const [pure virtual]

UpdateJustification(const TDesC &, const TTextParameters *)

void UpdateJustification ( const TDesC & aText,
const TTextParameters * aParam
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam

UpdateJustificationVertical(const TDesC &, const TTextParameters *, TBool)

void UpdateJustificationVertical ( const TDesC & aText,
const TTextParameters * aParam,
TBool aUp
) [pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
TBool aUp

Member Enumerations Documentation

Enum anonymous

Enumerators

EWsObjectInterfaceId = KMWsGraphicsContext

Enum TBrushStyle

Brush styles.

Enumerators

ENullBrush

The brush fill has no effect (default).

ESolidBrush

The brush fills with a solid single colour, determined by SetBrushColor() and the drawing mode.

EPatternedBrush

The brush fills with a selected bitmap pattern, set by UseBrushPattern().

EVerticalHatchBrush

The brush fills with vertical hatching lines going from top to bottom.

EForwardDiagonalHatchBrush

The brush fills with diagonal hatching lines going from bottom left to top right.

EHorizontalHatchBrush

The brush fills with horizontal hatching lines going from left to right.

ERearwardDiagonalHatchBrush

The brush fills with rearward diagonal hatching lines going from top left to bottom right.

ESquareCrossHatchBrush

The brush fills with horizontal and vertical hatching lines going from left to right plus lines going from top to bottom giving the effect of a grid of small squares

EDiamondCrossHatchBrush

The brush fills with forward diagonal and rearward diagonal hatching lines going from bottom left to top right plus lines going from top left to bottom right giving the effect of a grid of small diamonds.

Enum TDrawMode

Drawing modes. The drawing modes define the way that the pen and brush colors are drawn, EDrawModePEN means do alpha blending if appropriate, EDrawModeWriteAlpha means don't do alpha blending.

SetDrawMode()

Enumerators

EDrawModePEN = 32

Uses both pen and brush colour as they are.

EDrawModeWriteAlpha = 64

Writes alpha information in the source directly into the destination, rather than blending.

Enum TFillRule

Rules used to fill self-intersecting polygons.

The filling of a polygon proceeds as follows: for a given point in the polygon, then:

if the rule is TFillRule::EAlternate (default) and it has an odd winding number, then fill the surrounding area.

if the rule is TFillRule::EWinding and it has a winding number greater than zero, then fill the surrounding area.

Enumerators

EAlternate

Only fill areas with odd winding numbers.

EWinding

Fill areas with winding numbers greater than zero.

Enum TFontStrikethrough

Font strike-through flags.

Enumerators

EStrikethroughOff

Font is not struck-through.

EStrikethroughOn

Font is struck-through.

Enum TFontUnderline

Font underline flags.

Enumerators

EUnderlineOff

Font is not underlined.

EUnderlineOn

Font is underlined.

Enum TPenStyle

Pen styles. The screen pattern unit in each definition below describes the pattern drawn by the line 1 represents a pixel drawn, 0 represents a pixel that is not affected.

Enumerators

ENullPen

The pen does not draw. Screen pattern unit = 00...

ESolidPen

A solid line (default). Screen pattern unit = 11...

EDottedPen

A dotted line. Screen pattern unit = 1000...

EDashedPen

A dashed line. Screen pattern unit = 111000...

EDotDashPen

A line of alternating dashes and dots. Screen pattern unit = 1111001100...

EDotDotDashPen

A line of alternating single dashes and pairs of dots. Screen pattern unit = 11110011001100...

Enum TTextAlign

Text alignment.

Enumerators

ELeft

Text is left-aligned.

ECenter

Text is centred.

ERight

Text is right-aligned.