CFbsBitGc Class Reference

#include <bitstd.h>

Link against: bitgdi.lib

class CFbsBitGc : public CBitmapContext
Public Member Enumerations
enumTGraphicsOrientation { EGraphicsOrientationNormal, EGraphicsOrientationRotated90, EGraphicsOrientationRotated180, EGraphicsOrientationRotated270 }
Public Member Functions
virtual ~CFbsBitGc()
IMPORT_C voidActivate(CFbsDevice *)
IMPORT_C voidActivateNoJustAutoUpdate(CFbsDevice *)
IMPORT_C TIntAlphaBlendBitmaps(const TPoint &, const CFbsBitmap *, const CFbsBitmap *, const TRect &, const TPoint &, const CFbsBitmap *, const TPoint &)
virtual IMPORT_C TIntAlphaBlendBitmaps(const TPoint &, const CFbsBitmap *, const TRect &, const CFbsBitmap *, const TPoint &)
virtual IMPORT_C TIntAlphaBlendBitmaps(const TPoint &, const CWsBitmap *, const TRect &, const CWsBitmap *, const TPoint &)
IMPORT_C voidBitBlt(const TPoint &, const CFbsBitGc &)
IMPORT_C voidBitBlt(const TPoint &, const CFbsBitGc &, const TRect &)
virtual IMPORT_C voidBitBlt(const TPoint &, const CFbsBitmap *)
virtual IMPORT_C voidBitBlt(const TPoint &, const CFbsBitmap *, const TRect &)
virtual IMPORT_C voidBitBltMasked(const TPoint &, const CFbsBitmap *, const TRect &, const CFbsBitmap *, TBool)
IMPORT_C TRgbBrushColor()
IMPORT_C voidCancelClipping()
virtual IMPORT_C voidCancelClippingRect()
virtual IMPORT_C voidCancelClippingRegion()
IMPORT_C voidChangeDevice(CFbsDevice *)
virtual IMPORT_C voidClear()
virtual IMPORT_C voidClear(const TRect &)
virtual IMPORT_C voidCopyRect(const TPoint &, const TRect &)
IMPORT_C voidCopySettings(const CFbsBitGc &)
virtual IMPORT_C CGraphicsDevice *Device()
virtual IMPORT_C voidDiscardBrushPattern()
virtual IMPORT_C voidDiscardFont()
virtual IMPORT_C voidDrawArc(const TRect &, const TPoint &, const TPoint &)
virtual IMPORT_C voidDrawBitmap(const TPoint &, const CFbsBitmap *)
virtual IMPORT_C voidDrawBitmap(const TRect &, const CFbsBitmap *)
virtual IMPORT_C voidDrawBitmap(const TRect &, const CFbsBitmap *, const TRect &)
virtual IMPORT_C voidDrawBitmapMasked(const TRect &, const CFbsBitmap *, const TRect &, const CFbsBitmap *, TBool)
virtual IMPORT_C voidDrawBitmapMasked(const TRect &, const CWsBitmap *, const TRect &, const CWsBitmap *, TBool)
virtual IMPORT_C voidDrawEllipse(const TRect &)
virtual IMPORT_C voidDrawLine(const TPoint &, const TPoint &)
virtual IMPORT_C voidDrawLineBy(const TPoint &)
virtual IMPORT_C voidDrawLineTo(const TPoint &)
virtual IMPORT_C voidDrawPie(const TRect &, const TPoint &, const TPoint &)
virtual IMPORT_C voidDrawPolyLine(const CArrayFix< TPoint > *)
virtual IMPORT_C voidDrawPolyLine(const TPoint *, TInt)
IMPORT_C voidDrawPolyLineNoEndPoint(const CArrayFix< TPoint > *)
IMPORT_C voidDrawPolyLineNoEndPoint(const TPoint *, TInt)
virtual IMPORT_C TIntDrawPolygon(const CArrayFix< TPoint > *, CGraphicsContext::TFillRule)
virtual IMPORT_C TIntDrawPolygon(const TPoint *, TInt, CGraphicsContext::TFillRule)
virtual IMPORT_C voidDrawRect(const TRect &)
virtual IMPORT_C voidDrawRoundRect(const TRect &, const TSize &)
IMPORT_C voidDrawText(const TDesC &)
virtual IMPORT_C voidDrawText(const TDesC &, const TPoint &)
IMPORT_C voidDrawText(const TDesC &, const TRect &)
virtual IMPORT_C voidDrawText(const TDesC &, const TRect &, TInt, TTextAlign, TInt)
IMPORT_C voidDrawText(const TDesC &, const TRect &, TInt, TInt, TTextAlign, TInt)
IMPORT_C voidDrawText(const TDesC &, const TTextParameters *)
IMPORT_C voidDrawText(const TDesC &, const TTextParameters *, const TPoint &)
IMPORT_C voidDrawText(const TDesC &, const TTextParameters *, const TRect &)
IMPORT_C voidDrawText(const TDesC &, const TTextParameters *, const TRect &, TInt, TTextAlign, TInt)
IMPORT_C voidDrawText(const TDesC &, const TTextParameters *, const TRect &, TInt, TInt, TTextAlign, TInt)
IMPORT_C voidDrawTextVertical(const TDesC &, TBool)
virtual IMPORT_C voidDrawTextVertical(const TDesC &, const TPoint &, TBool)
IMPORT_C voidDrawTextVertical(const TDesC &, const TRect &, TBool)
virtual IMPORT_C voidDrawTextVertical(const TDesC &, const TRect &, TInt, TBool, TTextAlign, TInt)
IMPORT_C voidDrawTextVertical(const TDesC &, const TRect &, TInt, TInt, TBool, TTextAlign, TInt)
IMPORT_C voidDrawTextVertical(const TDesC &, const TTextParameters *, TBool)
IMPORT_C voidDrawTextVertical(const TDesC &, const TTextParameters *, const TPoint &, TBool)
IMPORT_C voidDrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TBool)
IMPORT_C voidDrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TInt, TBool, TTextAlign, TInt)
IMPORT_C voidDrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TInt, TInt, TBool, TTextAlign, TInt)
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C voidFadeArea(const TRegion *)
IMPORT_C voidInternalizeL(RReadStream &)
IMPORT_C TBoolIsBrushPatternUsed()
IMPORT_C TBoolIsFontUsed()
TInt16 Load16(const TUint8 *)
virtual IMPORT_C voidMapColors(const TRect &, const TRgb *, TInt, TBool)
virtual IMPORT_C voidMoveBy(const TPoint &)
virtual IMPORT_C voidMoveTo(const TPoint &)
IMPORT_C CFbsBitGc *NewL()
IMPORT_C voidOrientationsAvailable(TBool)
IMPORT_C TRgbPenColor()
virtual IMPORT_C voidPlot(const TPoint &)
IMPORT_C voidRectDrawnTo(TRect &)
virtual IMPORT_C voidReset()
IMPORT_C voidResized()
virtual IMPORT_C voidSetBrushColor(const TRgb &)
virtual IMPORT_C voidSetBrushOrigin(const TPoint &)
virtual IMPORT_C voidSetBrushStyle(TBrushStyle)
virtual IMPORT_C voidSetCharJustification(TInt, TInt)
virtual IMPORT_C voidSetClippingRect(const TRect &)
IMPORT_C voidSetClippingRegion(const TRegion *)
virtual IMPORT_C TIntSetClippingRegion(const TRegion &)
IMPORT_C voidSetDitherOrigin(const TPoint &)
virtual IMPORT_C voidSetDrawMode(TDrawMode)
voidSetFadeMode(TBool)
virtual IMPORT_C voidSetFaded(TBool)
voidSetFadingParameters(TUint8)
virtual IMPORT_C voidSetFadingParameters(TUint8, TUint8)
IMPORT_C TBoolSetOrientation(TGraphicsOrientation)
virtual IMPORT_C voidSetOrigin(const TPoint &)
virtual IMPORT_C voidSetPenColor(const TRgb &)
virtual IMPORT_C voidSetPenSize(const TSize &)
virtual IMPORT_C voidSetPenStyle(TPenStyle)
IMPORT_C voidSetShadowMode(TBool)
virtual IMPORT_C voidSetStrikethroughStyle(TFontStrikethrough)
virtual IMPORT_C voidSetUnderlineStyle(TFontUnderline)
IMPORT_C voidSetUserDisplayMode(TDisplayMode)
virtual IMPORT_C voidSetWordJustification(TInt, TInt)
IMPORT_C voidShadowArea(const TRegion *)
IMPORT_C voidUpdateJustification(const TDesC &)
IMPORT_C voidUpdateJustification(const TDesC &, const TTextParameters *)
IMPORT_C voidUpdateJustificationVertical(const TDesC &, TBool)
IMPORT_C voidUpdateJustificationVertical(const TDesC &, const TTextParameters *, TBool)
virtual IMPORT_C voidUseBrushPattern(const CFbsBitmap *)
IMPORT_C TIntUseBrushPattern(TInt)
virtual IMPORT_C voidUseFont(const CFont *)
IMPORT_C TIntUseFont(TInt)
IMPORT_C voidUseFontNoDuplicate(const CFbsBitGcFont *)
Protected Member Functions
virtual IMPORT_C TIntAPIExtension(TUid, TAny *&, TAny *)
Inherited Enumerations
CGraphicsContext:TBrushStyle
CGraphicsContext:TDrawMode
CGraphicsContext:TDrawModeComponents
CGraphicsContext:TFillRule
CGraphicsContext:TPenStyle
CGraphicsContext:TTextAlign
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()
CGraphicsContext::DrawText(const TDesC &,const TPoint &,const TDrawTextParam &)
CGraphicsContext::DrawText(const TDesC &,const TTextParameters *,const TPoint &,const TDrawTextParam &)
CGraphicsContext::DrawTextExtended(const TDesC &,const TPoint &,const TDrawTextExtendedParam &)
CGraphicsContext::DrawTextExtended(const TDesC &,const TTextParameters *,const TPoint &,const TDrawTextExtendedParam &)
CGraphicsContext::GetShadowColor(TRgb &)
CGraphicsContext::GetUnderlineMetrics(TInt &,TInt &)
CGraphicsContext::IsFbsBitGc()const
CGraphicsContext::JustificationInPixels(TInt &,TInt &)
CGraphicsContext::JustificationInPixels(TInt,TInt,TInt,TInt)
CGraphicsContext::Reserved()
CGraphicsContext::SetShadowColor(const TRgb &)

Detailed Description

Concrete implementation of a bitmapped graphics context.

The class provides new functionality, and implementations of the pure virtual functions defined in CGraphicsContext and CBitmapContext.

Member Enumeration Documentation

Enum TGraphicsOrientation

Defines possible rotation values.

EnumeratorValueDescription
EGraphicsOrientationNormal

Normal orientation is supported.

EGraphicsOrientationRotated90

A 90 degree rotation is supported.

EGraphicsOrientationRotated180

A 180 degree rotation is supported.

EGraphicsOrientationRotated270

A 270 degree rotation is supported.

Constructor & Destructor Documentation

~CFbsBitGc ( )

IMPORT_C~CFbsBitGc()[virtual]

Frees all resources owned by the object.

Member Function Documentation

APIExtension ( TUid, TAny *&, TAny * )

IMPORT_C TIntAPIExtension(TUidaUid,
TAny *&aOutput,
TAny *aInput
)[protected, virtual]

Reimplemented from CBitmapContext::APIExtension(TUid,TAny *&,TAny *)

This function should not be used by externals but must retain the same ordinal number to maintain BC, thus is exported.

APIExtension can contain as many additional methods as is required by CGraphicsContext after its original conception. It takes 3 parameters. Function is exported due to constrains of retaining BC with earlier versions. This is not used directly by external methods, instead it is called by a named method in CGraphicsContext which passes the relivant arguements including an unique identifier for the required action.

See also: Valid Uid identifiers are listed in header gdi.h CGraphicsContext

Parameters
aUidThe unique identifier for the method that is required. Selected internally by a series of "if" statements.
aOutputis a TAny pointer to a reference. Used to output data as the structure does not need to be instantiated before the function call this adds greater flexibility.
aInputis a TAny pointer used to input data.

Activate ( CFbsDevice * )

IMPORT_C voidActivate(CFbsDevice *aDevice)

Sets the object to draw to a particular device

Parameters
aDeviceThe target device.

ActivateNoJustAutoUpdate ( CFbsDevice * )

IMPORT_C voidActivateNoJustAutoUpdate(CFbsDevice *aDevice)

Sets the object to draw to a particular device but doesn't 'use up' justification settings when drawing text. This is similar to Activate().

Parameters
aDeviceThe target device.

AlphaBlendBitmaps ( const TPoint &, const CFbsBitmap *, const CFbsBitmap *, const TRect &, const TPoint &, const CFbsBitmap *, const TPoint & )

IMPORT_C TIntAlphaBlendBitmaps(const TPoint &aDestPt,
const CFbsBitmap *aSrcBmp1,
const CFbsBitmap *aSrcBmp2,
const TRect &aSrcRect1,
const TPoint &aSrcPt2,
const CFbsBitmap *aAlphaBmp,
const TPoint &aAlphaPt
)
The method performs an alpha blending of the source data - aSrcBmp1 and aSrcBmp2, using the data from aAlphaBmp as an alpha blending factor. The formula used for that, is: (C1 * A + C2 * (255 - A)) / 255, where:
  • C1 - a pixel from aSrcBmp1;

  • C2 - a pixel from aSrcBmp2;

  • A - a pixel from aAlphaBmp; The content of source and alpha bitmap is preserved. The calculated alpha blended pixels are written to the destination - the screen or a bitmap.
    Pre-condition
    !aSrcRect1.IsEmpty()

    aSrcBmp1 != NULL aSrcBmp1->Handle() != NULL aSrcBmp2 != NULL aSrcBmp2->Handle() != NULL aAlphaBmp != NULL aAlphaBmp->Handle() != NULL aAlphaBmp->DisplayMode() <= EGray256

Parameters
aDestPtPosition in the target the result should be drawn to.
aSrcBmp1A pointer to the source bitmap 1.
aSrcBmp2A pointer to the source bitmap 2.
aSrcRect1A part of bitmap 1 that should be used as a source for the alpha blending.
aSrcPt2Position of the first pixel in bitmap 2 that should be used as a source for the alpha blending. The size of the area is the same as the bitmap 1 area - aSrcRect1 parameter.
aAlphaBmpA pointer to the bitmap used as an alpha blending factor.
aAlphaPtPosition of the first pixel in the alpha bitmap that should be used as a source for the alpha blending. The size of the area is the same as the bitmap 1 area - aSrcRect1 parameter.
Return Value
KErrNone If the call is successful, KErrArgument otherwise.

AlphaBlendBitmaps ( const TPoint &, const CFbsBitmap *, const TRect &, const CFbsBitmap *, const TPoint & )

IMPORT_C TIntAlphaBlendBitmaps(const TPoint &aDestPt,
const CFbsBitmap *aSrcBmp,
const TRect &aSrcRect,
const CFbsBitmap *aAlphaBmp,
const TPoint &aAlphaPt
)[virtual]

Reimplemented from CBitmapContext::AlphaBlendBitmaps(const TPoint &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,const TPoint &)

The method performs an alpha blending of the source data - aSrcBmp - with the existing image, using the data from aAlphaBmp as an alpha blending factor. The formula used for that, is: (C * A + D * (255 - A)) / 255, where:
  • C - a pixel from aSrcBmp;

  • D - a pixel from the destination;

  • A - a pixel from aAlphaBmp; The content of source and alpha bitmap is preserved. The calculated alpha blended pixels are written to the destination - the screen or a bitmap.
    Pre-condition
    !aSrcRect.IsEmpty()

    aSrcBmp != NULL aSrcBmp->Handle() != NULL aAlphaBmp != NULL aAlphaBmp->Handle() != NULL aAlphaBmp->DisplayMode() <= EGray256

Parameters
aDestPtPosition in the target the result should be drawn to.
aSrcBmpA pointer to the source bitmap.
aSrcRectA part of aSrcBmp that should be used as a source for the alpha blending. DISCLAIMER: if aSrcRect is bigger (width and/or height) the behaviour is undefined
aAlphaBmpA pointer to the bitmap used as an alpha blending factor.
aAlphaPtPosition of the first pixel in the alpha bitmap that should be used as a source for the alpha blending. The size of the area is the same as the aSrcRect parameter (read DISCLAIMER above).
Return Value
KErrNone If the call is successfull, KErrArgument otherwise.

AlphaBlendBitmaps ( const TPoint &, const CWsBitmap *, const TRect &, const CWsBitmap *, const TPoint & )

IMPORT_C TIntAlphaBlendBitmaps(const TPoint &aDestPt,
const CWsBitmap *aSrcBmp,
const TRect &aSrcRect,
const CWsBitmap *aAlphaBmp,
const TPoint &aAlphaPt
)[virtual]

Reimplemented from CBitmapContext::AlphaBlendBitmaps(const TPoint &,const CWsBitmap *,const TRect &,const CWsBitmap *,const TPoint &)

The method performs an alpha blending of the source data, aSrcBmp, with the CBitmapContext, using the data from aAlphaBmp as an alpha blending factor. For information on how this function works, see the other overload.

Parameters
aDestPtPosition in the target the result should be drawn to.
aSrcBmpA pointer to the source bitmap.
aSrcRectThe part of the source bitmap that should be used.
aAlphaBmpA pointer to the bitmap used as an alpha blending factor.
aAlphaPtPosition of the first pixel in the alpha bitmap that should be used as a source for the alpha blending. The size of the area is the same as the source bitmap area - aSrcRect parameter.

BitBlt ( const TPoint &, const CFbsBitGc & )

IMPORT_C voidBitBlt(const TPoint &aPoint,
const CFbsBitGc &aGc
)

Draws from another CFbsBitGc.

Parameters
aPointThe position to draw the top left corner of the piece of bitmap
aGcThe source bitmap graphics context

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

IMPORT_C voidBitBlt(const TPoint &aPoint,
const CFbsBitGc &aGc,
const TRect &aSourceRect
)

Draws a particular rectangle from another CFbsBitGc.

Parameters
aPointThe position to draw the top left corner of the piece of bitmap.
aGcThe source bitmap graphics context.
aSourceRectA rectangle defining the piece of the source to be drawn.

BitBlt ( const TPoint &, const CFbsBitmap * )

IMPORT_C voidBitBlt(const TPoint &aPoint,
const CFbsBitmap *aBitmap
)[virtual]

Reimplemented from CBitmapContext::BitBlt(const TPoint &,const CFbsBitmap *)

Draws the whole of a CFbsBitmap.

Parameters
aPointThe position to draw the top left corner of the bitmap.
aBitmapThe source bitmap.

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

IMPORT_C voidBitBlt(const TPoint &aPoint,
const CFbsBitmap *aBitmap,
const TRect &aSourceRect
)[virtual]

Reimplemented from CBitmapContext::BitBlt(const TPoint &,const CFbsBitmap *,const TRect &)

Draws a particular rectangle from a CFbsBitmap.

Parameters
aPointThe position to draw the top left corner of the bitmap.
aBitmapThe source bitmap.
aSourceRectA rectangle defining the piece of the source to be drawn.

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

IMPORT_C voidBitBltMasked(const TPoint &aPoint,
const CFbsBitmap *aBitmap,
const TRect &aSourceRect,
const CFbsBitmap *aMaskBitmap,
TBoolaInvertMask
)[virtual]

Reimplemented from CBitmapContext::BitBltMasked(const TPoint &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,TBool)

Performs a masked bitmap block transfer.

The function provides a concrete implementation of the pure virtual function CBitmapContext::BitBltMasked(). The function behaviour is the same as documented in that class.

There are several points to note about this implementation of BitBltMasked():

1.For best performance the aMaskBitmap and source aBitmap should have the same display mode as the destination device/bitmap.

2.For performance reasons this implementation does not validate the contents of the aMaskBitmap. The caller must ensure the mask pixels are either black or white otherwise undefined blitting causing unpredictable discoloration will result. This is especially true for index (where pixel is palette entry) display modes (e.g. EColor16). It is up to the caller to decide if they wish to utilise CFbsBitmap::IsMonochrome().

3.Alpha blending is used when the display mode of the mask bitmap aMaskBitmap is EGray256.

See also: CBitmapContext::BitBltMasked()

BrushColor ( )

IMPORT_C TRgbBrushColor()

Returns current setting of brush color.

CancelClipping ( )

IMPORT_C voidCancelClipping()

Cancels clipping rectangle and region.

CancelClippingRect ( )

IMPORT_C voidCancelClippingRect()[virtual]

Cancels any clipping rectangle. Clipping reverts to the full device area, the default. The function provides a concrete implementation of the pure virtual function CGraphicsContext::CancelClippingRect(). The function behaviour is the same as documented in that class.

See also: CGraphicsContext::CancelClippingRect()

CancelClippingRegion ( )

IMPORT_C voidCancelClippingRegion()[virtual]

Cancels the clipping region.

ChangeDevice ( CFbsDevice * )

IMPORT_C voidChangeDevice(CFbsDevice *aDevice)

Replace target device but keep the current state

Parameters
aDeviceThe target device

Clear ( )

IMPORT_C voidClear()[virtual]

Reimplemented from CBitmapContext::Clear()

Clears the whole bitmap or a rectangular area of a bitmap.

The cleared area is filled with the current brush colour.

The function provides a concrete implementation of the pure virtual function CBitmapContext::Clear(). The function behaviour is the same as documented in that class.

See also: CBitmapContext::Clear()

Clear ( const TRect & )

IMPORT_C voidClear(const TRect &aRect)[virtual]

Clears a rectangular area.

The cleared area is filled with the current brush colour.The function provides a concrete implementation of the pure virtual function CBitmapContext::Clear(const TRect& aRect). The function behaviour is the same as documented in that class.

CopyRect ( const TPoint &, const TRect & )

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

Copies a rectangle.

The function provides a concrete implementation of the pure virtual function CBitmapContext::CopyRect(). The function behaviour is the same as documented in that class.

CopySettings ( const CFbsBitGc & )

IMPORT_C voidCopySettings(const CFbsBitGc &aGc)

Copies all settings from the specified bitmap graphics context.

Parameters
aGcThe bitmap graphics context whose settings are to be copied.

Device ( )

IMPORT_C CGraphicsDevice *Device()const [virtual]

Gets a pointer to the graphics device for the graphics context. The graphics device is the device currently being drawn to. The function provides a concrete implementation of the pure virtual function CGraphicsContext::Device(). The function behaviour is the same as documented in that class.

See also: CGraphicsContext::Device()

DiscardBrushPattern ( )

IMPORT_C voidDiscardBrushPattern()[virtual]

Discards a non-built-in brush pattern. The function provides a concrete implementation of the pure virtual function CGraphicsContext::DiscardBrushPattern(). The function behaviour is the same as documented in that class.

See also: CGraphicsContext::DiscardBrushPattern()

DiscardFont ( )

IMPORT_C voidDiscardFont()[virtual]

Discards a selected device font. The function provides a concrete implementation of the pure virtual function CGraphicsContext::DiscardFont(). The function behaviour is the same as documented in that class.

See also: CGraphicsContext::DiscardFont()

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

IMPORT_C voidDrawArc(const TRect &aRect,
const TPoint &aStart,
const TPoint &aEnd
)[virtual]

Draws an arc.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawArc(). The function behaviour is the same as documented in that class.

DrawBitmap ( const TPoint &, const CFbsBitmap * )

IMPORT_C voidDrawBitmap(const TPoint &aTopLeft,
const CFbsBitmap *aSource
)[virtual]

Draws a bitmap.

The function has 3 overloads. The first draws the bitmap given the top left hand corner, doing a compress/stretch based on its internally stored size in twips. The second does a compress/stretch to fit a given rectangle. The third takes a rectangular section of the source bitmap and does a compress/stretch to fit a given destination rectangle.The functions provide a concrete implementation of the pure virtual function CGraphicsContext::DrawBitmap(). The function behaviour is the same as documented in that class.

DrawBitmap ( const TRect &, const CFbsBitmap * )

IMPORT_C voidDrawBitmap(const TRect &aDestRect,
const CFbsBitmap *aSource
)[virtual]

Draws a bitmap to fit a given rectangle.

The bitmap is compressed or stretched based on its internally stored size in pixels.

Notes:

This member function uses the bitmap's size in pixels and does a stretch/compress blit using a linear DDA.

As this function scales the bitmap, it is unavoidably slow. Therefore, where possible, use CBitmapContext::BitBlt() instead. If the bitmap has to be scaled, consider creating another bitmap along with an CFbsBitmapDevice etc., doing DrawBitmap() once and using BitBlt() subsequently.

Note that all bitmaps are clipped to the device boundaries.

See also: TLinearDDA

Parameters
aDestRectThe rectangle within which the bitmap is to be drawn.
aSourceA source bitmap.

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

IMPORT_C voidDrawBitmap(const TRect &aDestRect,
const CFbsBitmap *aSource,
const TRect &aSourceRect
)[virtual]

Draws a specified rectangle of a source bitmap to fit into a given destination rectangle.

Notes:

This member function uses rectangle sizes in pixels and does a stretch/compress blit using a linear DDA.

As this function scales the bitmap, it is unavoidably slow. Therefore, where possible, use CBitmapContext::BitBlt() instead. If the bitmap has to be scaled, consider creating another bitmap along with an CFbsBitmapDevice etc., doing DrawBitmap() once and using BitBlt() subsequently.

Note that all bitmaps are clipped to the device boundaries.

See also: TLinearDDA

Parameters
aDestRectThe rectangle within which the bitmap is to be drawn.
aSourceA source bitmap.
aSourceRectThe rectangle in the source bitmap that is copied to the destination rectangle.

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

IMPORT_C voidDrawBitmapMasked(const TRect &aDestRect,
const CFbsBitmap *aBitmap,
const TRect &aSourceRect,
const CFbsBitmap *aMaskBitmap,
TBoolaInvertMask
)[virtual]

The method draws a specified rectangle from a bitmap and its mask into another rectangle and does a compress/stretch to fit a given destination rectangle.

Note:

When using this function with a 256 Mask bitmap, it blends. Otherwise (e.g. with a 4bpp mask), this function masks rather than blends. If a user wants to blend the source into the destination they should use CFbsBitGc::AlphaBlendBitmaps() instead.

Pre-condition
aBitmap != NULL

aBitmap->Handle() != 0 aMaskBitmap != NULL aMaskBitmap->Handle() != 0 !aSourceRect.IsEmpty() aSourceRect should be in the bounds of the bitmap

Parameters
aDestRectThe rectangle within which the masked bitmap is to be drawn.
aBitmapA pointer to the source bitmap.
aSourceRectThe rectangle in the source bitmap that is copied to the destination rectangle.
aMaskBitmapA pointer to the mask bitmap.
aInvertMaskIf false, a source pixel that is masked by a black pixel is not transferred to the destination rectangle. If true, then a source pixel that is masked by a white pixel is not transferred to the destination rectangle.

DrawBitmapMasked ( const TRect &, const CWsBitmap *, const TRect &, const CWsBitmap *, TBool )

IMPORT_C voidDrawBitmapMasked(const TRect &aDestRect,
const CWsBitmap *aBitmap,
const TRect &aSourceRect,
const CWsBitmap *aMaskBitmap,
TBoolaInvertMask
)[virtual]

The method draws a specified rectangle from a bitmap and its mask into another rectangle and does a compress/stretch to fit a given destination rectangle.

This is an overload, which takes CWsBitmap* as argument, which in turn calls the other overload.

Note: A pointer to CWsBitmap must have the same pointer value as a pointer to the associated CFbsBitmap, otherwise code in BitGdi component will be Broken.

Note:

When using this function with a 256 Mask bitmap, it blends. Otherwise (e.g. with a 4bpp mask), this function masks rather than blends. If a user wants to blend the source into the destination they should use CFbsBitGc::AlphaBlendBitmaps() instead.

Pre-condition
aBitmap != NULL

aBitmap->Handle() != 0 aMaskBitmap != NULL aMaskBitmap->Handle() != 0 !aSourceRect.IsEmpty()

Parameters
aDestRectThe rectangle within which the masked bitmap is to be drawn.
aBitmapA pointer to the source bitmap.
aSourceRectThe rectangle in the source bitmap that is copied to the destination rectangle.
aMaskBitmapA pointer to the mask bitmap.
aInvertMaskIf false, a source pixel that is masked by a black pixel is not transferred to the destination rectangle. If true, then a source pixel that is masked by a white pixel is not transferred to the destination rectangle.

DrawEllipse ( const TRect & )

IMPORT_C voidDrawEllipse(const TRect &aRect)[virtual]

Draws and fills an ellipse.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawEllipse(). The function behaviour is the same as documented in that class.

DrawLine ( const TPoint &, const TPoint & )

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

Draws a straight line between two points.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawLine(). The function behaviour is the same as documented in that class.

DrawLineBy ( const TPoint & )

IMPORT_C voidDrawLineBy(const TPoint &aVector)[virtual]

Draws a straight line relative to the current drawing point, using a vector.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawLineBy(). The function behaviour is the same as documented in that class.

DrawLineTo ( const TPoint & )

IMPORT_C voidDrawLineTo(const TPoint &aPoint)[virtual]

Draws a straight line from the current drawing point to a specified point.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawLineTo(). The function behaviour is the same as documented in that class.

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

IMPORT_C voidDrawPie(const TRect &aRect,
const TPoint &aStart,
const TPoint &aEnd
)[virtual]

Draws and fills a pie slice.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawPie(). The function behaviour is the same as documented in that class.

DrawPolyLine ( const CArrayFix< TPoint > * )

IMPORT_C voidDrawPolyLine(const CArrayFix< TPoint > *aPointList)[virtual]

Draws a polyline from a set of points specified in a list.

The functions provides a concrete implementation of the pure virtual functions CGraphicsContext::DrawPolyLine(). The function behaviour is the same as documented in that class.

DrawPolyLine ( const TPoint *, TInt )

IMPORT_C voidDrawPolyLine(const TPoint *aPointList,
TIntaNumPoints
)[virtual]

Draws a polyline from a set of points specified in a list.

The functions provides a concrete implementation of the pure virtual functions CGraphicsContext::DrawPolyLine(). The function behaviour is the same as documented in that class.

DrawPolyLineNoEndPoint ( const CArrayFix< TPoint > * )

IMPORT_C voidDrawPolyLineNoEndPoint(const CArrayFix< TPoint > *aPointList)

Draws a polyline from a set of points specified in an array, but does not draw the final point of the last line.

Parameters
aPointListAn array containing the points on the polyline.

DrawPolyLineNoEndPoint ( const TPoint *, TInt )

IMPORT_C voidDrawPolyLineNoEndPoint(const TPoint *aPointList,
TIntaNumPoints
)

Draws a polyline from a set of points specified in a list, but does not draw the final point of the last line.

Parameters
aPointListPointer to a set of points on the polyline.
aNumPointsNumber of points in the list.

DrawPolygon ( const CArrayFix< TPoint > *, CGraphicsContext::TFillRule )

IMPORT_C TIntDrawPolygon(const CArrayFix< TPoint > *aPointList,
CGraphicsContext::TFillRuleaFillRule = CGraphicsContext::EAlternate
)[virtual]

Draws and fills a polygon defined using a list of points.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawPolygon(). The function behaviour is the same as documented in that class.

DrawPolygon ( const TPoint *, TInt, CGraphicsContext::TFillRule )

IMPORT_C TIntDrawPolygon(const TPoint *aPointList,
TIntaNumPoints,
CGraphicsContext::TFillRuleaFillRule = CGraphicsContext::EAlternate
)[virtual]

Draws and fills a polygon defined using a list of points.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawPolygon(). The function behaviour is the same as documented in that class.

DrawRect ( const TRect & )

IMPORT_C voidDrawRect(const TRect &aRect)[virtual]

Draws and fills a rectangle.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawRect(). The function behaviour is the same as documented in that class.

DrawRoundRect ( const TRect &, const TSize & )

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

Draws and fills a rectangle with rounded corners.

The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawRoundRect(). The function behaviour is the same as documented in that class.

DrawText ( const TDesC & )

IMPORT_C voidDrawText(const TDesC &aText)

Draws text at the last print position.

Parameters
aTextThe text string to be drawn.

DrawText ( const TDesC &, const TPoint & )

IMPORT_C voidDrawText(const TDesC &aText,
const TPoint &aPosition
)[virtual]

Draws text at the specified position and updates the print position.

Parameters
aTextThe text string to be drawn
aPositionCoordinates to draw the text at.

DrawText ( const TDesC &, const TRect & )

IMPORT_C voidDrawText(const TDesC &aText,
const TRect &aBox
)

Draws text clipped to the specified rectangle.

Parameters
aTextThe text string to be drawn
aBoxThe clipping rectangle.

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

IMPORT_C voidDrawText(const TDesC &aText,
const TRect &aBox,
TIntaBaselineOffset,
TTextAlignaHrz = ELeft,
TIntaMargin = 0
)[virtual]

Draws text clipped to the specified rectangle using a baseline offset, horizontal alignment and a margin.

Parameters
aTextThe text string to be drawn
aBoxThe clipping rectangle.
aBaselineOffsetAn offset in pixels for the baseline from the normal position (bottom of the rectangle minus the descent of the font).
aHrzHorizontal alignment option relative to the specified rectangle.
aMarginOffset to add to the position as calculated using specified rectangle.

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

IMPORT_C voidDrawText(const TDesC &aText,
const TRect &aBox,
TIntaBaselineOffset,
TIntaTextWidth,
TTextAlignaHrz = ELeft,
TIntaMargin = 0
)

Draws text clipped to the specified rectangle.

Parameters
aTextThe text string to be drawn
aBoxThe clipping rectangle.

DrawText ( const TDesC &, const TTextParameters * )

IMPORT_C voidDrawText(const TDesC &aText,
const TTextParameters *aParam
)

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

IMPORT_C voidDrawText(const TDesC &aText,
const TTextParameters *aParam,
const TPoint &aPosition
)

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

IMPORT_C voidDrawText(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aBox
)

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

IMPORT_C voidDrawText(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aBox,
TIntaBaselineOffset,
TTextAlignaHrz = ELeft,
TIntaMargin = 0
)

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

IMPORT_C voidDrawText(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aBox,
TIntaBaselineOffset,
TIntaTextWidth,
TTextAlignaHrz = ELeft,
TIntaMargin = 0
)

DrawTextVertical ( const TDesC &, TBool )

IMPORT_C voidDrawTextVertical(const TDesC &aText,
TBoolaUp
)

Draws text at the last print position and then rotates it into a vertical position.

Parameters
aTextThe text string to be drawn.
aUpETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.

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

IMPORT_C voidDrawTextVertical(const TDesC &aText,
const TPoint &aPosition,
TBoolaUp
)[virtual]

Draws text vertically from the specified position.

Parameters
aTextThe text string to be drawn.
aPositionA point specifying the position of the left end of the text.
aUpETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.

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

IMPORT_C voidDrawTextVertical(const TDesC &aText,
const TRect &aBox,
TBoolaUp
)

Draws text clipped to the specified rectangle and then rotates it into a vertical position.

Parameters
aTextThe text string to be drawn
aBoxThe clipping rectangle.
aUpETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.

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

IMPORT_C voidDrawTextVertical(const TDesC &aText,
const TRect &aBox,
TIntaBaselineOffset,
TBoolaUp,
TTextAlignaVert = ELeft,
TIntaMargin = 0
)[virtual]

Draws text vertically, clipped to a specified rectangle, using a baseline offset, alignment and margin.

Parameters
aTextThe text string to be drawn.
aBoxA rectangle to clip the text to.
aBaselineOffsetNumber of pixels to offset the baseline by.
aUpETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.
aVertVerticaly alignment of the text relative to the specified rectangle.
aMarginOffset of the text from the position within the rectangle, using the specified alignment.

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

IMPORT_C voidDrawTextVertical(const TDesC &aText,
const TRect &aBox,
TIntaBaselineOffset,
TIntaTextWidth,
TBoolaUp,
TTextAlignaVert = ELeft,
TIntaMargin = 0
)

Draws text vertically, clipped to a specified rectangle, using a baseline offset, alignment and margin.

Parameters
aTextThe text string to be drawn.
aBoxA rectangle to clip the text to.
aBaselineOffsetNumber of pixels to offset the baseline by.
aTextWidthNumber of pixels to clip the text to.
aUpETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.
aVertVerticaly alignment of the text relative to the specified rectangle.
aMarginOffset of the text from the position within the rectangle, using the specified alignment.

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

IMPORT_C voidDrawTextVertical(const TDesC &aText,
const TTextParameters *aParam,
TBoolaUp
)

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

IMPORT_C voidDrawTextVertical(const TDesC &aText,
const TTextParameters *aParam,
const TPoint &aPosition,
TBoolaUp
)

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

IMPORT_C voidDrawTextVertical(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aBox,
TBoolaUp
)

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

IMPORT_C voidDrawTextVertical(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aBox,
TIntaBaselineOffset,
TBoolaUp,
TTextAlignaVert = ELeft,
TIntaMargin = 0
)

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

IMPORT_C voidDrawTextVertical(const TDesC &aText,
const TTextParameters *aParam,
const TRect &aBox,
TIntaBaselineOffset,
TIntaTextWidth,
TBoolaUp,
TTextAlignaVert = ELeft,
TIntaMargin = 0
)

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aWriteStream)

Externalizes an object of this class to a write stream. It is important that the brush bitmap of the GC is maintained between calls to externalize and internalize. The brush bitmap handle is externalized, not the bitmap data. This is done for performance.

Parameters
aWriteStreamStream to which the object should be externalized.

FadeArea ( const TRegion * )

IMPORT_C voidFadeArea(const TRegion *aRegion)

Sets the fade area.

Parameters
aRegionThe region defining the fade area.

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(RReadStream &aReadStream)

Internalizes an object of this class from a read stream. It is important that the brush bitmap of the GC is maintained between calls to externalize and internalize. The brush bitmap handle is internalized, not the bitmap data.

Parameters
aReadStreamStream from which the object is to be internalized.

IsBrushPatternUsed ( )

IMPORT_C TBoolIsBrushPatternUsed()const

Tests whether a brush pattern is being used.

Return Value
ETrue, if a brush pattern is being used; EFalse, otherwise.

IsFontUsed ( )

IMPORT_C TBoolIsFontUsed()const

Tests whether a font is used.

Return Value
ETrue, if a font is being used; EFalse, otherwise.

Load16 ( const TUint8 * )

TInt16 Load16(const TUint8 *aPtr)[static, inline]

MapColors ( const TRect &, const TRgb *, TInt, TBool )

IMPORT_C voidMapColors(const TRect &aRect,
const TRgb *aColors,
TIntaNumPairs = 2,
TBoolaMapForwards = ETrue
)[virtual]

Maps pixels in the specified rectangle. The function tries to match the colour of a pixel with one of the RGB values in an array of RGB pairs. If there is a match, the colour is changed to the value specified in the other RGB in the RGB pair.

Parameters
aRectThe rectangle in which pixels are to be mapped.
aColorsA pointer to a set of RGB pairs.
aNumPairsThe number of pairs
aMapForwardsETrue, mapping is done from the first RGB to the second RGB in the pair; EFalse, mapping is done from the second RGB to the first RGB in the pair.

MoveBy ( const TPoint & )

IMPORT_C voidMoveBy(const TPoint &aVector)[virtual]

Sets the drawing point relative to the current co-ordinates. The function provides a concrete implementation of the pure virtual function CGraphicsContext::MoveBy(). The function behaviour is the same as documented in that class.

MoveTo ( const TPoint & )

IMPORT_C voidMoveTo(const TPoint &aPoint)[virtual]

Sets the internal drawing position relative to the co-ordinate origin. A subsequent call to DrawLineTo() or DrawLineBy() uses the new drawing point as the start point for the line drawn.The function provides a concrete implementation of the pure virtual function CGraphicsContext::MoveTo(). The function behaviour is the same as documented in that class.

NewL ( )

IMPORT_C CFbsBitGc *NewL()[static]

Factory function for creating a CFbsBitGc object The object is then ready for a call to Activate().

Return Value
A pointer to the newly created object.

OrientationsAvailable ( TBool )

IMPORT_C voidOrientationsAvailable(TBoolaOrientation)

Gets the orientations supported.

PenColor ( )

IMPORT_C TRgbPenColor()

Returns current setting of pen color.

Plot ( const TPoint & )

IMPORT_C voidPlot(const TPoint &aPoint)[virtual]

Draws a single point.

The point is drawn with the current pen settings using the current drawing mode.The function provides a concrete implementation of the pure virtual function CGraphicsContext::Plot(). The function behaviour is the same as documented in that class.

RectDrawnTo ( TRect & )

IMPORT_C voidRectDrawnTo(TRect &aRect)

Fetches the bounding rectangle of all drawing done since this function was last called.

Parameters
aRectThe bounding rectangle.

Reset ( )

IMPORT_C voidReset()[virtual]

Reimplemented from CGraphicsContext::Reset()

Resets the graphics context to its default settings. The function provides a concrete implementation of the pure virtual function CGraphicsContext::Reset(). The function behaviour is the same as documented in that class.

See also: CGraphicsContext::Reset()

Resized ( )

IMPORT_C voidResized()

Needs to be called if the device is resized. This only applies to devices of type CFbsBitmapDevice.

SetBrushColor ( const TRgb & )

IMPORT_C voidSetBrushColor(const TRgb &aColor)[virtual]

Sets the brush colour. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetBrushColor(). The function behaviour is the same as documented in that class.

SetBrushOrigin ( const TPoint & )

IMPORT_C voidSetBrushOrigin(const TPoint &aOrigin)[virtual]

Sets the brush pattern origin. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetBrushOrigin(). The function behaviour is the same as documented in that class.

SetBrushStyle ( TBrushStyle )

IMPORT_C voidSetBrushStyle(TBrushStyleaBrushStyle)[virtual]

Sets the brush style. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetBrushStyle(). The function behaviour is the same as documented in that class.

SetCharJustification ( TInt, TInt )

IMPORT_C voidSetCharJustification(TIntaExcessWidth,
TIntaNumGaps
)[virtual]

Sets the character justification. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetCharJustification(). The function behaviour is the same as documented in that class.

SetClippingRect ( const TRect & )

IMPORT_C voidSetClippingRect(const TRect &aRect)[virtual]

Sets the clipping rectangle. This function provides a concrete implementation of the pure virtual function CGraphicsContext::SetClippingRect(). The function behaviour is the same as documented in that class.

See also: CGraphicsContext::SetClippingRect()

SetClippingRegion ( const TRegion * )

IMPORT_C voidSetClippingRegion(const TRegion *aRegion)
Sets a clipping region by storing a pointer to the TRegion parameter. This function provides a concrete implementation of the pure virtual function CGraphicsContext::SetClippingRegion(). The function behaviour is the same as documented in that class.
Panic Codes
BITGDI10 if aRegion is invalid or if aRegion is not contained by the device area.

SetClippingRegion ( const TRegion & )

IMPORT_C TIntSetClippingRegion(const TRegion &aRegion)[virtual]

Sets a clipping region by storing a copy of the TRegion parameter.

See also: CGraphicsContext::SetClippingRegion().

Parameters
aRegionThe clipping region to be stored and used. aRegion must be valid and bounded withing the iDefaultRegion.
Return Value
KErrNone if successful; KErrArgument if aRegion is invalid, KErrMemory if the region could not be allocated.

SetDitherOrigin ( const TPoint & )

IMPORT_C voidSetDitherOrigin(const TPoint &aPoint)

Sets the dither origin. This is only useful for modes that do dithering. If the display is scrolled an odd number of pixels then the (2x2) dither pattern will not match up for new drawing unless this is called.

Parameters
aPointThe dither origin.

SetDrawMode ( TDrawMode )

IMPORT_C voidSetDrawMode(TDrawMode)[virtual]

Sets the drawing mode. This affects the colour that is actually drawn, because it defines the way that the current screen colour logically combines with the current pen colour and brush colour. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetDrawMode(). The function behaviour is the same as documented in that class.

See also: CGraphicsContext::SetDrawMode()

SetFadeMode ( TBool )

voidSetFadeMode(TBoolaFadeMode = EFalse)[inline]

SetFaded ( TBool )

IMPORT_C voidSetFaded(TBoolaFaded)[virtual]

Sets whether the graphics context is faded. The function provides a concrete implementation of the pure virtual function CBitmapContext::SetFaded(). The function behaviour is the same as documented in that class.

SetFadingParameters ( TUint8 )

voidSetFadingParameters(TUint8aBlackMap = 0)[inline]

SetFadingParameters ( TUint8, TUint8 )

IMPORT_C voidSetFadingParameters(TUint8aBlackMap,
TUint8aWhiteMap
)[virtual]

Set fading parameters. The function provides a concrete implementation of the pure virtual function CBitmapContext::SetFadingParameters(). The function behaviour is the same as documented in that class.

SetOrientation ( TGraphicsOrientation )

IMPORT_C TBoolSetOrientation(TGraphicsOrientationaOrientation)

Sets the orientation.

Parameters
aOrientationThe required orientation
Return Value
ETrue, if the requested orientation is supported; EFalse, otherwise.

SetOrigin ( const TPoint & )

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

Sets the position of the co-ordinate origin. All subsequent drawing operations are then done relative to this origin.The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetOrigin(). The function behaviour is the same as documented in that class.

SetPenColor ( const TRgb & )

IMPORT_C voidSetPenColor(const TRgb &aColor)[virtual]

Sets the pen colour. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetPenColor(). The function behaviour is the same as documented in that class.

SetPenSize ( const TSize & )

IMPORT_C voidSetPenSize(const TSize &aSize)[virtual]

Sets the line drawing size for the pen. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetPenSize(). The function behaviour is the same as documented in that class.

SetPenStyle ( TPenStyle )

IMPORT_C voidSetPenStyle(TPenStyle)[virtual]

Sets the line drawing style for the pen. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetPenStyle(). The function behaviour is the same as documented in that class.

See also: CGraphicsContext::SetPenStyle()

SetShadowMode ( TBool )

IMPORT_C voidSetShadowMode(TBoolaShadowMode = EFalse)

Sets the shadow mode on or off.

Parameters
aShadowModeETrue, shadow mode is on; EFalse, shadow mode is off. EFalse is the default.

SetStrikethroughStyle ( TFontStrikethrough )

IMPORT_C voidSetStrikethroughStyle(TFontStrikethroughaStrikethroughStyle)[virtual]

Sets the strikethrough style for all subsequently drawn text. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetStrikethroughStyle(). The function behaviour is the same as documented in that class.

SetUnderlineStyle ( TFontUnderline )

IMPORT_C voidSetUnderlineStyle(TFontUnderlineaUnderlineStyle)[virtual]

Sets the underline style for all subsequently drawn text. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetUnderlineStyle(). The function behaviour is the same as documented in that class.

SetUserDisplayMode ( TDisplayMode )

IMPORT_C voidSetUserDisplayMode(TDisplayModeaDisplayMode)

Simulates another graphics mode. Some devices running in some modes can simulate other modes (EGray16 will do EGray4 and EGray2, EGray4 will do EGray2).

Parameters
aDisplayModeThe display mode to be set.

SetWordJustification ( TInt, TInt )

IMPORT_C voidSetWordJustification(TIntaExcessWidth,
TIntaNumChars
)[virtual]

Sets the word justification. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetWordJustification(). The function behaviour is the same as documented in that class.

ShadowArea ( const TRegion * )

IMPORT_C voidShadowArea(const TRegion *aRegion)

Sets the shadow area.

Parameters
aRegionThe region defining the shadow area.

UpdateJustification ( const TDesC & )

IMPORT_C voidUpdateJustification(const TDesC &aText)

Updates the justification settings. This function assumes that ActivateNoJustAutoUpdate() has been used.

Parameters
aTextThe text for which justification is to be adjusted.

UpdateJustification ( const TDesC &, const TTextParameters * )

IMPORT_C voidUpdateJustification(const TDesC &aText,
const TTextParameters *aParam
)

Updates the justification settings. This function assumes that ActivateNoJustAutoUpdate() has been used.

Parameters
aTextThe text for which justification is to be adjusted.

UpdateJustificationVertical ( const TDesC &, TBool )

IMPORT_C voidUpdateJustificationVertical(const TDesC &aText,
TBoolaUp
)

Updates the justification for vertical text.

Parameters
aTextThe text for which justification is to be adjusted.
aUpETrue, if text is to be justified upwards;EFalse, if text is to be justified downwards.

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

IMPORT_C voidUpdateJustificationVertical(const TDesC &aText,
const TTextParameters *aParam,
TBoolaUp
)

Updates the justification for vertical text.

Parameters
aTextThe text for which justification is to be adjusted.
aUpETrue, if text is to be justified upwards;EFalse, if text is to be justified downwards.

UseBrushPattern ( const CFbsBitmap * )

IMPORT_C voidUseBrushPattern(const CFbsBitmap *aBitmap)[virtual]

Sets the specified bitmap to be used as the brush pattern.

Parameters
aBitmapThe bitmap.

UseBrushPattern ( TInt )

IMPORT_C TIntUseBrushPattern(TIntaFbsBitmapHandle)

Sets the specified bitmap to be used as the brush pattern.

Parameters
aFbsBitmapHandleThe handle number of the bitmap.
Return Value
KErrNone, if successful; otherwise another of the other system wide error codes.

UseFont ( const CFont * )

IMPORT_C voidUseFont(const CFont *aFont)[virtual]

Selects the device font, identified by handle number, to be used for text drawing. Notes: When the font is no longer required, use DiscardFont() to free up the memory used. If UseFont() is used again without using DiscardFont() then the previous font is discarded automatically. If no font has been selected, and an attempt is made to draw text with DrawText(), then a panic occurs.

See also: CFont

Return Value
The duplicate handle number for the device font.

UseFont ( TInt )

IMPORT_C TIntUseFont(TIntaFontHandle)

Selects the device font, identified by handle, to be used for text drawing. Notes:When the font is no longer required, use DiscardFont() to free up the memory used. If UseFont() is used again without using DiscardFont() then the previous font is discarded automatically.If no font has been selected, and an attempt is made to draw text with DrawText(), then a panic occurs.

Parameters
aFontHandleA handle for a device font.
Return Value
The result of CFbsFont::Duplicate().

UseFontNoDuplicate ( const CFbsBitGcFont * )

IMPORT_C voidUseFontNoDuplicate(const CFbsBitGcFont *aFont)

Selects a device font for text drawing but does not take a copy. The original must not be destroyed until UseFont(), UseFontNoDuplicate(), DiscardFont() or the destructor is called.

Parameters
aFontA pointer to the font to be used.