CGfx2dGc Class Reference

class CGfx2dGc : public CBase

This class provides the interface create a graphics context.

Gfx2D.lib
Since
1.0

Inherits from

Public Member Functions
voidBindToImageL()
voidBlendWithBackground(TUint32 *, TReal32)
voidChangeBufferSizeL(const TSize)
voidClear(TUint32)
TUint32 *ColorBuffer()
voidDestroyContext()
TSize DeviceBounds()
voidDrawImage(CFbsBitmap *, const TGfxRectangle2D &, TBool)
voidDrawL(MGfxShape *)
voidDrawStringL(const TDesC &, TFloatFixPt, TFloatFixPt, TInt8, TInt8, CDesCArrayFlat *, TReal, TReal, CArrayFix< TReal32 > *, CArrayFix< TFloatFixPt > *, CArrayFix< TFloatFixPt > *, TSize &, CFont *&, TFontSpec &)
voidFlush()
CFont *Font()
TGfxColor ForegroundColor()
voidGenerateMask(CFbsBitmap *)
voidGetFontScaled(TFloatFixPt, const TDesC &, CFont *&, TFontSpec &)
MGfxPaint *Paint()
TGfxRenderingHints *RenderingHints()
voidSetAntialiasingMode(const TInt32)
voidSetBackgroundColor(const TGfxColor &)
voidSetClip(const TGfxRectangle2D &)
voidSetDashArrayL(CArrayFix< TFloatFixPt > *)
voidSetDashOffset(TFloatFixPt)
voidSetDoDithering(TBool)
voidSetFillOpacity(TFloatFixPt)
voidSetFontFamily(CDesCArrayFlat *)
voidSetFontSize(const TFloatFixPt)
voidSetFontStyle(const TInt32)
voidSetFontWeight(const TInt32)
voidSetForegroundColor(const TGfxColor &)
voidSetPaint(MGfxPaint *)
voidSetRenderingHints(const TGfxRenderingHints &)
voidSetStroke(TGfxStroke)
voidSetStrokeOpacity(TFloatFixPt)
voidSetStrokeWidth(const TFloatFixPt &)
voidSetTextDecoration(const TInt32)
voidSetTextanchor(const TInt32)
voidSetTransform(const TGfxAffineTransform &)
voidSetWindingRule(TGfxWindingRule)
voidSetupContextL()
TGfxStroke Stroke()
const TPtrC8TLVEncodedData()
voidUnbindFromImageL(TReal32)
voidUpdateColorBuffer()
voidUpdateFramebufferL(CFbsBitmap *, CFbsBitmap *)
voidUpdateFramebufferL(CFbsBitmap *, CFbsBitmap *, TSize, TDisplayMode, TDisplayMode)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Protected Attributes
CSvgBitmapFontProvider *iSvgBitmapFontProvider

Member Functions Documentation

BindToImageL()

voidBindToImageL()[inline, virtual]

BlendWithBackground(TUint32 *, TReal32)

voidBlendWithBackground(TUint32 *aFrameBuffer,
TReal32aOpacity
)[pure virtual]

Blend aFrameBuffer with background buffer using the opacity value

Since
1.0

Parameters

TUint32 * aFrameBuffer
TReal32 aOpacity

ChangeBufferSizeL(const TSize)

voidChangeBufferSizeL(const TSizeaSize)[pure virtual]

Request to change the buffer size.

Since
1.0

Parameters

const TSize aSize: size of new buffer

Clear(TUint32)

voidClear(TUint32aRGBA8888Color)[pure virtual]

Clear the whole graphics context.

Since
1.0

Parameters

TUint32 aRGBA8888Color

ColorBuffer()

TUint32 *ColorBuffer()[inline, virtual]

DestroyContext()

voidDestroyContext()[pure virtual]

DeviceBounds()

TSize DeviceBounds()[pure virtual]

Get the boundary setting.

Since
1.0

DrawImage(CFbsBitmap *, const TGfxRectangle2D &, TBool)

voidDrawImage(CFbsBitmap *aImage,
const TGfxRectangle2D &aImageRect,
TBoolaHasAlpha = EFalse
)[pure virtual]

Draw the given bitmap at the given top-left coordinates.

Since
1.0

Parameters

CFbsBitmap * aImage
const TGfxRectangle2D & aImageRect
TBool aHasAlpha = EFalse

DrawL(MGfxShape *)

voidDrawL(MGfxShape *aShape)[pure virtual]

Draw the given shape.

Since
1.0

Parameters

MGfxShape * aShape: shape to draw.

DrawStringL(const TDesC &, TFloatFixPt, TFloatFixPt, TInt8, TInt8, CDesCArrayFlat *, TReal, TReal, CArrayFix< TReal32 > *, CArrayFix< TFloatFixPt > *, CArrayFix< TFloatFixPt > *, TSize &, CFont *&, TFontSpec &)

voidDrawStringL(const TDesC &aDesc,
TFloatFixPtaX,
TFloatFixPtaY,
TInt8aTextAnchor,
TInt8aTextDecoration,
CDesCArrayFlat *aFamilies,
TRealaWordSpacing,
TRealaLetterSpacing,
CArrayFix< TReal32 > *aArrayRotate,
CArrayFix< TFloatFixPt > *aArrayX,
CArrayFix< TFloatFixPt > *aArrayY,
TSize &aBoundingBoxResult,
CFont *&aFont,
TFontSpec &aFontSpec
)[pure virtual]

Draw the given string starting at the given context coordinate, and stylized by the given parameters.

Since
1.0

Parameters

const TDesC & aDesc: string to draw
TFloatFixPt aX: x coordinate
TFloatFixPt aY
TInt8 aTextAnchor: text anchor
TInt8 aTextDecoration: text decoration
CDesCArrayFlat * aFamilies: font family names
TReal aWordSpacing: spacing description for each word
TReal aLetterSpacing: spacing description for each letter
CArrayFix< TReal32 > * aArrayRotate: angle of rotation
CArrayFix< TFloatFixPt > * aArrayX: array of x coordinates
CArrayFix< TFloatFixPt > * aArrayY: array of x coordinates
TSize & aBoundingBoxResult
CFont *& aFont
TFontSpec & aFontSpec

Flush()

voidFlush()[inline, virtual]

Font()

CFont *Font()[pure virtual]

Get the font setting.

Since
1.0

ForegroundColor()

TGfxColor ForegroundColor()[pure virtual]

Get the foreground color setting.

Since
1.0

GenerateMask(CFbsBitmap *)

voidGenerateMask(CFbsBitmap *aMask)[pure virtual]

Generate mask

Since

Parameters

CFbsBitmap * aMask

GetFontScaled(TFloatFixPt, const TDesC &, CFont *&, TFontSpec &)

voidGetFontScaled(TFloatFixPtaHeight,
const TDesC &aTypefaceName,
CFont *&aFont,
TFontSpec &aFontSpec
)[pure virtual]

Parameters

TFloatFixPt aHeight
const TDesC & aTypefaceName
CFont *& aFont
TFontSpec & aFontSpec

Paint()

MGfxPaint *Paint()[pure virtual]

Get the paint setting.

Since
1.0

RenderingHints()

TGfxRenderingHints *RenderingHints()[pure virtual]

Get the rendering hints setting.

Since
1.0

SetAntialiasingMode(const TInt32)

voidSetAntialiasingMode(const TInt32aAntialiasingEnable)[pure virtual]

Set the anti-alias mode

Since
1.0

Parameters

const TInt32 aAntialiasingEnable

SetBackgroundColor(const TGfxColor &)

voidSetBackgroundColor(const TGfxColor &aColor)[pure virtual]

Set the background color.

Since
1.0

Parameters

const TGfxColor & aColor: background color

SetClip(const TGfxRectangle2D &)

voidSetClip(const TGfxRectangle2D &aClip)[pure virtual]

Set the clipping info.

Since
1.0

Parameters

const TGfxRectangle2D & aClip: clipping rectangle

SetDashArrayL(CArrayFix< TFloatFixPt > *)

voidSetDashArrayL(CArrayFix< TFloatFixPt > *aArray)[pure virtual]

Set the dash array info.

Since
1.0

Parameters

CArrayFix< TFloatFixPt > * aArray: array of points

SetDashOffset(TFloatFixPt)

voidSetDashOffset(TFloatFixPtaDashOffset)[pure virtual]

Parameters

TFloatFixPt aDashOffset

SetDoDithering(TBool)

voidSetDoDithering(TBoolaDoDithering)[pure virtual]

Set the flag to do or ignore dithering.

Since
1.0

Parameters

TBool aDoDithering: TRUE or False

SetFillOpacity(TFloatFixPt)

voidSetFillOpacity(TFloatFixPtaFillOpacity)[pure virtual]

Set the fill opacity value

Since
1.0

Parameters

TFloatFixPt aFillOpacity: opacity value (0<=aFillOpacity<=1.0)

SetFontFamily(CDesCArrayFlat *)

voidSetFontFamily(CDesCArrayFlat *aFamilies)[pure virtual]

Set the font family.

Since
1.0

Parameters

CDesCArrayFlat * aFamilies: font family names

SetFontSize(const TFloatFixPt)

voidSetFontSize(const TFloatFixPtaFontSize)[pure virtual]

Set the font size.

Since
1.0

Parameters

const TFloatFixPt aFontSize: font size

SetFontStyle(const TInt32)

voidSetFontStyle(const TInt32aFontStyle)[pure virtual]

Set the font style.

Since
1.0

Parameters

const TInt32 aFontStyle: font style

SetFontWeight(const TInt32)

voidSetFontWeight(const TInt32aFontWeight)[pure virtual]

Set the font weight.

Since
1.0

Parameters

const TInt32 aFontWeight: font weight value

SetForegroundColor(const TGfxColor &)

voidSetForegroundColor(const TGfxColor &aColor)[pure virtual]

Set the foreground color.

Since
1.0

Parameters

const TGfxColor & aColor: foreground color

SetPaint(MGfxPaint *)

voidSetPaint(MGfxPaint *aPaint)[pure virtual]

Set the paint info.

Since
1.0

Parameters

MGfxPaint * aPaint: paint info

SetRenderingHints(const TGfxRenderingHints &)

voidSetRenderingHints(const TGfxRenderingHints &aRenderingHints)[pure virtual]

Set the rendering hints.

Since
1.0

Parameters

const TGfxRenderingHints & aRenderingHints: rendering hints

SetStroke(TGfxStroke)

voidSetStroke(TGfxStrokeaStroke)[pure virtual]

Set the stroke info.

Since
1.0

Parameters

TGfxStroke aStroke: stroke info

SetStrokeOpacity(TFloatFixPt)

voidSetStrokeOpacity(TFloatFixPtaStrokeOpacity)[pure virtual]

Set the stroke opacity value

Since
1.0

Parameters

TFloatFixPt aStrokeOpacity: opacity value (0<=aStrokeOpacity<=1.0)

SetStrokeWidth(const TFloatFixPt &)

voidSetStrokeWidth(const TFloatFixPt &aWidth)[pure virtual]

Set the stroke-width.

Since
3.2

Parameters

const TFloatFixPt & aWidth: stroke-width

SetTextDecoration(const TInt32)

voidSetTextDecoration(const TInt32aTextDecoration)[pure virtual]

Set the text decoration

Since
1.0

Parameters

const TInt32 aTextDecoration: text decoration value

SetTextanchor(const TInt32)

voidSetTextanchor(const TInt32aTextAnchor)[pure virtual]

Set the text anchor

Since
1.0

Parameters

const TInt32 aTextAnchor: text anchor value

SetTransform(const TGfxAffineTransform &)

voidSetTransform(const TGfxAffineTransform &aTransform)[pure virtual]

Set the transform info.

Since
1.0

Parameters

const TGfxAffineTransform & aTransform: transform info

SetWindingRule(TGfxWindingRule)

voidSetWindingRule(TGfxWindingRuleaRule)[pure virtual]

Set the winding rule.

Since
1.0

Parameters

TGfxWindingRule aRule: winding rule

SetupContextL()

voidSetupContextL()[inline, virtual]

Stroke()

TGfxStroke Stroke()[pure virtual]

Get the stroke setting.

Since
1.0

TLVEncodedData()

const TPtrC8TLVEncodedData()const [pure virtual]

Get the NVG-TLV Encoded data.

Since
1.0

UnbindFromImageL(TReal32)

voidUnbindFromImageL(TReal32)[inline, virtual]

Parameters

TReal32

UpdateColorBuffer()

voidUpdateColorBuffer()[inline, virtual]

UpdateFramebufferL(CFbsBitmap *, CFbsBitmap *)

voidUpdateFramebufferL(CFbsBitmap *aFrameBuffer,
CFbsBitmap *aMask
)[pure virtual]

This method copies the internal RGBA8888 framebuffer to CfbsBitmap that is specified in constructor. The CfbsBitmap could be 4k color (RGB0444), 64k color (RGB565), or 16M color (RGB888).

Since

Parameters

CFbsBitmap * aFrameBuffer
CFbsBitmap * aMask

UpdateFramebufferL(CFbsBitmap *, CFbsBitmap *, TSize, TDisplayMode, TDisplayMode)

voidUpdateFramebufferL(CFbsBitmap *aFrameBuffer,
CFbsBitmap *aMask,
TSizeaFrameBufferSize,
TDisplayModeaFrameBufferMode,
TDisplayModeaMaskDspMode
)[pure virtual]

Parameters

CFbsBitmap * aFrameBuffer
CFbsBitmap * aMask
TSize aFrameBufferSize
TDisplayMode aFrameBufferMode
TDisplayMode aMaskDspMode

Member Data Documentation

CSvgBitmapFontProvider * iSvgBitmapFontProvider

CSvgBitmapFontProvider *iSvgBitmapFontProvider[protected]