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
voidBitBlt(const TPoint &, const CFbsBitmap &)
voidBitBlt(const TPoint &, const CFbsBitmap &, const TRect &)
voidBitBltMasked(const TPoint &, const CFbsBitmap &, const TRect &, const CFbsBitmap &, TBool)
voidBitBltMasked(const TPoint &, const CFbsBitmap &, const TRect &, const CFbsBitmap &, const TPoint &)
TRgb BrushColor()
voidClear()
voidClear(const TRect &)
const TRegion &ClippingRegion()
voidCopyRect(const TPoint &, const TRect &)
voidDrawArc(const TRect &, const TPoint &, const TPoint &)
voidDrawBitmap(const TRect &, const CFbsBitmap &)
voidDrawBitmap(const TRect &, const CFbsBitmap &, const TRect &)
voidDrawBitmapMasked(const TRect &, const CFbsBitmap &, const TRect &, const CFbsBitmap &, TBool)
voidDrawEllipse(const TRect &)
voidDrawLine(const TPoint &, const TPoint &)
voidDrawLineBy(const TPoint &)
voidDrawLineTo(const TPoint &)
voidDrawPie(const TRect &, const TPoint &, const TPoint &)
voidDrawPolyLine(const TArray< TPoint > &)
voidDrawPolyLineNoEndPoint(const TArray< TPoint > &)
voidDrawPolygon(const TArray< TPoint > &, TFillRule)
voidDrawRect(const TRect &)
voidDrawRoundRect(const TRect &, const TSize &)
voidDrawText(const TDesC &, const TTextParameters *)
voidDrawText(const TDesC &, const TTextParameters *, const TPoint &)
voidDrawText(const TDesC &, const TTextParameters *, const TRect &)
voidDrawText(const TDesC &, const TTextParameters *, const TRect &, TInt, TTextAlign, TInt)
voidDrawTextVertical(const TDesC &, const TTextParameters *, TBool)
voidDrawTextVertical(const TDesC &, const TTextParameters *, const TPoint &, TBool)
voidDrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TBool)
voidDrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TInt, TBool, TTextAlign, TInt)
voidDrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TInt, TInt, TBool, TTextAlign, TInt)
TInt GetError()
TBool HasBrushPattern()
TBool HasFont()
voidMoveBy(const TPoint &)
voidMoveTo(const TPoint &)
TPoint Origin()
TRgb PenColor()
voidPlot(const TPoint &)
voidPop()
TInt Push()
voidReset()
voidResetBrushPattern()
voidResetClippingRegion()
voidResetFont()
voidSetBrushColor(const TRgb &)
voidSetBrushOrigin(const TPoint &)
voidSetBrushPattern(const CFbsBitmap &)
voidSetBrushPattern(TInt)
voidSetBrushStyle(TBrushStyle)
voidSetCharJustification(TInt, TInt)
voidSetClippingRegion(const TRegion &)
voidSetDrawMode(TDrawMode)
voidSetFont(const CFont *)
voidSetFontNoDuplicate(const CFont *)
voidSetOrigin(const TPoint &)
voidSetPenColor(const TRgb &)
voidSetPenSize(const TSize &)
voidSetPenStyle(TPenStyle)
voidSetStrikethroughStyle(TFontStrikethrough)
voidSetTextShadowColor(const TRgb &)
voidSetUnderlineStyle(TFontUnderline)
voidSetWordJustification(TInt, TInt)
TRgb TextShadowColor()
voidUpdateJustification(const TDesC &, const TTextParameters *)
voidUpdateJustificationVertical(const TDesC &, const TTextParameters *, TBool)
Inherited Functions
MWsObjectProvider::ObjectInterface()
MWsObjectProvider::ObjectInterface()const
MWsObjectProvider::ResolveObjectInterface(TUint)
Public Member Enumerations
enumanonymous { EWsObjectInterfaceId = KMWsGraphicsContext }
enumTBrushStyle {
ENullBrush, ESolidBrush, EPatternedBrush, EVerticalHatchBrush, EForwardDiagonalHatchBrush, EHorizontalHatchBrush, ERearwardDiagonalHatchBrush, ESquareCrossHatchBrush, EDiamondCrossHatchBrush
}
enumTDrawMode { EDrawModePEN = 32, EDrawModeWriteAlpha = 64 }
enumTFillRule { EAlternate, EWinding }
enumTFontStrikethrough { EStrikethroughOff, EStrikethroughOn }
enumTFontUnderline { EUnderlineOff, EUnderlineOn }
enumTPenStyle {
ENullPen, ESolidPen, EDottedPen, EDashedPen, EDotDashPen, EDotDotDashPen
}
enumTTextAlign { ELeft, ECenter, ERight }

Member Functions Documentation

BitBlt(const TPoint &, const CFbsBitmap &)

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

Parameters

const TPoint & aDestPos
const CFbsBitmap & aSourceBitmap

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

voidBitBlt(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)

voidBitBltMasked(const TPoint &aDestPos,
const CFbsBitmap &aSourceBitmap,
const TRect &aSourceRect,
const CFbsBitmap &aMaskBitmap,
TBoolaInvertMask
)[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 &)

voidBitBltMasked(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()

voidClear()[pure virtual]

Clear(const TRect &)

voidClear(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 &)

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

Parameters

const TPoint & aOffset
const TRect & aRect

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

voidDrawArc(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 &)

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

Parameters

const TRect & aDestRect
const CFbsBitmap & aSourceBitmap

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

voidDrawBitmap(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)

voidDrawBitmapMasked(const TRect &aDestRect,
const CFbsBitmap &aSourceBitmap,
const TRect &aSourceRect,
const CFbsBitmap &aMaskBitmap,
TBoolaInvertMask
)[pure virtual]

Parameters

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

DrawEllipse(const TRect &)

voidDrawEllipse(const TRect &aRect)[pure virtual]

Parameters

const TRect & aRect

DrawLine(const TPoint &, const TPoint &)

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

Parameters

const TPoint & aStart
const TPoint & aEnd

DrawLineBy(const TPoint &)

voidDrawLineBy(const TPoint &aVector)[pure virtual]

Parameters

const TPoint & aVector

DrawLineTo(const TPoint &)

voidDrawLineTo(const TPoint &aPoint)[pure virtual]

Parameters

const TPoint & aPoint

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

voidDrawPie(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 > &)

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

Parameters

const TArray< TPoint > & aPointList

DrawPolyLineNoEndPoint(const TArray< TPoint > &)

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

Parameters

const TArray< TPoint > & aPointList

DrawPolygon(const TArray< TPoint > &, TFillRule)

voidDrawPolygon(const TArray< TPoint > &aPointList,
TFillRuleaFillRule = EAlternate
)[pure virtual]

Parameters

const TArray< TPoint > & aPointList
TFillRule aFillRule = EAlternate

DrawRect(const TRect &)

voidDrawRect(const TRect &aRect)[pure virtual]

Parameters

const TRect & aRect

DrawRoundRect(const TRect &, const TSize &)

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

Parameters

const TRect & aRect
const TSize & aEllipse

DrawText(const TDesC &, const TTextParameters *)

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

Parameters

const TDesC & aText
const TTextParameters * aParam

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

voidDrawText(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 &)

voidDrawText(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)

voidDrawText(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aClipFillRect,
TIntaBaselineOffset,
TTextAlignaHrz = ELeft,
TIntaMargin = 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)

voidDrawTextVertical(const TDesC &aText,
const TTextParameters *aParam,
TBoolaUp
)[pure virtual]

Parameters

const TDesC & aText
const TTextParameters * aParam
TBool aUp

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

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

Parameters

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

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

voidDrawTextVertical(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aClipRect,
TBoolaUp
)[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)

voidDrawTextVertical(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aClipRect,
TIntaBaselineOffset,
TBoolaUp,
TTextAlignaVert = ELeft,
TIntaMargin = 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)

voidDrawTextVertical(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aClipRect,
TIntaBaselineOffset,
TIntaTextWidth,
TBoolaUp,
TTextAlignaVert = ELeft,
TIntaMargin = 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 &)

voidMoveBy(const TPoint &aVector)[pure virtual]

Parameters

const TPoint & aVector

MoveTo(const TPoint &)

voidMoveTo(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 &)

voidPlot(const TPoint &aPoint)[pure virtual]

Parameters

const TPoint & aPoint

Pop()

voidPop()[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()

voidReset()[pure virtual]

ResetBrushPattern()

voidResetBrushPattern()[pure virtual]

ResetClippingRegion()

voidResetClippingRegion()[pure virtual]

ResetFont()

voidResetFont()[pure virtual]

SetBrushColor(const TRgb &)

voidSetBrushColor(const TRgb &aColor)[pure virtual]

Parameters

const TRgb & aColor

SetBrushOrigin(const TPoint &)

voidSetBrushOrigin(const TPoint &aOrigin)[pure virtual]

Parameters

const TPoint & aOrigin

SetBrushPattern(const CFbsBitmap &)

voidSetBrushPattern(const CFbsBitmap &aBitmap)[pure virtual]

Parameters

const CFbsBitmap & aBitmap

SetBrushPattern(TInt)

voidSetBrushPattern(TIntaFbsBitmapHandle)[pure virtual]

Parameters

TInt aFbsBitmapHandle

SetBrushStyle(TBrushStyle)

voidSetBrushStyle(TBrushStyleaBrushStyle)[pure virtual]

Parameters

TBrushStyle aBrushStyle

SetCharJustification(TInt, TInt)

voidSetCharJustification(TIntaExcessWidth,
TIntaNumChars
)[pure virtual]

Parameters

TInt aExcessWidth
TInt aNumChars

SetClippingRegion(const TRegion &)

voidSetClippingRegion(const TRegion &aRegion)[pure virtual]

Parameters

const TRegion & aRegion

SetDrawMode(TDrawMode)

voidSetDrawMode(TDrawModeaDrawMode)[pure virtual]

Parameters

TDrawMode aDrawMode

SetFont(const CFont *)

voidSetFont(const CFont *aFont)[pure virtual]

Parameters

const CFont * aFont

SetFontNoDuplicate(const CFont *)

voidSetFontNoDuplicate(const CFont *aFont)[pure virtual]

Parameters

const CFont * aFont

SetOrigin(const TPoint &)

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

Parameters

const TPoint & aPoint =  TPoint(0, 0)

SetPenColor(const TRgb &)

voidSetPenColor(const TRgb &aColor)[pure virtual]

Parameters

const TRgb & aColor

SetPenSize(const TSize &)

voidSetPenSize(const TSize &aSize)[pure virtual]

Parameters

const TSize & aSize

SetPenStyle(TPenStyle)

voidSetPenStyle(TPenStyleaPenStyle)[pure virtual]

Parameters

TPenStyle aPenStyle

SetStrikethroughStyle(TFontStrikethrough)

voidSetStrikethroughStyle(TFontStrikethroughaStrikethroughStyle)[pure virtual]

Parameters

TFontStrikethrough aStrikethroughStyle

SetTextShadowColor(const TRgb &)

voidSetTextShadowColor(const TRgb &aColor)[pure virtual]

Parameters

const TRgb & aColor

SetUnderlineStyle(TFontUnderline)

voidSetUnderlineStyle(TFontUnderlineaUnderlineStyle)[pure virtual]

Parameters

TFontUnderline aUnderlineStyle

SetWordJustification(TInt, TInt)

voidSetWordJustification(TIntaExcessWidth,
TIntaNumGaps
)[pure virtual]

Parameters

TInt aExcessWidth
TInt aNumGaps

TextShadowColor()

TRgb TextShadowColor()const [pure virtual]

UpdateJustification(const TDesC &, const TTextParameters *)

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

Parameters

const TDesC & aText
const TTextParameters * aParam

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

voidUpdateJustificationVertical(const TDesC &aText,
const TTextParameters *aParam,
TBoolaUp
)[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.