Location:
bitstd.h
Link against: bitgdi.lib
CFbsBitGc
Supported from 5.0
Concrete implementation of a bitmapped graphics context.
The class provides new functionality, and implementations of the
pure virtual functions defined in CGraphicsContext
and
CBitmapContext
.
|
Defined in CFbsBitGc
:
Activate()
, ActivateNoJustAutoUpdate()
, BitBlt()
, BitBltMasked()
, CancelClipping()
, CancelClippingRect()
, CancelClippingRegion()
, Clear()
, CopyRect()
, CopySettings()
, Device()
, DiscardBrushPattern()
, DiscardFont()
, DrawArc()
, DrawBitmap()
, DrawEllipse()
, DrawLine()
, DrawLineBy()
, DrawLineTo()
, DrawPie()
, DrawPolyLine()
, DrawPolyLineNoEndPoint()
, DrawPolygon()
, DrawRect()
, DrawRoundRect()
, DrawText()
, DrawTextVertical()
, EGraphicsOrientationNormal
, EGraphicsOrientationRotated180
, EGraphicsOrientationRotated270
, EGraphicsOrientationRotated90
, FadeArea()
, IsBrushPatternUsed()
, IsFontUsed()
, MapColors()
, MoveBy()
, MoveTo()
, NewL()
, OrientationsAvailable()
, Plot()
, RectDrawnTo()
, Reset()
, Resized()
, SetBrushColor()
, SetBrushOrigin()
, SetBrushStyle()
, SetCharJustification()
, SetClippingRect()
, SetClippingRegion()
, SetDitherOrigin()
, SetDrawMode()
, SetFaded()
, SetFadingParamaters()
, SetOrientation()
, SetOrigin()
, SetPenColor()
, SetPenSize()
, SetPenStyle()
, SetShadowMode()
, SetStrikethroughStyle()
, SetUnderlineStyle()
, SetUserDisplayMode()
, SetWordJustification()
, ShadowArea()
, TGraphicsOrientation
, UpdateJustification()
, UpdateJustificationVertical()
, UseBrushPattern()
, UseFont()
, UseFontNoDuplicate()
, ~CFbsBitGc()
Inherited from CBase
:
operator new()
Inherited from CBitmapContext
:
SetFadingParameters()
Inherited from CGraphicsContext
:
EAlternate
,
EAnd
,
ECenter
,
EDashedPen
,
EDiamondCrossHatchBrush
,
EDotDashPen
,
EDotDotDashPen
,
EDottedPen
,
EDrawModeAND
,
EDrawModeANDNOT
,
EDrawModeNOTAND
,
EDrawModeNOTANDNOT
,
EDrawModeNOTOR
,
EDrawModeNOTORNOT
,
EDrawModeNOTPEN
,
EDrawModeNOTSCREEN
,
EDrawModeNOTXOR
,
EDrawModeOR
,
EDrawModeORNOT
,
EDrawModePEN
,
EDrawModeXOR
,
EForwardDiagonalHatchBrush
,
EHorizontalHatchBrush
,
EInvertPen
,
EInvertScreen
,
ELeft
,
ELogicalOp
,
ENullBrush
,
ENullPen
,
EOr
,
EPatternedBrush
,
EPenmode
,
ERearwardDiagonalHatchBrush
,
ERight
,
ESolidBrush
,
ESolidPen
,
ESquareCrossHatchBrush
,
EVerticalHatchBrush
,
EWinding
,
EXor
,
JustificationInPixels()
,
TBrushStyle
,
TDrawMode
,
TDrawModeComponents
,
TDrawTextParam
,
TFillRule
,
TPenStyle
,
TTextAlign
static CFbsBitGc* NewL();
Factory function for creating a CFbsBitGc
object
The object is then ready for a call to
Activate()
.
|
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()
. The function
behaviour is the same as documented in that class.
void Resized();
Needs to be called if the device is resized.
This only applies to devices of type
CFbsBitmapDevice
.
void Activate(CFbsDevice* aDevice);
Sets the object to draw to a particular device
|
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()
.
|
void RectDrawnTo(TRect& aRect);
Sets the bounding rectangle of all drawing done since this function was last called.
|
void CopySettings(const CFbsBitGc& aGc);
Copies all settings from the specified bitmap graphics context.
|
void Clear();
void Clear(const TRect& aRect);
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.
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.
void BitBlt(const TPoint& aPoint,const CFbsBitmap* aBitmap);
void BitBlt(const TPoint& aPoint,const CFbsBitmap* aBitmap,const TRect& aRect);
Performs a bitmap block transfer.
The functions provides a concrete implementation of the pure
virtual functions CBitmapContext::BitBlt()
. The function behaviour
is the same as documented in that class.
void BitBlt(const TPoint& aPoint,const CFbsBitGc& aGc);
Draws from another CFbsBitGc
.
|
void BitBlt(const TPoint& aPoint,const CFbsBitGc& aGc,const TRect& aSourceRect);
Draws a particular rectangle from another
CFbsBitGc
.
|
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()
. The function
behaviour is the same as documented in that class.
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.
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()
. The function
behaviour is the same as documented in that class.
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()
. The function
behaviour is the same as documented in that class.
void MoveTo(const TPoint& aPoint);
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.
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()
. The function
behaviour is the same as documented in that class.
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()
. The function
behaviour is the same as documented in that class.
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.
void SetClippingRegion(const TRegion* aRegion);
Sets a clipping region.
|
void SetPenColor(const TRgb& aColor);
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.
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()
. The function
behaviour is the same as documented in that class.
void 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.
void SetBrushOrigin(const TPoint& aOrigin);
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.
void SetBrushColor(const TRgb& aColor);
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.
void SetBrushStyle(TBrushStyle aBrushStyle);
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.
void UseBrushPattern(const CFbsBitmap* aBitmap);
Sets the brush pattern to the specified bitmap.
The function provides a concrete implementation of the pure
virtual function CGraphicsContext::UseBrushPattern()
. The function
behaviour is the same as documented in that class.
TInt UseBrushPattern(TInt aFbsBitmapHandle);
Sets the specified bitmap to be used as the brush pattern.
|
|
TBool IsBrushPatternUsed() const;
Tests whether a brush pattern is being used.
|
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.
void UseFont(const CFont* aFont);
Selects the device font to be used for text drawing.
The function provides a concrete implementation of the pure
virtual function CGraphicsContext::UseFont()
. The function
behaviour is the same as documented in that class.
TInt UseFont(TInt aFontHandle);
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.
|
|
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.
|
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.
void SetWordJustification(TInt aExcessWidth,TInt aNumChars);
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.
void SetCharJustification(TInt aExcessWidth,TInt aNumGaps);
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.
void UpdateJustification(const TDesC& aText);
Updates the justification settings.
This function assumes that
ActivateNoJustAutoUpdate()
has been used.
|
void UpdateJustificationVertical(const TDesC& aText,TBool aUp);
Updates the justification for vertical text.
|
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()
. The
function behaviour is the same as documented in that class.
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()
. The
function behaviour is the same as documented in that class.
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()
. The function behaviour
is the same as documented in that class.
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.
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()
. The function
behaviour is the same as documented in that class.
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()
. The function
behaviour is the same as documented in that class.
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()
. The function
behaviour is the same as documented in that class.
void DrawPolyLine(const CArrayFix<TPoint>* aPointList);
Draws a polyline from a set of points specified in an array.
The functions provides a concrete implementation of the pure
virtual functions CGraphicsContext::DrawPolyLine()
. The function
behaviour is the same as documented in that class.
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()
. The function
behaviour is the same as documented in that class.
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.
|
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.
|
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.
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.
TInt DrawPolygon(const CArrayFix<TPoint>* aPointList,CGraphicsContext::TFillRule aFillRule=CGraphicsContext::EAlternate);
Draws and fills a polygon defined using an array 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.
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()
. The function
behaviour is the same as documented in that class.
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.
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.
void DrawText(const TDesC& aText,const TPoint& aPosition);
Draws text without a surrounding box.
The functions provides concrete implementations of the pure
virtual functions CGraphicsContext::DrawText()
. The function
behaviour is the same as documented in that class.
void DrawText(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TTextAlign aHrz=ELeft,TInt aMargin=0);
Draws text inside a box.
The functions provides concrete implementations of the pure
virtual functions CGraphicsContext::DrawText()
. The function
behaviour is the same as documented in that class.
void DrawText(const TDesC& aText);
Draws text at the last print position.
|
void DrawText(const TDesC& aText,const TRect& aBox);
Draws text clipped to the specified rectangle.
|
void DrawTextVertical(const TDesC& aText,const TPoint& aPosition,TBool aUp);
Draws text without a surrounding box and then rotates it into a vertical position.
|
void DrawTextVertical(const TDesC& aText,const TRect& aBox,TInt aBaselineOffset,TBool aUp,TTextAlign aHrz=ELeft,TInt aMargin=0);
Draws text inside a box and then rotates it into a vertical position.
|
void DrawTextVertical(const TDesC& aText,TBool aUp);
Draws text at the last print position and then rotates it into a vertical position.
|
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.
|
void DrawBitmap(const TPoint& aTopLeft,const CFbsBitmap* aSource);
void DrawBitmap(const TRect& aDestRect,const CFbsBitmap* aSource);
void DrawBitmap(const TRect& aDestRect,const CFbsBitmap* aSource,const TRect& aSourceRect);
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.
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.
|
void FadeArea(const TRegion* aRegion);
Sets the fade area.
|
void SetFaded(TBool aFaded);
Supported from 6.0
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,TUint8 aWhiteMap);
Supported from 6.0
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.
TBool IsFontUsed() const;
Tests whether a font is used.
|
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.
|
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
).
|
void SetShadowMode(TBool aShadowMode = EFalse);
Sets the shadow mode on or off.
|
void ShadowArea(const TRegion* aRegion);
Sets the shadow area.
|
TBool SetOrientation(TGraphicsOrientation aOrientation);
Sets the orientation.
|
|
void OrientationsAvailable(TBool aOrientation[4]);
Supported from 6.0
Gets the orientations supported.
|
TGraphicsOrientation
Defines possible rotation values.
|