Symbian
Symbian OS Library

SYMBIAN OS V9.2

[Index] [Spacer] [Previous] [Next]



Location: BITSTD.H
Link against: bitgdi.lib

Class CFbsBitGc

class CFbsBitGc : public CBitmapContext;

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.

Derivation

Members

Defined in CFbsBitGc:
APIExtension(), Activate(), ActivateNoJustAutoUpdate(), AlphaBlendBitmaps(), AlphaBlendBitmaps(), AlphaBlendBitmaps(), BitBlt(), BitBlt(), BitBlt(), BitBlt(), BitBltMasked(), CancelClipping(), CancelClippingRect(), CancelClippingRegion(), Clear(), Clear(), CopyRect(), CopySettings(), Device(), DiscardBrushPattern(), DiscardFont(), DrawArc(), DrawBitmap(), DrawBitmap(), DrawBitmap(), DrawBitmapMasked(), DrawBitmapMasked(), DrawEllipse(), DrawLine(), DrawLineBy(), DrawLineTo(), DrawPie(), DrawPolyLine(), DrawPolyLine(), DrawPolyLineNoEndPoint(), DrawPolyLineNoEndPoint(), DrawPolygon(), DrawPolygon(), DrawRect(), DrawRoundRect(), DrawText(), DrawText(), DrawText(), DrawText(), DrawText(), DrawTextVertical(), DrawTextVertical(), DrawTextVertical(), DrawTextVertical(), DrawTextVertical(), EGraphicsOrientationNormal, EGraphicsOrientationRotated180, EGraphicsOrientationRotated270, EGraphicsOrientationRotated90, FadeArea(), IsBrushPatternUsed(), IsFontUsed(), Load16(), MapColors(), MoveBy(), MoveTo(), NewL(), OrientationsAvailable(), Plot(), RectDrawnTo(), Reserved_CBitmapContext_1(), Reserved_CBitmapContext_2(), Reserved_CBitmapContext_3(), Reserved_CFbsBitGc_1(), Reserved_CFbsBitGc_2(), Reserved_CFbsBitGc_3(), Reserved_CFbsBitGc_4(), Reserved_CFbsBitGc_5(), Reserved_CGraphicsContext_2(), Reset(), Resized(), SetBrushColor(), SetBrushOrigin(), SetBrushStyle(), SetCharJustification(), SetClippingRect(), SetClippingRegion(), SetClippingRegion(), SetDitherOrigin(), SetDrawMode(), SetFadeMode(), SetFaded(), SetFadingParameters(), SetFadingParameters(), SetOrientation(), SetOrigin(), SetPenColor(), SetPenSize(), SetPenStyle(), SetShadowMode(), SetStrikethroughStyle(), SetUnderlineStyle(), SetUserDisplayMode(), SetWordJustification(), ShadowArea(), TGraphicsOrientation, UpdateJustification(), UpdateJustificationVertical(), UseBrushPattern(), UseBrushPattern(), UseFont(), UseFont(), UseFontNoDuplicate(), ~CFbsBitGc()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CGraphicsContext:
DrawTextExtended(), EAlternate, EAnd, ECenter, EDashedPen, EDiamondCrossHatchBrush, EDotDashPen, EDotDotDashPen, EDottedPen, EDrawModeAND, EDrawModeANDNOT, EDrawModeNOTAND, EDrawModeNOTANDNOT, EDrawModeNOTOR, EDrawModeNOTORNOT, EDrawModeNOTPEN, EDrawModeNOTSCREEN, EDrawModeNOTXOR, EDrawModeOR, EDrawModeORNOT, EDrawModePEN, EDrawModeWriteAlpha, EDrawModeXOR, EForwardDiagonalHatchBrush, EHorizontalHatchBrush, EInvertPen, EInvertScreen, ELeft, ELogicalOp, ENullBrush, ENullPen, EOr, EPatternedBrush, EPenmode, ERearwardDiagonalHatchBrush, ERight, ESolidBrush, ESolidPen, ESquareCrossHatchBrush, EVerticalHatchBrush, EWinding, EWriteAlpha, EXor, GetUnderlineMetrics(), JustificationInPixels(), Reserved(), TBrushStyle, TDrawMode, TDrawModeComponents, TDrawTextExtendedParam, TDrawTextParam, TFillRule, TPenStyle, TTextAlign


Construction and destruction


NewL()

static IMPORT_C CFbsBitGc *NewL();

Description

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

Return value

CFbsBitGc *

A pointer to the newly created object.


~CFbsBitGc()

virtual IMPORT_C ~CFbsBitGc();

Description

Frees all resources owned by the object.

[Top]


Member functions


Activate()

IMPORT_C void Activate(CFbsDevice *aDevice);

Description

Sets the object to draw to a particular device

Parameters

CFbsDevice *aDevice

The target device.


ActivateNoJustAutoUpdate()

IMPORT_C void ActivateNoJustAutoUpdate(CFbsDevice *aDevice);

Description

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

CFbsDevice *aDevice

The target device.


BitBlt()

IMPORT_C void BitBlt(const TPoint &aPoint, const CFbsBitGc &aGc);

Description

Draws from another CFbsBitGc.

Parameters

const TPoint &aPoint

The position to draw the top left corner of the piece of bitmap

const CFbsBitGc &aGc

The source bitmap graphics context


BitBlt()

IMPORT_C void BitBlt(const TPoint &aPoint, const CFbsBitGc &aGc, const TRect &aSourceRect);

Description

Draws a particular rectangle from another CFbsBitGc.

Parameters

const TPoint &aPoint

The position to draw the top left corner of the piece of bitmap.

const CFbsBitGc &aGc

The source bitmap graphics context.

const TRect &aSourceRect

A rectangle defining the piece of the source to be drawn.


BitBlt()

virtual IMPORT_C void BitBlt(const TPoint &aPoint, const CFbsBitmap *aBitmap);

Description

Draws the whole of a CFbsBitmap.

Parameters

const TPoint &aPoint

The position to draw the top left corner of the bitmap.

const CFbsBitmap *aBitmap

The source bitmap.


BitBlt()

virtual IMPORT_C void BitBlt(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect);

Description

Draws a particular rectangle from a CFbsBitmap.

Parameters

const TPoint &aPoint

The position to draw the top left corner of the bitmap.

const CFbsBitmap *aBitmap

The source bitmap.

const TRect &aSourceRect

A rectangle defining the piece of the source to be drawn.


BitBltMasked()

virtual IMPORT_C void BitBltMasked(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask);

Description

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 aMaskBitmap is EGray256.

Parameters

const TPoint &aPoint

const CFbsBitmap *aBitmap

const TRect &aSourceRect

const CFbsBitmap *aMaskBitmap

TBool aInvertMask

See also:


CancelClipping()

IMPORT_C void CancelClipping();

Description

Cancels clipping rectangle and region.


CancelClippingRect()

virtual IMPORT_C void CancelClippingRect();

Description

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:


CancelClippingRegion()

virtual IMPORT_C void CancelClippingRegion();

Description

Cancels the clipping region.


Clear()

virtual IMPORT_C void Clear();

Description

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:


Clear()

virtual IMPORT_C void Clear(const TRect &aRect);

Description

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.

Parameters

const TRect &aRect


CopyRect()

virtual IMPORT_C void CopyRect(const TPoint &aOffset, const TRect &aRect);

Description

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.

Parameters

const TPoint &aOffset

const TRect &aRect


CopySettings()

IMPORT_C void CopySettings(const CFbsBitGc &aGc);

Description

Copies all settings from the specified bitmap graphics context.

Parameters

const CFbsBitGc &aGc

The bitmap graphics context whose settings are to be copied.


Device()

virtual IMPORT_C CGraphicsDevice *Device() const;

Description

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.

Return value

CGraphicsDevice *

See also:


DiscardBrushPattern()

virtual IMPORT_C void DiscardBrushPattern();

Description

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:


DiscardFont()

virtual IMPORT_C void DiscardFont();

Description

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:


DrawArc()

virtual IMPORT_C void DrawArc(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd);

Description

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.

Parameters

const TRect &aRect

const TPoint &aStart

const TPoint &aEnd


DrawPie()

virtual IMPORT_C void DrawPie(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd);

Description

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.

Parameters

const TRect &aRect

const TPoint &aStart

const TPoint &aEnd


DrawBitmap()

virtual IMPORT_C void DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aSource);

Description

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.

Parameters

const TPoint &aTopLeft

const CFbsBitmap *aSource


DrawBitmap()

virtual IMPORT_C void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource);

Description

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.

Parameters

const TRect &aDestRect

The rectangle within which the bitmap is to be drawn.

const CFbsBitmap *aSource

A source bitmap.

See also:


DrawBitmap()

virtual IMPORT_C void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource, const TRect &aSourceRect);

Description

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.

Parameters

const TRect &aDestRect

The rectangle within which the bitmap is to be drawn.

const CFbsBitmap *aSource

A source bitmap.

const TRect &aSourceRect

The rectangle in the source bitmap that is copied to the destination rectangle.

See also:


DrawBitmapMasked()

virtual IMPORT_C void DrawBitmapMasked(const TRect &aDestRect, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask);

Pre-Condition

aBitmap != NULL

aBitmap->Handle() != 0

aMaskBitmap != NULL

aMaskBitmap->Handle() != 0

!aSourceRect.IsEmpty()

Description

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.

Parameters

const TRect &aDestRect

The rectangle within which the masked bitmap is to be drawn.

const CFbsBitmap *aBitmap

A pointer to the source bitmap.

const TRect &aSourceRect

The rectangle in the source bitmap that is copied to the destination rectangle.

const CFbsBitmap *aMaskBitmap

A pointer to the mask bitmap.

TBool aInvertMask

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

virtual IMPORT_C void DrawBitmapMasked(const TRect &aDestRect, const CWsBitmap *aBitmap, const TRect &aSourceRect, const CWsBitmap *aMaskBitmap, TBool aInvertMask);

Pre-Condition

aBitmap != NULL

aBitmap->Handle() != 0

aMaskBitmap != NULL

aMaskBitmap->Handle() != 0

!aSourceRect.IsEmpty()

Description

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.

Parameters

const TRect &aDestRect

The rectangle within which the masked bitmap is to be drawn.

const CWsBitmap *aBitmap

A pointer to the source bitmap.

const TRect &aSourceRect

The rectangle in the source bitmap that is copied to the destination rectangle.

const CWsBitmap *aMaskBitmap

A pointer to the mask bitmap.

TBool aInvertMask

If 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.


DrawRoundRect()

virtual IMPORT_C void DrawRoundRect(const TRect &aRect, const TSize &aEllipse);

Description

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.

Parameters

const TRect &aRect

const TSize &aEllipse


DrawPolyLine()

virtual IMPORT_C void DrawPolyLine(const CArrayFix< TPoint > *aPointList);

Description

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.

Parameters

const CArrayFix< TPoint > *aPointList


DrawPolyLineNoEndPoint()

IMPORT_C void DrawPolyLineNoEndPoint(const CArrayFix< TPoint > *aPointList);

Description

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

Parameters

const CArrayFix< TPoint > *aPointList

An array containing the points on the polyline.


DrawPolyLine()

virtual IMPORT_C void DrawPolyLine(const TPoint *aPointList, TInt aNumPoints);

Description

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.

Parameters

const TPoint *aPointList

TInt aNumPoints


DrawPolyLineNoEndPoint()

IMPORT_C void DrawPolyLineNoEndPoint(const TPoint *aPointList, TInt aNumPoints);

Description

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

Parameters

const TPoint *aPointList

Pointer to a set of points on the polyline.

TInt aNumPoints

Number of points in the list.


DrawPolygon()

IMPORT_C TInt DrawPolygon(const CArrayFix< TPoint > *aPointList, CGraphicsContext::TFillRule aFillRule=CGraphicsContext::EAlternate);

Description

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.

Parameters

const CArrayFix< TPoint > *aPointList

CGraphicsContext::TFillRule aFillRule

Return value

TInt


DrawPolygon()

IMPORT_C TInt DrawPolygon(const TPoint *aPointList, TInt aNumPoints, CGraphicsContext::TFillRule aFillRule=CGraphicsContext::EAlternate);

Description

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.

Parameters

const TPoint *aPointList

TInt aNumPoints

CGraphicsContext::TFillRule aFillRule

Return value

TInt


DrawEllipse()

virtual IMPORT_C void DrawEllipse(const TRect &aRect);

Description

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.

Parameters

const TRect &aRect


DrawLine()

virtual IMPORT_C void DrawLine(const TPoint &aStart, const TPoint &aEnd);

Description

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.

Parameters

const TPoint &aStart

const TPoint &aEnd


DrawLineTo()

virtual IMPORT_C void DrawLineTo(const TPoint &aPoint);

Description

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.

Parameters

const TPoint &aPoint


DrawLineBy()

virtual IMPORT_C void DrawLineBy(const TPoint &aVector);

Description

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.

Parameters

const TPoint &aVector


DrawRect()

virtual IMPORT_C void DrawRect(const TRect &aRect);

Description

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.

Parameters

const TRect &aRect


DrawText()

IMPORT_C void DrawText(const TDesC &aText);

Description

Draws text at the last print position.

Parameters

const TDesC &aText

The text string to be drawn.


DrawText()

virtual IMPORT_C void DrawText(const TDesC &aText, const TPoint &aPosition);

Description

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

Parameters

const TDesC &aText

The text string to be drawn

const TPoint &aPosition

Coordinates to draw the text at.


DrawText()

IMPORT_C void DrawText(const TDesC &aText, const TRect &aBox);

Description

Draws text clipped to the specified rectangle.

Parameters

const TDesC &aText

The text string to be drawn

const TRect &aBox

The clipping rectangle.


DrawText()

virtual IMPORT_C void DrawText(const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TTextAlign aHrz=ELeft, TInt aMargin=0);

Description

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

Parameters

const TDesC &aText

The text string to be drawn

const TRect &aBox

The clipping rectangle.

TInt aBaselineOffset

An offset in pixels for the baseline from the normal position (bottom of the rectangle minus the descent of the font).

TTextAlign aHrz

Horizontal alignment option relative to the specified rectangle.

TInt aMargin

Offset to add to the position as calculated using specified rectangle.


DrawText()

IMPORT_C void DrawText(const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TInt aTextWidth, TTextAlign aHrz=ELeft, TInt aMargin=0);

Description

Draws text clipped to the specified rectangle.

Parameters

const TDesC &aText

The text string to be drawn

const TRect &aBox

The clipping rectangle.

TInt aBaselineOffset

TInt aTextWidth

TTextAlign aHrz

TInt aMargin


DrawTextVertical()

IMPORT_C void DrawTextVertical(const TDesC &aText, TBool aUp);

Description

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

Parameters

const TDesC &aText

The text string to be drawn.

TBool aUp

ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.


DrawTextVertical()

virtual IMPORT_C void DrawTextVertical(const TDesC &aText, const TPoint &aPosition, TBool aUp);

Description

Draws text vertically from the specified position.

Parameters

const TDesC &aText

The text string to be drawn.

const TPoint &aPosition

A point specifying the position of the left end of the text.

TBool aUp

ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.


DrawTextVertical()

IMPORT_C void DrawTextVertical(const TDesC &aText, const TRect &aBox, TBool aUp);

Description

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

Parameters

const TDesC &aText

The text string to be drawn

const TRect &aBox

The clipping rectangle.

TBool aUp

ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.


DrawTextVertical()

virtual IMPORT_C void DrawTextVertical(const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TBool aUp, TTextAlign aVert=ELeft, TInt aMargin=0);

Description

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

Parameters

const TDesC &aText

The text string to be drawn.

const TRect &aBox

A rectangle to clip the text to.

TInt aBaselineOffset

Number of pixels to offset the baseline by.

TBool aUp

ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.

TTextAlign aVert

Verticaly alignment of the text relative to the specified rectangle.

TInt aMargin

Offset of the text from the position within the rectangle, using the specified alignment.


DrawTextVertical()

IMPORT_C void DrawTextVertical(const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TInt aTextWidth, TBool aUp, TTextAlign aVert=ELeft, TInt aMargin=0);

Description

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

Parameters

const TDesC &aText

The text string to be drawn.

const TRect &aBox

A rectangle to clip the text to.

TInt aBaselineOffset

Number of pixels to offset the baseline by.

TInt aTextWidth

Number of pixels to clip the text to.

TBool aUp

ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise.

TTextAlign aVert

Verticaly alignment of the text relative to the specified rectangle.

TInt aMargin

Offset of the text from the position within the rectangle, using the specified alignment.


MapColors()

virtual IMPORT_C void MapColors(const TRect &aRect, const TRgb *aColors, TInt aNumPairs=2, TBool aMapForwards=ETrue);

Description

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

const TRect &aRect

The rectangle in which pixels are to be mapped.

const TRgb *aColors

A pointer to a set of RGB pairs.

TInt aNumPairs

The number of pairs

TBool aMapForwards

ETrue, 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.


MoveTo()

virtual IMPORT_C void MoveTo(const TPoint &aPoint);

Description

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.

Parameters

const TPoint &aPoint


MoveBy()

virtual IMPORT_C void MoveBy(const TPoint &aVector);

Description

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.

Parameters

const TPoint &aVector


OrientationsAvailable()

IMPORT_C void OrientationsAvailable(TBool aOrientation[4]);

Description

Gets the orientations supported.

Parameters

TBool aOrientation


Plot()

virtual IMPORT_C void Plot(const TPoint &aPoint);

Description

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.

Parameters

const TPoint &aPoint


RectDrawnTo()

IMPORT_C void RectDrawnTo(TRect &aRect);

Description

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

Parameters

TRect &aRect

The bounding rectangle.


Reset()

virtual IMPORT_C void Reset();

Description

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:


Resized()

IMPORT_C void Resized();

Description

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


SetBrushColor()

virtual IMPORT_C void SetBrushColor(const TRgb &aColor);

Description

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.

Parameters

const TRgb &aColor


SetBrushOrigin()

virtual IMPORT_C void SetBrushOrigin(const TPoint &aOrigin);

Description

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.

Parameters

const TPoint &aOrigin


SetBrushStyle()

virtual IMPORT_C void SetBrushStyle(TBrushStyle aBrushStyle);

Description

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.

Parameters

TBrushStyle aBrushStyle


SetClippingRegion()

IMPORT_C void SetClippingRegion(const TRegion *aRegion);

Description

Sets a clipping region by storing a pointer to the TRegion parameter.

Parameters

const TRegion *aRegion

The clipping region.


SetClippingRect()

virtual IMPORT_C void SetClippingRect(const TRect &aRect);

Description

Sets the clipping rectangle the area of visible drawing depends on the clipping region. The default clipping rectangle is the full device area.The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetClippingRect(). The function behaviour is the same as documented in that class.

Parameters

const TRect &aRect


SetDitherOrigin()

IMPORT_C void SetDitherOrigin(const TPoint &aPoint);

Description

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

const TPoint &aPoint

The dither origin.


SetDrawMode()

IMPORT_C void SetDrawMode(TDrawMode);

Description

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.

Parameters

TDrawMode

See also:


SetOrigin()

virtual IMPORT_C void SetOrigin(const TPoint &aPoint=TPoint(0, 0));

Description

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.

Parameters

const TPoint &aPoint


SetPenColor()

virtual IMPORT_C void SetPenColor(const TRgb &aColor);

Description

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.

Parameters

const TRgb &aColor


SetPenStyle()

virtual IMPORT_C void SetPenStyle(TPenStyle);

Description

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.

Parameters

TPenStyle

See also:


SetPenSize()

virtual IMPORT_C void SetPenSize(const TSize &aSize);

Description

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.

Parameters

const TSize &aSize