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
void BindToImageL ()
void BlendWithBackground ( TUint32 *, TReal32 )
void ChangeBufferSizeL (const TSize )
void Clear ( TUint32 )
TUint32 * ColorBuffer ()
void DestroyContext ()
TSize DeviceBounds ()
void DrawImage ( CFbsBitmap *, const TGfxRectangle2D &, TBool )
void DrawL ( MGfxShape *)
void DrawStringL (const TDesC &, TFloatFixPt , TFloatFixPt , TInt8 , TInt8 , CDesCArrayFlat *, TReal , TReal , CArrayFix < TReal32 > *, CArrayFix < TFloatFixPt > *, CArrayFix < TFloatFixPt > *, TSize &, CFont *&, TFontSpec &)
void Flush ()
CFont * Font ()
TGfxColor ForegroundColor ()
void GenerateMask ( CFbsBitmap *)
void GetFontScaled ( TFloatFixPt , const TDesC &, CFont *&, TFontSpec &)
MGfxPaint * Paint ()
TGfxRenderingHints * RenderingHints ()
void SetAntialiasingMode (const TInt32 )
void SetBackgroundColor (const TGfxColor &)
void SetClip (const TGfxRectangle2D &)
void SetDashArrayL ( CArrayFix < TFloatFixPt > *)
void SetDashOffset ( TFloatFixPt )
void SetDoDithering ( TBool )
void SetFillOpacity ( TFloatFixPt )
void SetFontFamily ( CDesCArrayFlat *)
void SetFontSize (const TFloatFixPt )
void SetFontStyle (const TInt32 )
void SetFontWeight (const TInt32 )
void SetForegroundColor (const TGfxColor &)
void SetPaint ( MGfxPaint *)
void SetRenderingHints (const TGfxRenderingHints &)
void SetStroke ( TGfxStroke )
void SetStrokeOpacity ( TFloatFixPt )
void SetStrokeWidth (const TFloatFixPt &)
void SetTextDecoration (const TInt32 )
void SetTextanchor (const TInt32 )
void SetTransform (const TGfxAffineTransform &)
void SetWindingRule ( TGfxWindingRule )
void SetupContextL ()
TGfxStroke Stroke ()
const TPtrC8 TLVEncodedData ()
void UnbindFromImageL ( TReal32 )
void UpdateColorBuffer ()
void UpdateFramebufferL ( CFbsBitmap *, CFbsBitmap *)
void UpdateFramebufferL ( 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()

void BindToImageL ( ) [inline, virtual]

BlendWithBackground(TUint32 *, TReal32)

void BlendWithBackground ( TUint32 * aFrameBuffer,
TReal32 aOpacity
) [pure virtual]

Blend aFrameBuffer with background buffer using the opacity value

Since
1.0

Parameters

TUint32 * aFrameBuffer
TReal32 aOpacity

ChangeBufferSizeL(const TSize)

void ChangeBufferSizeL ( const TSize aSize ) [pure virtual]

Request to change the buffer size.

Since
1.0

Parameters

const TSize aSize : size of new buffer

Clear(TUint32)

void Clear ( TUint32 aRGBA8888Color ) [pure virtual]

Clear the whole graphics context.

Since
1.0

Parameters

TUint32 aRGBA8888Color

ColorBuffer()

TUint32 * ColorBuffer ( ) [inline, virtual]

DestroyContext()

void DestroyContext ( ) [pure virtual]

DeviceBounds()

TSize DeviceBounds ( ) [pure virtual]

Get the boundary setting.

Since
1.0

DrawImage(CFbsBitmap *, const TGfxRectangle2D &, TBool)

void DrawImage ( CFbsBitmap * aImage,
const TGfxRectangle2D & aImageRect,
TBool aHasAlpha = 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 *)

void DrawL ( 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 &)

void DrawStringL ( const TDesC & aDesc,
TFloatFixPt aX,
TFloatFixPt aY,
TInt8 aTextAnchor,
TInt8 aTextDecoration,
CDesCArrayFlat * aFamilies,
TReal aWordSpacing,
TReal aLetterSpacing,
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()

void Flush ( ) [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 *)

void GenerateMask ( CFbsBitmap * aMask ) [pure virtual]

Generate mask

Since

Parameters

CFbsBitmap * aMask

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

void GetFontScaled ( TFloatFixPt aHeight,
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)

void SetAntialiasingMode ( const TInt32 aAntialiasingEnable ) [pure virtual]

Set the anti-alias mode

Since
1.0

Parameters

const TInt32 aAntialiasingEnable

SetBackgroundColor(const TGfxColor &)

void SetBackgroundColor ( const TGfxColor & aColor ) [pure virtual]

Set the background color.

Since
1.0

Parameters

const TGfxColor & aColor : background color

SetClip(const TGfxRectangle2D &)

void SetClip ( const TGfxRectangle2D & aClip ) [pure virtual]

Set the clipping info.

Since
1.0

Parameters

const TGfxRectangle2D & aClip : clipping rectangle

SetDashArrayL(CArrayFix< TFloatFixPt > *)

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

Set the dash array info.

Since
1.0

Parameters

CArrayFix < TFloatFixPt > * aArray : array of points

SetDashOffset(TFloatFixPt)

void SetDashOffset ( TFloatFixPt aDashOffset ) [pure virtual]

Parameters

TFloatFixPt aDashOffset

SetDoDithering(TBool)

void SetDoDithering ( TBool aDoDithering ) [pure virtual]

Set the flag to do or ignore dithering.

Since
1.0

Parameters

TBool aDoDithering : TRUE or False

SetFillOpacity(TFloatFixPt)

void SetFillOpacity ( TFloatFixPt aFillOpacity ) [pure virtual]

Set the fill opacity value

Since
1.0

Parameters

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

SetFontFamily(CDesCArrayFlat *)

void SetFontFamily ( CDesCArrayFlat * aFamilies ) [pure virtual]

Set the font family.

Since
1.0

Parameters

CDesCArrayFlat * aFamilies : font family names

SetFontSize(const TFloatFixPt)

void SetFontSize ( const TFloatFixPt aFontSize ) [pure virtual]

Set the font size.

Since
1.0

Parameters

const TFloatFixPt aFontSize : font size

SetFontStyle(const TInt32)

void SetFontStyle ( const TInt32 aFontStyle ) [pure virtual]

Set the font style.

Since
1.0

Parameters

const TInt32 aFontStyle : font style

SetFontWeight(const TInt32)

void SetFontWeight ( const TInt32 aFontWeight ) [pure virtual]

Set the font weight.

Since
1.0

Parameters

const TInt32 aFontWeight : font weight value

SetForegroundColor(const TGfxColor &)

void SetForegroundColor ( const TGfxColor & aColor ) [pure virtual]

Set the foreground color.

Since
1.0

Parameters

const TGfxColor & aColor : foreground color

SetPaint(MGfxPaint *)

void SetPaint ( MGfxPaint * aPaint ) [pure virtual]

Set the paint info.

Since
1.0

Parameters

MGfxPaint * aPaint : paint info

SetRenderingHints(const TGfxRenderingHints &)

void SetRenderingHints ( const TGfxRenderingHints & aRenderingHints ) [pure virtual]

Set the rendering hints.

Since
1.0

Parameters

const TGfxRenderingHints & aRenderingHints : rendering hints

SetStroke(TGfxStroke)

void SetStroke ( TGfxStroke aStroke ) [pure virtual]

Set the stroke info.

Since
1.0

Parameters

TGfxStroke aStroke : stroke info

SetStrokeOpacity(TFloatFixPt)

void SetStrokeOpacity ( TFloatFixPt aStrokeOpacity ) [pure virtual]

Set the stroke opacity value

Since
1.0

Parameters

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

SetStrokeWidth(const TFloatFixPt &)

void SetStrokeWidth ( const TFloatFixPt & aWidth ) [pure virtual]

Set the stroke-width.

Since
3.2

Parameters

const TFloatFixPt & aWidth : stroke-width

SetTextDecoration(const TInt32)

void SetTextDecoration ( const TInt32 aTextDecoration ) [pure virtual]

Set the text decoration

Since
1.0

Parameters

const TInt32 aTextDecoration : text decoration value

SetTextanchor(const TInt32)

void SetTextanchor ( const TInt32 aTextAnchor ) [pure virtual]

Set the text anchor

Since
1.0

Parameters

const TInt32 aTextAnchor : text anchor value

SetTransform(const TGfxAffineTransform &)

void SetTransform ( const TGfxAffineTransform & aTransform ) [pure virtual]

Set the transform info.

Since
1.0

Parameters

const TGfxAffineTransform & aTransform : transform info

SetWindingRule(TGfxWindingRule)

void SetWindingRule ( TGfxWindingRule aRule ) [pure virtual]

Set the winding rule.

Since
1.0

Parameters

TGfxWindingRule aRule : winding rule

SetupContextL()

void SetupContextL ( ) [inline, virtual]

Stroke()

TGfxStroke Stroke ( ) [pure virtual]

Get the stroke setting.

Since
1.0

TLVEncodedData()

const TPtrC8 TLVEncodedData ( ) const [pure virtual]

Get the NVG-TLV Encoded data.

Since
1.0

UnbindFromImageL(TReal32)

void UnbindFromImageL ( TReal32 ) [inline, virtual]

Parameters

TReal32

UpdateColorBuffer()

void UpdateColorBuffer ( ) [inline, virtual]

UpdateFramebufferL(CFbsBitmap *, CFbsBitmap *)

void UpdateFramebufferL ( 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)

void UpdateFramebufferL ( CFbsBitmap * aFrameBuffer,
CFbsBitmap * aMask,
TSize aFrameBufferSize,
TDisplayMode aFrameBufferMode,
TDisplayMode aMaskDspMode
) [pure virtual]

Parameters

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

Member Data Documentation

CSvgBitmapFontProvider * iSvgBitmapFontProvider

CSvgBitmapFontProvider * iSvgBitmapFontProvider [protected]