#include <bitstd.h>
Link against: bitgdi.lib
class CFbsBitGc : public CBitmapContext |
Public Member Enumerations | |
---|---|
enum | TGraphicsOrientation { EGraphicsOrientationNormal, EGraphicsOrientationRotated90, EGraphicsOrientationRotated180, EGraphicsOrientationRotated270 } |
Public Member Functions | |
---|---|
virtual | ~CFbsBitGc() |
IMPORT_C void | Activate(CFbsDevice *) |
IMPORT_C void | ActivateNoJustAutoUpdate(CFbsDevice *) |
IMPORT_C TInt | AlphaBlendBitmaps(const TPoint &, const CFbsBitmap *, const CFbsBitmap *, const TRect &, const TPoint &, const CFbsBitmap *, const TPoint &) |
virtual IMPORT_C TInt | AlphaBlendBitmaps(const TPoint &, const CFbsBitmap *, const TRect &, const CFbsBitmap *, const TPoint &) |
virtual IMPORT_C TInt | AlphaBlendBitmaps(const TPoint &, const CWsBitmap *, const TRect &, const CWsBitmap *, const TPoint &) |
IMPORT_C void | BitBlt(const TPoint &, const CFbsBitGc &) |
IMPORT_C void | BitBlt(const TPoint &, const CFbsBitGc &, const TRect &) |
virtual IMPORT_C void | BitBlt(const TPoint &, const CFbsBitmap *) |
virtual IMPORT_C void | BitBlt(const TPoint &, const CFbsBitmap *, const TRect &) |
virtual IMPORT_C void | BitBltMasked(const TPoint &, const CFbsBitmap *, const TRect &, const CFbsBitmap *, TBool) |
IMPORT_C TRgb | BrushColor() |
IMPORT_C void | CancelClipping() |
virtual IMPORT_C void | CancelClippingRect() |
virtual IMPORT_C void | CancelClippingRegion() |
IMPORT_C void | ChangeDevice(CFbsDevice *) |
virtual IMPORT_C void | Clear() |
virtual IMPORT_C void | Clear(const TRect &) |
virtual IMPORT_C void | CopyRect(const TPoint &, const TRect &) |
IMPORT_C void | CopySettings(const CFbsBitGc &) |
virtual IMPORT_C CGraphicsDevice * | Device() |
virtual IMPORT_C void | DiscardBrushPattern() |
virtual IMPORT_C void | DiscardFont() |
virtual IMPORT_C void | DrawArc(const TRect &, const TPoint &, const TPoint &) |
virtual IMPORT_C void | DrawBitmap(const TPoint &, const CFbsBitmap *) |
virtual IMPORT_C void | DrawBitmap(const TRect &, const CFbsBitmap *) |
virtual IMPORT_C void | DrawBitmap(const TRect &, const CFbsBitmap *, const TRect &) |
virtual IMPORT_C void | DrawBitmapMasked(const TRect &, const CFbsBitmap *, const TRect &, const CFbsBitmap *, TBool) |
virtual IMPORT_C void | DrawBitmapMasked(const TRect &, const CWsBitmap *, const TRect &, const CWsBitmap *, TBool) |
virtual IMPORT_C void | DrawEllipse(const TRect &) |
virtual IMPORT_C void | DrawLine(const TPoint &, const TPoint &) |
virtual IMPORT_C void | DrawLineBy(const TPoint &) |
virtual IMPORT_C void | DrawLineTo(const TPoint &) |
virtual IMPORT_C void | DrawPie(const TRect &, const TPoint &, const TPoint &) |
virtual IMPORT_C void | DrawPolyLine(const CArrayFix< TPoint > *) |
virtual IMPORT_C void | DrawPolyLine(const TPoint *, TInt) |
IMPORT_C void | DrawPolyLineNoEndPoint(const CArrayFix< TPoint > *) |
IMPORT_C void | DrawPolyLineNoEndPoint(const TPoint *, TInt) |
virtual IMPORT_C TInt | DrawPolygon(const CArrayFix< TPoint > *, CGraphicsContext::TFillRule) |
virtual IMPORT_C TInt | DrawPolygon(const TPoint *, TInt, CGraphicsContext::TFillRule) |
virtual IMPORT_C void | DrawRect(const TRect &) |
virtual IMPORT_C void | DrawRoundRect(const TRect &, const TSize &) |
IMPORT_C void | DrawText(const TDesC &) |
virtual IMPORT_C void | DrawText(const TDesC &, const TPoint &) |
IMPORT_C void | DrawText(const TDesC &, const TRect &) |
virtual IMPORT_C void | DrawText(const TDesC &, const TRect &, TInt, TTextAlign, TInt) |
IMPORT_C void | DrawText(const TDesC &, const TRect &, TInt, TInt, TTextAlign, TInt) |
IMPORT_C void | DrawText(const TDesC &, const TTextParameters *) |
IMPORT_C void | DrawText(const TDesC &, const TTextParameters *, const TPoint &) |
IMPORT_C void | DrawText(const TDesC &, const TTextParameters *, const TRect &) |
IMPORT_C void | DrawText(const TDesC &, const TTextParameters *, const TRect &, TInt, TTextAlign, TInt) |
IMPORT_C void | DrawText(const TDesC &, const TTextParameters *, const TRect &, TInt, TInt, TTextAlign, TInt) |
IMPORT_C void | DrawTextVertical(const TDesC &, TBool) |
virtual IMPORT_C void | DrawTextVertical(const TDesC &, const TPoint &, TBool) |
IMPORT_C void | DrawTextVertical(const TDesC &, const TRect &, TBool) |
virtual IMPORT_C void | DrawTextVertical(const TDesC &, const TRect &, TInt, TBool, TTextAlign, TInt) |
IMPORT_C void | DrawTextVertical(const TDesC &, const TRect &, TInt, TInt, TBool, TTextAlign, TInt) |
IMPORT_C void | DrawTextVertical(const TDesC &, const TTextParameters *, TBool) |
IMPORT_C void | DrawTextVertical(const TDesC &, const TTextParameters *, const TPoint &, TBool) |
IMPORT_C void | DrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TBool) |
IMPORT_C void | DrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TInt, TBool, TTextAlign, TInt) |
IMPORT_C void | DrawTextVertical(const TDesC &, const TTextParameters *, const TRect &, TInt, TInt, TBool, TTextAlign, TInt) |
IMPORT_C void | ExternalizeL(RWriteStream &) |
IMPORT_C void | FadeArea(const TRegion *) |
IMPORT_C void | InternalizeL(RReadStream &) |
IMPORT_C TBool | IsBrushPatternUsed() |
IMPORT_C TBool | IsFontUsed() |
TInt16 | Load16(const TUint8 *) |
virtual IMPORT_C void | MapColors(const TRect &, const TRgb *, TInt, TBool) |
virtual IMPORT_C void | MoveBy(const TPoint &) |
virtual IMPORT_C void | MoveTo(const TPoint &) |
IMPORT_C CFbsBitGc * | NewL() |
IMPORT_C void | OrientationsAvailable(TBool) |
IMPORT_C TRgb | PenColor() |
virtual IMPORT_C void | Plot(const TPoint &) |
IMPORT_C void | RectDrawnTo(TRect &) |
virtual IMPORT_C void | Reset() |
IMPORT_C void | Resized() |
virtual IMPORT_C void | SetBrushColor(const TRgb &) |
virtual IMPORT_C void | SetBrushOrigin(const TPoint &) |
virtual IMPORT_C void | SetBrushStyle(TBrushStyle) |
virtual IMPORT_C void | SetCharJustification(TInt, TInt) |
virtual IMPORT_C void | SetClippingRect(const TRect &) |
IMPORT_C void | SetClippingRegion(const TRegion *) |
virtual IMPORT_C TInt | SetClippingRegion(const TRegion &) |
IMPORT_C void | SetDitherOrigin(const TPoint &) |
virtual IMPORT_C void | SetDrawMode(TDrawMode) |
void | SetFadeMode(TBool) |
virtual IMPORT_C void | SetFaded(TBool) |
void | SetFadingParameters(TUint8) |
virtual IMPORT_C void | SetFadingParameters(TUint8, TUint8) |
IMPORT_C TBool | SetOrientation(TGraphicsOrientation) |
virtual IMPORT_C void | SetOrigin(const TPoint &) |
virtual IMPORT_C void | SetPenColor(const TRgb &) |
virtual IMPORT_C void | SetPenSize(const TSize &) |
virtual IMPORT_C void | SetPenStyle(TPenStyle) |
IMPORT_C void | SetShadowMode(TBool) |
virtual IMPORT_C void | SetStrikethroughStyle(TFontStrikethrough) |
virtual IMPORT_C void | SetUnderlineStyle(TFontUnderline) |
IMPORT_C void | SetUserDisplayMode(TDisplayMode) |
virtual IMPORT_C void | SetWordJustification(TInt, TInt) |
IMPORT_C void | ShadowArea(const TRegion *) |
IMPORT_C void | UpdateJustification(const TDesC &) |
IMPORT_C void | UpdateJustification(const TDesC &, const TTextParameters *) |
IMPORT_C void | UpdateJustificationVertical(const TDesC &, TBool) |
IMPORT_C void | UpdateJustificationVertical(const TDesC &, const TTextParameters *, TBool) |
virtual IMPORT_C void | UseBrushPattern(const CFbsBitmap *) |
IMPORT_C TInt | UseBrushPattern(TInt) |
virtual IMPORT_C void | UseFont(const CFont *) |
IMPORT_C TInt | UseFont(TInt) |
IMPORT_C void | UseFontNoDuplicate(const CFbsBitGcFont *) |
Protected Member Functions | |
---|---|
virtual IMPORT_C TInt | APIExtension(TUid, TAny *&, TAny *) |
Inherited Enumerations | |
---|---|
CGraphicsContext:TBrushStyle | |
CGraphicsContext:TDrawMode | |
CGraphicsContext:TDrawModeComponents | |
CGraphicsContext:TFillRule | |
CGraphicsContext:TPenStyle | |
CGraphicsContext:TTextAlign |
Concrete implementation of a bitmapped graphics context.
The class provides new functionality, and implementations of the pure virtual functions defined in CGraphicsContext and CBitmapContext.
Defines possible rotation values.
Enumerator | Value | Description |
---|---|---|
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. |
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 | |
---|---|
aUid | The unique identifier for the method that is required. Selected internally by a series of "if" statements. |
aOutput | is 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. |
aInput | is a TAny pointer used to input data. |
IMPORT_C void | Activate | ( | CFbsDevice * | aDevice | ) |
Sets the object to draw to a particular device
Parameters | |
---|---|
aDevice | The target device. |
IMPORT_C void | ActivateNoJustAutoUpdate | ( | 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 | |
---|---|
aDevice | The target device. |
IMPORT_C TInt | AlphaBlendBitmaps | ( | const TPoint & | aDestPt, |
const CFbsBitmap * | aSrcBmp1, | |||
const CFbsBitmap * | aSrcBmp2, | |||
const TRect & | aSrcRect1, | |||
const TPoint & | aSrcPt2, | |||
const CFbsBitmap * | aAlphaBmp, | |||
const TPoint & | aAlphaPt | |||
) |
C1 - a pixel from aSrcBmp1;
C2 - a pixel from aSrcBmp2;
aSrcBmp1 != NULL aSrcBmp1->Handle() != NULL aSrcBmp2 != NULL aSrcBmp2->Handle() != NULL aAlphaBmp != NULL aAlphaBmp->Handle() != NULL aAlphaBmp->DisplayMode() <= EGray256
Parameters | |
---|---|
aDestPt | Position in the target the result should be drawn to. |
aSrcBmp1 | A pointer to the source bitmap 1. |
aSrcBmp2 | A pointer to the source bitmap 2. |
aSrcRect1 | A part of bitmap 1 that should be used as a source for the alpha blending. |
aSrcPt2 | Position 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. |
aAlphaBmp | A pointer to the bitmap used as an alpha blending factor. |
aAlphaPt | Position 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. |
IMPORT_C TInt | AlphaBlendBitmaps | ( | 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 &)
C - a pixel from aSrcBmp;
D - a pixel from the destination;
aSrcBmp != NULL aSrcBmp->Handle() != NULL aAlphaBmp != NULL aAlphaBmp->Handle() != NULL aAlphaBmp->DisplayMode() <= EGray256
Parameters | |
---|---|
aDestPt | Position in the target the result should be drawn to. |
aSrcBmp | A pointer to the source bitmap. |
aSrcRect | A 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 |
aAlphaBmp | A pointer to the bitmap used as an alpha blending factor. |
aAlphaPt | Position 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). |
IMPORT_C TInt | AlphaBlendBitmaps | ( | 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 | |
---|---|
aDestPt | Position in the target the result should be drawn to. |
aSrcBmp | A pointer to the source bitmap. |
aSrcRect | The part of the source bitmap that should be used. |
aAlphaBmp | A pointer to the bitmap used as an alpha blending factor. |
aAlphaPt | Position 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. |
Draws a particular rectangle from another CFbsBitGc.
Parameters | |
---|---|
aPoint | The position to draw the top left corner of the piece of bitmap. |
aGc | The source bitmap graphics context. |
aSourceRect | A rectangle defining the piece of the source to be drawn. |
IMPORT_C void | BitBlt | ( | const TPoint & | aPoint, |
const CFbsBitmap * | aBitmap | |||
) | [virtual] |
Reimplemented from CBitmapContext::BitBlt(const TPoint &,const CFbsBitmap *)
Draws the whole of a CFbsBitmap.
Parameters | |
---|---|
aPoint | The position to draw the top left corner of the bitmap. |
aBitmap | The source bitmap. |
IMPORT_C void | BitBlt | ( | 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 | |
---|---|
aPoint | The position to draw the top left corner of the bitmap. |
aBitmap | The source bitmap. |
aSourceRect | A rectangle defining the piece of the source to be drawn. |
IMPORT_C void | BitBltMasked | ( | const TPoint & | aPoint, |
const CFbsBitmap * | aBitmap, | |||
const TRect & | aSourceRect, | |||
const CFbsBitmap * | aMaskBitmap, | |||
TBool | aInvertMask | |||
) | [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()
IMPORT_C void | CancelClippingRect | ( | ) | [virtual] |
Reimplemented from CGraphicsContext::CancelClippingRect()
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()
IMPORT_C void | CancelClippingRegion | ( | ) | [virtual] |
Reimplemented from CGraphicsContext::CancelClippingRegion()
Cancels the clipping region.
IMPORT_C void | ChangeDevice | ( | CFbsDevice * | aDevice | ) |
Replace target device but keep the current state
Parameters | |
---|---|
aDevice | The target device |
IMPORT_C void | Clear | ( | ) | [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()
IMPORT_C void | Clear | ( | const TRect & | aRect | ) | [virtual] |
Reimplemented from CBitmapContext::Clear(const TRect &)
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.
Reimplemented from CBitmapContext::CopyRect(const TPoint &,const TRect &)
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.
IMPORT_C void | CopySettings | ( | const CFbsBitGc & | aGc | ) |
Copies all settings from the specified bitmap graphics context.
Parameters | |
---|---|
aGc | The bitmap graphics context whose settings are to be copied. |
IMPORT_C CGraphicsDevice * | Device | ( | ) | const [virtual] |
Reimplemented from CGraphicsContext::Device()const
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()
IMPORT_C void | DiscardBrushPattern | ( | ) | [virtual] |
Reimplemented from CGraphicsContext::DiscardBrushPattern()
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()
IMPORT_C void | DiscardFont | ( | ) | [virtual] |
Reimplemented from CGraphicsContext::DiscardFont()
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()
Reimplemented from CGraphicsContext::DrawArc(const TRect &,const TPoint &,const TPoint &)
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.
IMPORT_C void | DrawBitmap | ( | const TPoint & | aTopLeft, |
const CFbsBitmap * | aSource | |||
) | [virtual] |
Reimplemented from CGraphicsContext::DrawBitmap(const TPoint &,const CFbsBitmap *)
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.
IMPORT_C void | DrawBitmap | ( | const TRect & | aDestRect, |
const CFbsBitmap * | aSource | |||
) | [virtual] |
Reimplemented from CGraphicsContext::DrawBitmap(const TRect &,const CFbsBitmap *)
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 | |
---|---|
aDestRect | The rectangle within which the bitmap is to be drawn. |
aSource | A source bitmap. |
IMPORT_C void | DrawBitmap | ( | const TRect & | aDestRect, |
const CFbsBitmap * | aSource, | |||
const TRect & | aSourceRect | |||
) | [virtual] |
Reimplemented from CGraphicsContext::DrawBitmap(const TRect &,const CFbsBitmap *,const TRect &)
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 | |
---|---|
aDestRect | The rectangle within which the bitmap is to be drawn. |
aSource | A source bitmap. |
aSourceRect | The rectangle in the source bitmap that is copied to the destination rectangle. |
IMPORT_C void | DrawBitmapMasked | ( | const TRect & | aDestRect, |
const CFbsBitmap * | aBitmap, | |||
const TRect & | aSourceRect, | |||
const CFbsBitmap * | aMaskBitmap, | |||
TBool | aInvertMask | |||
) | [virtual] |
Reimplemented from CGraphicsContext::DrawBitmapMasked(const TRect &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,TBool)
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.
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.
aBitmap->Handle() != 0 aMaskBitmap != NULL aMaskBitmap->Handle() != 0 !aSourceRect.IsEmpty() aSourceRect should be in the bounds of the bitmap
Parameters | |
---|---|
aDestRect | The rectangle within which the masked bitmap is to be drawn. |
aBitmap | A pointer to the source bitmap. |
aSourceRect | The rectangle in the source bitmap that is copied to the destination rectangle. |
aMaskBitmap | A pointer to the mask bitmap. |
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. |
IMPORT_C void | DrawBitmapMasked | ( | const TRect & | aDestRect, |
const CWsBitmap * | aBitmap, | |||
const TRect & | aSourceRect, | |||
const CWsBitmap * | aMaskBitmap, | |||
TBool | aInvertMask | |||
) | [virtual] |
Reimplemented from CGraphicsContext::DrawBitmapMasked(const TRect &,const CWsBitmap *,const TRect &,const CWsBitmap *,TBool)
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.
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.
aBitmap->Handle() != 0 aMaskBitmap != NULL aMaskBitmap->Handle() != 0 !aSourceRect.IsEmpty()
Parameters | |
---|---|
aDestRect | The rectangle within which the masked bitmap is to be drawn. |
aBitmap | A pointer to the source bitmap. |
aSourceRect | The rectangle in the source bitmap that is copied to the destination rectangle. |
aMaskBitmap | A pointer to the mask bitmap. |
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. |
IMPORT_C void | DrawEllipse | ( | const TRect & | aRect | ) | [virtual] |
Reimplemented from CGraphicsContext::DrawEllipse(const TRect &)
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.
Reimplemented from CGraphicsContext::DrawLine(const TPoint &,const TPoint &)
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.
IMPORT_C void | DrawLineBy | ( | const TPoint & | aVector | ) | [virtual] |
Reimplemented from CGraphicsContext::DrawLineBy(const TPoint &)
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.
IMPORT_C void | DrawLineTo | ( | const TPoint & | aPoint | ) | [virtual] |
Reimplemented from CGraphicsContext::DrawLineTo(const TPoint &)
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.
Reimplemented from CGraphicsContext::DrawPie(const TRect &,const TPoint &,const TPoint &)
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.
Reimplemented from CGraphicsContext::DrawPolyLine(const CArrayFix< TPoint > *)
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.
Reimplemented from CGraphicsContext::DrawPolyLine(const TPoint *,TInt)
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.
IMPORT_C TInt | DrawPolygon | ( | const CArrayFix< TPoint > * | aPointList, |
CGraphicsContext::TFillRule | aFillRule = CGraphicsContext::EAlternate | |||
) | [virtual] |
Reimplemented from CGraphicsContext::DrawPolygon(const CArrayFix< TPoint > *,TFillRule)
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.
IMPORT_C TInt | DrawPolygon | ( | const TPoint * | aPointList, |
TInt | aNumPoints, | |||
CGraphicsContext::TFillRule | aFillRule = CGraphicsContext::EAlternate | |||
) | [virtual] |
Reimplemented from CGraphicsContext::DrawPolygon(const TPoint *,TInt,TFillRule)
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.
IMPORT_C void | DrawRect | ( | const TRect & | aRect | ) | [virtual] |
Reimplemented from CGraphicsContext::DrawRect(const TRect &)
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.
Reimplemented from CGraphicsContext::DrawRoundRect(const TRect &,const TSize &)
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.
IMPORT_C void | DrawText | ( | const TDesC & | aText | ) |
Draws text at the last print position.
Parameters | |
---|---|
aText | The text string to be drawn. |
Reimplemented from CGraphicsContext::DrawText(const TDesC &,const TPoint &)
Draws text at the specified position and updates the print position.
Parameters | |
---|---|
aText | The text string to be drawn |
aPosition | Coordinates to draw the text at. |
IMPORT_C void | DrawText | ( | const TDesC & | aText, |
const TRect & | aBox, | |||
TInt | aBaselineOffset, | |||
TTextAlign | aHrz = ELeft, | |||
TInt | aMargin = 0 | |||
) | [virtual] |
Reimplemented from CGraphicsContext::DrawText(const TDesC &,const TRect &,TInt,TTextAlign,TInt)
Draws text clipped to the specified rectangle using a baseline offset, horizontal alignment and a margin.
Parameters | |
---|---|
aText | The text string to be drawn |
aBox | The clipping rectangle. |
aBaselineOffset | An offset in pixels for the baseline from the normal position (bottom of the rectangle minus the descent of the font). |
aHrz | Horizontal alignment option relative to the specified rectangle. |
aMargin | Offset to add to the position as calculated using specified rectangle. |
IMPORT_C void | DrawText | ( | const TDesC & | aText, |
const TTextParameters * | aParam | |||
) |
IMPORT_C void | DrawText | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
const TPoint & | aPosition | |||
) |
IMPORT_C void | DrawText | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
const TRect & | aBox | |||
) |
IMPORT_C void | DrawText | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
const TRect & | aBox, | |||
TInt | aBaselineOffset, | |||
TTextAlign | aHrz = ELeft, | |||
TInt | aMargin = 0 | |||
) |
Reimplemented from CGraphicsContext::DrawText(const TDesC &,const TTextParameters *,const TRect &,TInt,TTextAlign,TInt)
IMPORT_C void | DrawText | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
const TRect & | aBox, | |||
TInt | aBaselineOffset, | |||
TInt | aTextWidth, | |||
TTextAlign | aHrz = ELeft, | |||
TInt | aMargin = 0 | |||
) |
Reimplemented from CGraphicsContext::DrawTextVertical(const TDesC &,const TPoint &,TBool)
Draws text vertically from the specified position.
Parameters | |
---|---|
aText | The text string to be drawn. |
aPosition | A point specifying the position of the left end of the text. |
aUp | ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise. |
Draws text clipped to the specified rectangle and then rotates it into a vertical position.
Parameters | |
---|---|
aText | The text string to be drawn |
aBox | The clipping rectangle. |
aUp | ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise. |
IMPORT_C void | DrawTextVertical | ( | const TDesC & | aText, |
const TRect & | aBox, | |||
TInt | aBaselineOffset, | |||
TBool | aUp, | |||
TTextAlign | aVert = ELeft, | |||
TInt | aMargin = 0 | |||
) | [virtual] |
Reimplemented from CGraphicsContext::DrawTextVertical(const TDesC &,const TRect &,TInt,TBool,TTextAlign,TInt)
Draws text vertically, clipped to a specified rectangle, using a baseline offset, alignment and margin.
Parameters | |
---|---|
aText | The text string to be drawn. |
aBox | A rectangle to clip the text to. |
aBaselineOffset | Number of pixels to offset the baseline by. |
aUp | ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise. |
aVert | Verticaly alignment of the text relative to the specified rectangle. |
aMargin | Offset of the text from the position within the rectangle, using the specified alignment. |
IMPORT_C void | DrawTextVertical | ( | const TDesC & | aText, |
const TRect & | aBox, | |||
TInt | aBaselineOffset, | |||
TInt | aTextWidth, | |||
TBool | aUp, | |||
TTextAlign | aVert = ELeft, | |||
TInt | aMargin = 0 | |||
) |
Draws text vertically, clipped to a specified rectangle, using a baseline offset, alignment and margin.
Parameters | |
---|---|
aText | The text string to be drawn. |
aBox | A rectangle to clip the text to. |
aBaselineOffset | Number of pixels to offset the baseline by. |
aTextWidth | Number of pixels to clip the text to. |
aUp | ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise. |
aVert | Verticaly alignment of the text relative to the specified rectangle. |
aMargin | Offset of the text from the position within the rectangle, using the specified alignment. |
IMPORT_C void | DrawTextVertical | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
TBool | aUp | |||
) |
IMPORT_C void | DrawTextVertical | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
const TPoint & | aPosition, | |||
TBool | aUp | |||
) |
Reimplemented from CGraphicsContext::DrawTextVertical(const TDesC &,const TTextParameters *,const TPoint &,TBool)
IMPORT_C void | DrawTextVertical | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
const TRect & | aBox, | |||
TBool | aUp | |||
) |
IMPORT_C void | DrawTextVertical | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
const TRect & | aBox, | |||
TInt | aBaselineOffset, | |||
TBool | aUp, | |||
TTextAlign | aVert = ELeft, | |||
TInt | aMargin = 0 | |||
) |
Reimplemented from CGraphicsContext::DrawTextVertical(const TDesC &,const TTextParameters *,const TRect &,TInt,TBool,TTextAlign,TInt)
IMPORT_C void | DrawTextVertical | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
const TRect & | aBox, | |||
TInt | aBaselineOffset, | |||
TInt | aTextWidth, | |||
TBool | aUp, | |||
TTextAlign | aVert = ELeft, | |||
TInt | aMargin = 0 | |||
) |
IMPORT_C void | ExternalizeL | ( | 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 | |
---|---|
aWriteStream | Stream to which the object should be externalized. |
IMPORT_C void | FadeArea | ( | const TRegion * | aRegion | ) |
Sets the fade area.
Parameters | |
---|---|
aRegion | The region defining the fade area. |
IMPORT_C void | InternalizeL | ( | 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 | |
---|---|
aReadStream | Stream from which the object is to be internalized. |
IMPORT_C TBool | IsBrushPatternUsed | ( | ) | const |
Tests whether a brush pattern is being used.
IMPORT_C TBool | IsFontUsed | ( | ) | const |
Tests whether a font is used.
IMPORT_C void | MapColors | ( | const TRect & | aRect, |
const TRgb * | aColors, | |||
TInt | aNumPairs = 2, | |||
TBool | aMapForwards = ETrue | |||
) | [virtual] |
Reimplemented from CGraphicsContext::MapColors(const TRect &,const TRgb *,TInt,TBool)
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 | |
---|---|
aRect | The rectangle in which pixels are to be mapped. |
aColors | A pointer to a set of RGB pairs. |
aNumPairs | The number of pairs |
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. |
IMPORT_C void | MoveBy | ( | const TPoint & | aVector | ) | [virtual] |
Reimplemented from CGraphicsContext::MoveBy(const TPoint &)
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.
IMPORT_C void | MoveTo | ( | const TPoint & | aPoint | ) | [virtual] |
Reimplemented from CGraphicsContext::MoveTo(const TPoint &)
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.
IMPORT_C CFbsBitGc * | NewL | ( | ) | [static] |
Factory function for creating a CFbsBitGc object The object is then ready for a call to Activate().
IMPORT_C void | Plot | ( | const TPoint & | aPoint | ) | [virtual] |
Reimplemented from CGraphicsContext::Plot(const TPoint &)
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.
IMPORT_C void | RectDrawnTo | ( | TRect & | aRect | ) |
Fetches the bounding rectangle of all drawing done since this function was last called.
Parameters | |
---|---|
aRect | The bounding rectangle. |
IMPORT_C void | Reset | ( | ) | [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()
IMPORT_C void | Resized | ( | ) |
Needs to be called if the device is resized. This only applies to devices of type CFbsBitmapDevice.
IMPORT_C void | SetBrushColor | ( | const TRgb & | aColor | ) | [virtual] |
Reimplemented from CGraphicsContext::SetBrushColor(const TRgb &)
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.
IMPORT_C void | SetBrushOrigin | ( | const TPoint & | aOrigin | ) | [virtual] |
Reimplemented from CGraphicsContext::SetBrushOrigin(const TPoint &)
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.
IMPORT_C void | SetBrushStyle | ( | TBrushStyle | aBrushStyle | ) | [virtual] |
Reimplemented from CGraphicsContext::SetBrushStyle(TBrushStyle)
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.
Reimplemented from CGraphicsContext::SetCharJustification(TInt,TInt)
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.
IMPORT_C void | SetClippingRect | ( | const TRect & | aRect | ) | [virtual] |
Reimplemented from CGraphicsContext::SetClippingRect(const TRect &)
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()
IMPORT_C void | SetClippingRegion | ( | const TRegion * | aRegion | ) |
Panic Codes | |
---|---|
BITGDI | 10 if aRegion is invalid or if aRegion is not contained by the device area. |
Reimplemented from CGraphicsContext::SetClippingRegion(const TRegion &)
Sets a clipping region by storing a copy of the TRegion parameter.
See also: CGraphicsContext::SetClippingRegion().
Parameters | |
---|---|
aRegion | The clipping region to be stored and used. aRegion must be valid and bounded withing the iDefaultRegion. |
IMPORT_C void | SetDitherOrigin | ( | 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 | |
---|---|
aPoint | The dither origin. |
IMPORT_C void | SetDrawMode | ( | TDrawMode | ) | [virtual] |
Reimplemented from CGraphicsContext::SetDrawMode(TDrawMode)
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()
void | SetFadeMode | ( | TBool | aFadeMode = EFalse | ) | [inline] |
IMPORT_C void | SetFaded | ( | TBool | aFaded | ) | [virtual] |
Reimplemented from CBitmapContext::SetFaded(TBool)
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.
void | SetFadingParameters | ( | TUint8 | aBlackMap = 0 | ) | [inline] |
Reimplemented from CBitmapContext::SetFadingParameters(TUint8,TUint8)
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.
IMPORT_C TBool | SetOrientation | ( | TGraphicsOrientation | aOrientation | ) |
Sets the orientation.
Parameters | |
---|---|
aOrientation | The required orientation |
Reimplemented from CGraphicsContext::SetOrigin(const TPoint &)
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.
IMPORT_C void | SetPenColor | ( | const TRgb & | aColor | ) | [virtual] |
Reimplemented from CGraphicsContext::SetPenColor(const TRgb &)
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.
IMPORT_C void | SetPenSize | ( | const TSize & | aSize | ) | [virtual] |
Reimplemented from CGraphicsContext::SetPenSize(const TSize &)
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.
IMPORT_C void | SetPenStyle | ( | TPenStyle | ) | [virtual] |
Reimplemented from CGraphicsContext::SetPenStyle(TPenStyle)
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()
IMPORT_C void | SetShadowMode | ( | TBool | aShadowMode = EFalse | ) |
Sets the shadow mode on or off.
Parameters | |
---|---|
aShadowMode | ETrue, shadow mode is on; EFalse, shadow mode is off. EFalse is the default. |
IMPORT_C void | SetStrikethroughStyle | ( | TFontStrikethrough | aStrikethroughStyle | ) | [virtual] |
Reimplemented from CGraphicsContext::SetStrikethroughStyle(TFontStrikethrough)
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.
IMPORT_C void | SetUnderlineStyle | ( | TFontUnderline | aUnderlineStyle | ) | [virtual] |
Reimplemented from CGraphicsContext::SetUnderlineStyle(TFontUnderline)
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.
IMPORT_C void | SetUserDisplayMode | ( | TDisplayMode | aDisplayMode | ) |
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 | |
---|---|
aDisplayMode | The display mode to be set. |
Reimplemented from CGraphicsContext::SetWordJustification(TInt,TInt)
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.
IMPORT_C void | ShadowArea | ( | const TRegion * | aRegion | ) |
Sets the shadow area.
Parameters | |
---|---|
aRegion | The region defining the shadow area. |
IMPORT_C void | UpdateJustification | ( | const TDesC & | aText | ) |
Updates the justification settings. This function assumes that ActivateNoJustAutoUpdate() has been used.
Parameters | |
---|---|
aText | The text for which justification is to be adjusted. |
IMPORT_C void | UpdateJustification | ( | const TDesC & | aText, |
const TTextParameters * | aParam | |||
) |
Updates the justification settings. This function assumes that ActivateNoJustAutoUpdate() has been used.
Parameters | |
---|---|
aText | The text for which justification is to be adjusted. |
IMPORT_C void | UpdateJustificationVertical | ( | const TDesC & | aText, |
const TTextParameters * | aParam, | |||
TBool | aUp | |||
) |
Updates the justification for vertical text.
Parameters | |
---|---|
aText | The text for which justification is to be adjusted. |
aUp | ETrue, if text is to be justified upwards;EFalse, if text is to be justified downwards. |
IMPORT_C void | UseBrushPattern | ( | const CFbsBitmap * | aBitmap | ) | [virtual] |
Reimplemented from CGraphicsContext::UseBrushPattern(const CFbsBitmap *)
Sets the specified bitmap to be used as the brush pattern.
Parameters | |
---|---|
aBitmap | The bitmap. |
IMPORT_C void | UseFont | ( | const CFont * | aFont | ) | [virtual] |
Reimplemented from CGraphicsContext::UseFont(const CFont *)
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
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 | |
---|---|
aFontHandle | A handle for a device font. |
IMPORT_C void | UseFontNoDuplicate | ( | 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 | |
---|---|
aFont | A pointer to the font to be used. |