|
||
class CFbsBitGc : public CBitmapContext;
Concrete implementation of a bitmapped graphics context.
The class provides new functionality, and implementations of the pure virtual functions defined in CGraphicsContext
and CBitmapContext
.
CBase
-
Base class for all classes to be instantiated on the heap.
CGraphicsContext
- Abstract base class for all graphics contexts.
CBitmapContext
- An abstract, device-independent, interface to bitmapped graphics contexts.
CFbsBitGc
- Concrete implementation of a bitmapped graphics context.
Defined in CFbsBitGc
:
APIExtension(TUid,TAny *&,TAny *)
This function should not be used by externals but must retain the same ordinal n...Activate(CFbsDevice *)
Sets the object to draw to a particular device ActivateNoJustAutoUpdate(CFbsDevice *)
Sets the object to draw to a particular device but doesn't 'use up' justificatio...AlphaBlendBitmaps(const TPoint &,const CFbsBitmap *,const CFbsBitmap *,const TRect &,const TPoint &,const CFbsBitmap *,const
TPoint &)
The method performs an alpha blending of the source data - aSrcBmp1 and aSrcBmp2...AlphaBlendBitmaps(const TPoint &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,const TPoint &)
The method performs an alpha blending of the source data - aSrcBmp - with the ex...AlphaBlendBitmaps(const TPoint &,const CWsBitmap *,const TRect &,const CWsBitmap *,const TPoint &)
The method performs an alpha blending of the source data, aSrcBmp, with the CBit...BitBlt(const TPoint &,const CFbsBitGc &)
Draws from another CFbsBitGc.BitBlt(const TPoint &,const CFbsBitGc &,const TRect &)
Draws a particular rectangle from another CFbsBitGc.BitBlt(const TPoint &,const CFbsBitmap *)
Draws the whole of a CFbsBitmap.BitBlt(const TPoint &,const CFbsBitmap *,const TRect &)
Draws a particular rectangle from a CFbsBitmap.BitBltMasked(const TPoint &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,TBool)
Performs a masked bitmap block transfer.CancelClipping()
Cancels clipping rectangle and region. CancelClippingRect()
Cancels any clipping rectangle. Clipping reverts to the full device area, the de...CancelClippingRegion()
Cancels the clipping region. Clear()
Clears the whole bitmap or a rectangular area of a bitmap.Clear(const TRect &)
Clears a rectangular area.CopyRect(const TPoint &,const TRect &)
Copies a rectangle.CopySettings(const CFbsBitGc &)
Copies all settings from the specified bitmap graphics context. Device()const
Gets a pointer to the graphics device for the graphics context. The graphics dev...DiscardBrushPattern()
Discards a non-built-in brush pattern. The function provides a concrete implemen...DiscardFont()
Discards a selected device font. The function provides a concrete implementation...DrawArc(const TRect &,const TPoint &,const TPoint &)
Draws an arc.DrawBitmap(const TPoint &,const CFbsBitmap *)
Draws a bitmap.DrawBitmap(const TRect &,const CFbsBitmap *)
Draws a bitmap to fit a given rectangle.DrawBitmap(const TRect &,const CFbsBitmap *,const TRect &)
Draws a specified rectangle of a source bitmap to fit into a given destination r...DrawBitmapMasked(const TRect &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,TBool)
The method draws a specified rectangle from a bitmap and its mask into another r...DrawBitmapMasked(const TRect &,const CWsBitmap *,const TRect &,const CWsBitmap *,TBool)
The method draws a specified rectangle from a bitmap and its mask into another r...DrawEllipse(const TRect &)
Draws and fills an ellipse.DrawLine(const TPoint &,const TPoint &)
Draws a straight line between two points.DrawLineBy(const TPoint &)
Draws a straight line relative to the current drawing point, using a vector.DrawLineTo(const TPoint &)
Draws a straight line from the current drawing point to a specified point.DrawPie(const TRect &,const TPoint &,const TPoint &)
Draws and fills a pie slice.DrawPolyLine(const CArrayFix< TPoint > *)
Draws a polyline from a set of points specified in a list.DrawPolyLine(const TPoint *,TInt)
Draws a polyline from a set of points specified in a list.DrawPolyLineNoEndPoint(const CArrayFix< TPoint > *)
Draws a polyline from a set of points specified in an array, but does not draw t...DrawPolyLineNoEndPoint(const TPoint *,TInt)
Draws a polyline from a set of points specified in a list, but does not draw the...DrawRect(const TRect &)
Draws and fills a rectangle.DrawRoundRect(const TRect &,const TSize &)
Draws and fills a rectangle with rounded corners.DrawText(const TDesC &)
Draws text at the last print position.DrawText(const TDesC &,const TPoint &)
Draws text at the specified position and updates the print position.DrawText(const TDesC &,const TRect &)
Draws text clipped to the specified rectangle.DrawText(const TDesC &,const TRect &,TInt,TInt,TTextAlign,TInt)
Draws text clipped to the specified rectangle.DrawText(const TDesC &,const TRect &,TInt,TTextAlign,TInt)
Draws text clipped to the specified rectangle using a baseline offset, horizonta...DrawTextVertical(const TDesC &,TBool)
Draws text at the last print position and then rotates it into a vertical positi...DrawTextVertical(const TDesC &,const TPoint &,TBool)
Draws text vertically from the specified position.DrawTextVertical(const TDesC &,const TRect &,TBool)
Draws text clipped to the specified rectangle and then rotates it into a vertica...DrawTextVertical(const TDesC &,const TRect &,TInt,TBool,TTextAlign,TInt)
Draws text vertically, clipped to a specified rectangle, using a baseline offset...DrawTextVertical(const TDesC &,const TRect &,TInt,TInt,TBool,TTextAlign,TInt)
Draws text vertically, clipped to a specified rectangle, using a baseline offset...EGraphicsOrientationNormal
Normal orientation is supported. EGraphicsOrientationRotated180
A 180 degree rotation is supported. EGraphicsOrientationRotated270
A 270 degree rotation is supported. EGraphicsOrientationRotated90
A 90 degree rotation is supported. FadeArea(const TRegion *)
Sets the fade area.IsBrushPatternUsed()const
Tests whether a brush pattern is being used. IsFontUsed()const
Tests whether a font is used. Load16(const TUint8 *)
MapColors(const TRect &,const TRgb *,TInt,TBool)
Maps pixels in the specified rectangle. The function tries to match the colour o...MoveBy(const TPoint &)
Sets the drawing point relative to the current co-ordinates. The function provid...MoveTo(const TPoint &)
Sets the internal drawing position relative to the co-ordinate origin. A subsequ...NewL()
Factory function for creating a CFbsBitGc object The object is then ready for a ...OrientationsAvailable(TBool)
Gets the orientations supported. Plot(const TPoint &)
Draws a single point.RectDrawnTo(TRect &)
Sets the bounding rectangle of all drawing done since this function was last cal...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()
A reserved virtual function for future use.Reset()
Resets the graphics context to its default settings. The function provides a con...Resized()
Needs to be called if the device is resized. This only applies to devices of typ...SetBrushColor(const TRgb &)
Sets the brush colour. The function provides a concrete implementation of the pu...SetBrushOrigin(const TPoint &)
Sets the brush pattern origin. The function provides a concrete implementation o...SetBrushStyle(TBrushStyle)
Sets the brush style. The function provides a concrete implementation of the pur...SetCharJustification(TInt,TInt)
Sets the character justification. The function provides a concrete implementatio...SetClippingRect(const TRect &)
Sets the clipping rectangle the area of visible drawing depends on the clipping ...SetClippingRegion(const TRegion &)
Sets a clipping region by storing a copy of the TRegion parameter. SetClippingRegion(const TRegion *)
Sets a clipping region by storing a pointer to the TRegion parameter. SetDitherOrigin(const TPoint &)
Sets the dither origin. This is only useful for modes that do dithering. If the ...SetDrawMode(TDrawMode)
Sets the drawing mode. This affects the colour that is actually drawn, because i...SetFadeMode(TBool)
SetFaded(TBool)
Sets whether the graphics context is faded. The function provides a concrete imp...SetFadingParameters(TUint8)
SetFadingParameters(TUint8,TUint8)
Set fading parameters. The function provides a concrete implementation of the pu...SetOrientation(TGraphicsOrientation)
Sets the orientation. SetOrigin(const TPoint &)
Sets the position of the co-ordinate origin. All subsequent drawing operations a...SetPenColor(const TRgb &)
Sets the pen colour. The function provides a concrete implementation of the pure...SetPenSize(const TSize &)
Sets the line drawing size for the pen. The function provides a concrete impleme...SetPenStyle(TPenStyle)
Sets the line drawing style for the pen. The function provides a concrete implem...SetShadowMode(TBool)
Sets the shadow mode on or off. SetStrikethroughStyle(TFontStrikethrough)
Sets the strikethrough style for all subsequently drawn text. The function provi...SetUnderlineStyle(TFontUnderline)
Sets the underline style for all subsequently drawn text. The function provides ...SetUserDisplayMode(TDisplayMode)
Simulates another graphics mode. Some devices running in some modes can simulate...SetWordJustification(TInt,TInt)
Sets the word justification. The function provides a concrete implementation of ...ShadowArea(const TRegion *)
Sets the shadow area.TGraphicsOrientation
Defines possible rotation values. UpdateJustification(const TDesC &)
Updates the justification settings. This function assumes that CFbsBitGc::Activa...UpdateJustificationVertical(const TDesC &,TBool)
Updates the justification for vertical text. UseBrushPattern(TInt)
Sets the specified bitmap to be used as the brush pattern. UseBrushPattern(const CFbsBitmap *)
Sets the specified bitmap to be used as the brush pattern. UseFont(TInt)
Selects the device font, identified by handle, to be used for text drawing. Note...UseFont(const CFont *)
Selects the device font, identified by handle number, to be used for text drawin...UseFontNoDuplicate(const CFbsBitGcFont *)
Selects a device font for text drawing but does not take a copy. The original mu...~CFbsBitGc()
Frees all resources owned by the object. Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from CGraphicsContext
:
DrawPolygon(const CArrayFix< TPoint > *,TFillRule)
Draws and fills a polygon defined using an array of points.DrawPolygon(const TPoint *,TInt,TFillRule)
Draws and fills a polygon defined using a list of points.DrawText(const TDesC &,const TPoint &,const TDrawTextParam &)
Draws the specified text at the given position using the parameters supplied.DrawTextExtended(const TDesC &,const TPoint &,const TDrawTextExtendedParam &)
Draws text, optionally changing its direction (right-to-left / left-to-right).EAlternate
Only fill areas with odd winding numbers. EAnd
8 ECenter
Text is centred. EDashedPen
A dashed line. Screen pattern unit = 111000... EDiamondCrossHatchBrush
The brush fills with forward diagonal and rearward diagonal hatching lines going...EDotDashPen
A line of alternating dashes and dots. Screen pattern unit = 1111001100... EDotDotDashPen
A line of alternating single dashes and pairs of dots. Screen pattern unit = 111...EDottedPen
A dotted line. Screen pattern unit = 1000... EDrawModeAND
Bitwise ANDs the pen and brush colours with the screen colour. P=p&s, B=b&am...EDrawModeANDNOT
Inverts the screen colour before ANDing. P=p&(~s), B=b&(~s) EDrawModeNOTAND
Inverts the pen and brush colours before ANDing. P=(~p)&s, B=(~b)&s EDrawModeNOTANDNOT
Inverts the screen and pen and brush colours before ANDing. P=(~p)&(~s), B=(...EDrawModeNOTOR
Inverts the pen and brush colours before ORing. P=(~p)|s, B=(~b)|s EDrawModeNOTORNOT
NOT OR NOT mode. P=(~p)|(~s), B=(~b)|(~s) EDrawModeNOTPEN
Inverts the pen and brush colours. P=~p, B=~b EDrawModeNOTSCREEN
Inverts the colour of each pixel that is drawn over, (pen and brush attributes a...EDrawModeNOTXOR
Inverts the pen and brush colours before XORing. P=(~p)^s, B=(~b)^s EDrawModeOR
Bitwise ORs the pen and brush colours with the screen colour. P=p|s, B=b|s EDrawModeORNOT
Inverts the screen, pen and brush colours before ORing. P=p|(~s), B=b|(~s) EDrawModePEN
Uses both pen and brush colour as they are. P=p, B=b EDrawModeWriteAlpha
Writes alpha information in the source directly into the destination, rather tha...EDrawModeXOR
Bitwise XORs the pen and brush colours with the screen colour. P=p^s, B=b^s EForwardDiagonalHatchBrush
The brush fills with diagonal hatching lines going from bottom left to top right...EHorizontalHatchBrush
The brush fills with horizontal hatching lines going from left to right. EInvertPen
16 EInvertScreen
1 ELeft
Text is left-aligned. ELogicalOp
14 ENullBrush
The brush fill has no effect (default). ENullPen
The pen does not draw. Screen pattern unit = 00... EOr
4 EPatternedBrush
The brush fills with a selected bitmap pattern, set by CGraphicsContext::UseBrus...EPenmode
32 ERearwardDiagonalHatchBrush
The brush fills with rearward diagonal hatching lines going from top left to bot...ERight
Text is right-aligned. ESolidBrush
The brush fills with a solid single colour, determined by CGraphicsContext::SetB...ESolidPen
A solid line (default). Screen pattern unit = 11... ESquareCrossHatchBrush
The brush fills with horizontal and vertical hatching lines going from left to r...EVerticalHatchBrush
The brush fills with vertical hatching lines going from top to bottom. EWinding
Fill areas with winding numbers greater than zero. EWriteAlpha
64 EXor
2 GetShadowColor(TRgb &)
Get the font's shadow colour GetUnderlineMetrics(TInt &,TInt &)
JustificationInPixels(TInt &,TInt &)
Gets the amount of space in pixels by which to adjust the current letter or word...JustificationInPixels(TInt,TInt,TInt,TInt)
Gets the amount of space in pixels by which to adjust letter or word spacing, gi...Reserved()
Reserved function for future use. SetShadowColor(const TRgb &)
Set the font's shadow colour TBrushStyle
Brush styles. TDrawMode
Drawing modes.TDrawModeComponents
Drawing mode components. This enum is not intended to be used directly, but prov...TDrawTextExtendedParam
Parameters for extended text drawing and measuring. It is used by CGraphicsConte...TDrawTextParam
Parameters to control the drawing of text. TFillRule
Rules used to fill self crossing polygons.TPenStyle
Pen styles. The screen pattern unit in each definition below describes the patte...TTextAlign
Text alignment. IMPORT_C static CFbsBitGc* NewL();
Factory function for creating a CFbsBitGc object The object is then ready for a call to CFbsBitGc::Activate(CFbsDevice *)
.
|
IMPORT_C void Activate(CFbsDevice *aDevice);
Sets the object to draw to a particular 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 CFbsBitGc::Activate(CFbsDevice *)
.
|
IMPORT_C void BitBlt(const TPoint &aPoint, const CFbsBitGc &aGc);
Draws from another CFbsBitGc.
|
IMPORT_C void BitBlt(const TPoint &aPoint, const CFbsBitGc &aGc, const TRect &aSourceRect);
Draws a particular rectangle from another CFbsBitGc.
|
IMPORT_C virtual void BitBlt(const TPoint &aPoint, const CFbsBitmap *aBitmap);
Draws the whole of a CFbsBitmap
.
|
IMPORT_C virtual void BitBlt(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect);
Draws a particular rectangle from a CFbsBitmap
.
|
IMPORT_C virtual void BitBltMasked(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap
*aMaskBitmap, TBool aInvertMask);
Performs a masked bitmap block transfer.
The function provides a concrete implementation of the pure virtual function CBitmapContext::BitBltMasked(const TPoint &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,TBool)
. The function behaviour is the same as documented in that class.
There are several points to note about this implementation of CFbsBitGc::BitBltMasked(const TPoint &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,TBool)
:
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()const
.
3.Alpha blending is used when the display mode of the mask bitmap aMaskBitmap is EGray256.
|
CBitmapContext::BitBltMasked(const TPoint &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,TBool)
Performs a masked bitmap block transfer.IMPORT_C virtual void 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.
CGraphicsContext::CancelClippingRect()
Cancels any clipping rectangle.IMPORT_C virtual void 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.
CBitmapContext::Clear()
Clears the whole bitmap.IMPORT_C virtual void Clear(const TRect &aRect);
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 &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void CopyRect(const TPoint &aOffset, const TRect &aRect);
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.
|
IMPORT_C virtual CGraphicsDevice* 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()const
. The function behaviour is the same as documented in that class.
|
CGraphicsContext::Device()const
Gets a pointer to the graphics context's graphics device.IMPORT_C virtual void 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.
CGraphicsContext::DiscardBrushPattern()
Discards a non-built-in brush pattern.IMPORT_C virtual void 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.
CGraphicsContext::DiscardFont()
Discards a font.IMPORT_C virtual void DrawArc(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd);
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 virtual void DrawPie(const TRect &aRect, const TPoint &aStart, const TPoint &aEnd);
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.
|
IMPORT_C virtual void DrawBitmap(const TPoint &aTopLeft, const CFbsBitmap *aSource);
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 virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource);
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(const TPoint &,const CFbsBitmap *)
instead. If the bitmap has to be scaled, consider creating another bitmap along with an CFbsBitmapDevice
etc., doing CFbsBitGc::DrawBitmap(const TPoint &,const CFbsBitmap *)
once and using CFbsBitGc::BitBlt(const TPoint &,const CFbsBitGc &)
subsequently.
Note that all bitmaps are clipped to the device boundaries.
|
TLinearDDA
Linear digital differential analyser.IMPORT_C virtual void DrawBitmap(const TRect &aDestRect, const CFbsBitmap *aSource, const TRect &aSourceRect);
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(const TPoint &,const CFbsBitmap *)
instead. If the bitmap has to be scaled, consider creating another bitmap along with an CFbsBitmapDevice
etc., doing CFbsBitGc::DrawBitmap(const TPoint &,const CFbsBitmap *)
once and using CFbsBitGc::BitBlt(const TPoint &,const CFbsBitGc &)
subsequently.
Note that all bitmaps are clipped to the device boundaries.
|
TLinearDDA
Linear digital differential analyser.IMPORT_C virtual void DrawBitmapMasked(const TRect &aDestRect, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const
CFbsBitmap *aMaskBitmap, TBool aInvertMask);
aBitmap != NULL
aBitmap->Handle() != 0
aMaskBitmap != NULL
aMaskBitmap->Handle() != 0
!aSourceRect.IsEmpty()
aSourceRect should be in the bounds of the bitmap
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(const TPoint &,const CFbsBitmap *,const CFbsBitmap *,const TRect &,const TPoint &,const CFbsBitmap
*,const TPoint &)
instead.
|
IMPORT_C virtual void DrawBitmapMasked(const TRect &aDestRect, const CWsBitmap *aBitmap, const TRect &aSourceRect, const CWsBitmap
*aMaskBitmap, TBool aInvertMask);
aBitmap != NULL
aBitmap->Handle() != 0
aMaskBitmap != NULL
aMaskBitmap->Handle() != 0
!aSourceRect.IsEmpty()
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(const TPoint &,const CFbsBitmap *,const CFbsBitmap *,const TRect &,const TPoint &,const CFbsBitmap
*,const TPoint &)
instead.
|
IMPORT_C virtual void DrawRoundRect(const TRect &aRect, const TSize &aEllipse);
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 virtual void DrawPolyLine(const CArrayFix< TPoint > *aPointList);
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(const CArrayFix< TPoint > *)
. The function behaviour is the same as documented in that class.
|
IMPORT_C void DrawPolyLineNoEndPoint(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.
|
IMPORT_C virtual void DrawPolyLine(const TPoint *aPointList, TInt aNumPoints);
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(const CArrayFix< TPoint > *)
. The function behaviour is the same as documented in that class.
|
IMPORT_C void DrawPolyLineNoEndPoint(const TPoint *aPointList, TInt aNumPoints);
Draws a polyline from a set of points specified in a list, but does not draw the final point of the last line.
|
IMPORT_C TInt DrawPolygon(const CArrayFix< TPoint > *aPointList, CGraphicsContext::TFillRule aFillRule=CGraphicsContext::EAlternate);
Draws and fills a polygon defined using a list of points.
The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawPolygon(const CArrayFix< TPoint > *,TFillRule)
. 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);
Draws and fills a polygon defined using a list of points.
The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawPolygon(const CArrayFix< TPoint > *,TFillRule)
. The function behaviour is the same as documented in that class.
|
|
IMPORT_C virtual void DrawEllipse(const TRect &aRect);
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.
|
IMPORT_C virtual void DrawLine(const TPoint &aStart, const TPoint &aEnd);
Draws a straight line between two points.
The function provides a concrete implementation of the pure virtual function CGraphicsContext::DrawLine(const TPoint &,const TPoint &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void DrawLineTo(const TPoint &aPoint);
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(const TPoint &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void DrawLineBy(const TPoint &aVector);
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(const TPoint &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void DrawRect(const TRect &aRect);
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.
|
IMPORT_C void DrawText(const TDesC &aText);
Draws text at the last print position.
|
IMPORT_C virtual void DrawText(const TDesC &aText, const TPoint &aPosition);
Draws text at the specified position and updates the print position.
|
IMPORT_C void DrawText(const TDesC &aText, const TRect &aBox);
Draws text clipped to the specified rectangle.
|
IMPORT_C virtual void DrawText(const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TTextAlign aHrz=ELeft, TInt aMargin=0);
Draws text clipped to the specified rectangle using a baseline offset, horizontal alignment and a margin.
|
IMPORT_C void DrawText(const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TInt aTextWidth, TTextAlign aHrz=ELeft,
TInt aMargin=0);
Draws text clipped to the specified rectangle.
|
IMPORT_C void DrawTextVertical(const TDesC &aText, TBool aUp);
Draws text at the last print position and then rotates it into a vertical position.
|
IMPORT_C virtual void DrawTextVertical(const TDesC &aText, const TPoint &aPosition, TBool aUp);
Draws text vertically from the specified position.
|
IMPORT_C void DrawTextVertical(const TDesC &aText, const TRect &aBox, TBool aUp);
Draws text clipped to the specified rectangle and then rotates it into a vertical position.
|
IMPORT_C virtual void DrawTextVertical(const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TBool aUp, TTextAlign
aVert=ELeft, TInt aMargin=0);
Draws text vertically, clipped to a specified rectangle, using a baseline offset, alignment and margin.
|
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.
|
IMPORT_C virtual void MapColors(const TRect &aRect, const TRgb *aColors, TInt aNumPairs=2, TBool aMapForwards=ETrue);
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.
|
IMPORT_C virtual void MoveTo(const TPoint &aPoint);
Sets the internal drawing position relative to the co-ordinate origin. A subsequent call to CFbsBitGc::DrawLineTo(const TPoint &)
or CFbsBitGc::DrawLineBy(const TPoint &)
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(const TPoint &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void MoveBy(const TPoint &aVector);
Sets the drawing point relative to the current co-ordinates. The function provides a concrete implementation of the pure virtual
function CGraphicsContext::MoveBy(const TPoint &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C void OrientationsAvailable(TBool aOrientation[4]);
Gets the orientations supported.
|
IMPORT_C virtual void Plot(const TPoint &aPoint);
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(const TPoint &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C void RectDrawnTo(TRect &aRect);
Sets the bounding rectangle of all drawing done since this function was last called.
|
IMPORT_C virtual void 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.
CGraphicsContext::Reset()
Resets the graphics context to its default settings:IMPORT_C void Resized();
Needs to be called if the device is resized. This only applies to devices of type CFbsBitmapDevice
.
IMPORT_C virtual void SetBrushColor(const TRgb &aColor);
Sets the brush colour. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetBrushColor(const TRgb &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void SetBrushOrigin(const TPoint &aOrigin);
Sets the brush pattern origin. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetBrushOrigin(const TPoint &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void SetBrushStyle(TBrushStyle aBrushStyle);
Sets the brush style. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetBrushStyle(TBrushStyle)
. The function behaviour is the same as documented in that class.
|
IMPORT_C void SetClippingRegion(const TRegion *aRegion);
Sets a clipping region by storing a pointer to the TRegion
parameter.
|
IMPORT_C virtual void SetClippingRect(const TRect &aRect);
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(const TRect &)
. The function behaviour is the same as documented in that class.
|
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.
|
IMPORT_C void 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(TDrawMode)
. The function behaviour is the same as documented in that class.
|
CGraphicsContext::SetDrawMode(TDrawMode)
Sets the drawing mode.IMPORT_C virtual void SetOrigin(const TPoint &aPoint=TPoint(0, 0));
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(const TPoint &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void SetPenColor(const TRgb &aColor);
Sets the pen colour. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetPenColor(const TRgb &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void SetPenStyle(TPenStyle);
Sets the line drawing style for the pen. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetPenStyle(TPenStyle)
. The function behaviour is the same as documented in that class.
|
CGraphicsContext::SetPenStyle(TPenStyle)
Sets the line drawing style for the pen.IMPORT_C virtual void SetPenSize(const TSize &aSize);
Sets the line drawing size for the pen. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetPenSize(const TSize &)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void SetCharJustification(TInt aExcessWidth, TInt aNumGaps);
Sets the character justification. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetCharJustification(TInt,TInt)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void SetWordJustification(TInt aExcessWidth, TInt aNumChars);
Sets the word justification. The function provides a concrete implementation of the pure virtual function CGraphicsContext::SetWordJustification(TInt,TInt)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void SetUnderlineStyle(TFontUnderline aUnderlineStyle);
Sets the underline style for all subsequently drawn text. The function provides a concrete implementation of the pure virtual
function CGraphicsContext::SetUnderlineStyle(TFontUnderline)
. 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).
|
IMPORT_C virtual void SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle);
Sets the strikethrough style for all subsequently drawn text. The function provides a concrete implementation of the pure
virtual function CGraphicsContext::SetStrikethroughStyle(TFontStrikethrough)
. The function behaviour is the same as documented in that class.
|
IMPORT_C void SetShadowMode(TBool aShadowMode=EFalse);
Sets the shadow mode on or off.
|
IMPORT_C virtual void SetFaded(TBool aFaded);
Sets whether the graphics context is faded. The function provides a concrete implementation of the pure virtual function CBitmapContext::SetFaded(TBool)
. The function behaviour is the same as documented in that class.
|
IMPORT_C virtual void SetFadingParameters(TUint8 aBlackMap, TUint8 aWhiteMap);
Set fading parameters. The function provides a concrete implementation of the pure virtual function CBitmapContext::SetFadingParameters(TUint8,TUint8)
. The function behaviour is the same as documented in that class.
|
IMPORT_C TBool SetOrientation(TGraphicsOrientation aOrientation);
Sets the orientation.
|
|
IMPORT_C void ShadowArea(const TRegion *aRegion);
Sets the shadow area.
|
IMPORT_C void FadeArea(const TRegion *aRegion);
Sets the fade area.
|
IMPORT_C void UpdateJustification(const TDesC &aText);
Updates the justification settings. This function assumes that CFbsBitGc::ActivateNoJustAutoUpdate(CFbsDevice *)
has been used.
|
IMPORT_C void UpdateJustificationVertical(const TDesC &aText, TBool aUp);
Updates the justification for vertical text.
|
IMPORT_C virtual void UseBrushPattern(const CFbsBitmap *aBitmap);
Sets the specified bitmap to be used as the brush pattern.
|
IMPORT_C TInt UseBrushPattern(TInt aFbsBitmapHandle);
Sets the specified bitmap to be used as the brush pattern.
|
|
IMPORT_C virtual void UseFont(const CFont *aFont);
Selects the device font, identified by handle number, to be used for text drawing. Notes: When the font is no longer required,
use CFbsBitGc::DiscardFont()
to free up the memory used. If CFbsBitGc::UseFont(const CFont *)
is used again without using CFbsBitGc::DiscardFont()
then the previous font is discarded automatically. If no font has been selected, and an attempt is made to draw text with
CFbsBitGc::DrawText(const TDesC &)
, then a panic occurs.
|
CFont
Abstract font interface.IMPORT_C TInt UseFont(TInt aFontHandle);
Selects the device font, identified by handle, to be used for text drawing. Notes:When the font is no longer required, use
CFbsBitGc::DiscardFont()
to free up the memory used. If CFbsBitGc::UseFont(const CFont *)
is used again without using CFbsBitGc::DiscardFont()
then the previous font is discarded automatically.If no font has been selected, and an attempt is made to draw text with
CFbsBitGc::DrawText(const TDesC &)
, then a panic occurs.
|
|
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 CFbsBitGc::UseFont(const CFont *)
, CFbsBitGc::UseFontNoDuplicate(const CFbsBitGcFont *)
, CFbsBitGc::DiscardFont()
or the destructor is called.
|
IMPORT_C TBool IsBrushPatternUsed() const;
Tests whether a brush pattern is being used.
|
IMPORT_C TBool IsFontUsed() const;
Tests whether a font is used.
|
static inline TInt16 Load16(const TUint8 *aPtr);
|
|
AlphaBlendBitmaps(const TPoint &,const CFbsBitmap *,const CFbsBitmap *,const TRect &,const TPoint &,const CFbsBitmap *,const
TPoint &)
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);
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.
|
|
AlphaBlendBitmaps(const TPoint &,const CFbsBitmap *,const TRect &,const CFbsBitmap *,const TPoint &)
IMPORT_C virtual TInt AlphaBlendBitmaps(const TPoint &aDestPt, const CFbsBitmap *aSrcBmp, const TRect &aSrcRect, const CFbsBitmap
*aAlphaBmp, const TPoint &aAlphaPt);
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.
|
|
IMPORT_C virtual TInt SetClippingRegion(const TRegion &aRegion);
Sets a clipping region by storing a copy of the TRegion
parameter.
|
|
CGraphicsContext::SetClippingRegion(const TRegion &)
Sets the clipping region. IMPORT_C virtual TInt AlphaBlendBitmaps(const TPoint &aDestPt, const CWsBitmap *aSrcBmp, const TRect &aSrcRect, const CWsBitmap
*aAlphaBmp, const TPoint &aAlphaPt);
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.
|
|
protected: IMPORT_C virtual TInt APIExtension(TUid aUid, TAny *&aOutput, TAny *aInput);
This function should not be used by externals but must retain the same ordinal number to maintain BC, thus is exported.
|
|
private: IMPORT_C virtual void Reserved_CGraphicsContext_2();
A reserved virtual function for future use.
TGraphicsOrientation
Defines possible rotation values.
|