Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: bitstd.h
Link against: bitgdi.lib

Class CFbsBitGc

CFbsBitGc

Support

Supported from 5.0

Description

Concrete implementation of a bitmapped graphics context.

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

Derivation

CBaseBase class for all classes to be instantiated on the heap
CBitmapContextAn abstract, device-independent, interface to bitmapped graphics contexts
CFbsBitGcConcrete implementation of a bitmapped graphics context
CGraphicsContextAbstract, device independent, interface to graphics contexts

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


Construction and destruction


NewL()

static CFbsBitGc* NewL();

Description

Factory function for creating a CFbsBitGc object

The object is then ready for a call to Activate().

Return value

CFbsBitGc*

A pointer to the newly created object.


~CFbsBitGc()

virtual ~CFbsBitGc();

Description

Frees all resources owned by the object.

[Top]


Graphics device


Device()

CGraphicsDevice* Device() const;

Description

Gets a pointer to the graphics device for the graphics context.

The graphics device is the device currently being drawn to.

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

See also:


Resized()

void Resized();

Description

Needs to be called if the device is resized.

This only applies to devices of type CFbsBitmapDevice.

[Top]


Drawing to a particular device


Activate()

void Activate(CFbsDevice* aDevice);

Description

Sets the object to draw to a particular device

Parameters

CFbsDevice* aDevice

The target device.


ActivateNoJustAutoUpdate()

void ActivateNoJustAutoUpdate(CFbsDevice* aDevice);

Description

Sets the object to draw to a particular device but doesn't 'use up' justification settings when drawing text.

This is similar to Activate().

Parameters

CFbsDevice* aDevice

The target device.


RectDrawnTo()

void RectDrawnTo(TRect& aRect);

Description

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

Parameters

TRect& aRect

The bounding rectangle.


CopySettings()

void CopySettings(const CFbsBitGc& aGc);

Description

Copies all settings from the specified bitmap graphics context.

Parameters

const CFbsBitGc& aGc

The bitmap graphics context whose settings are to be copied.

[Top]


Clearing and copying rectangular areas


Clear()

void Clear();
void Clear(const TRect& aRect);

Description

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

The cleared area is filled with the current brush colour.

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

See also:


CopyRect()

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

Description

Copies a rectangle.

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

See also:

[Top]


Bitmap block transfer


BitBlt()

void BitBlt(const TPoint& aPoint,const CFbsBitmap* aBitmap);
void BitBlt(const TPoint& aPoint,const CFbsBitmap* aBitmap,const TRect& aRect);

Description

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.

See also:


BitBlt()

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

Description

Draws from another CFbsBitGc.

Parameters

const TPoint& aPoint

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

const CFbsBitGc& aGc

The source bitmap graphics context


BitBlt()

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

Description

Draws a particular rectangle from another CFbsBitGc.

Parameters

const TPoint& aPoint

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

const CFbsBitGc& aGc

The source bitmap graphics context.

const TRect& aSourceRect

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


BitBltMasked()

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

Description

Performs a masked bitmap block transfer.

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

See also:

[Top]


Resetting


Reset()

void Reset();

Description

Resets the graphics context to its default settings.

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

See also:

[Top]


Drawing control


SetDrawMode()

void SetDrawMode(TDrawMode);

Description

Sets the drawing mode.

This affects the colour that is actually drawn, because it defines the way that the current screen colour logically combines with the current pen colour and brush colour.

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

See also:


SetOrigin()

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

Description

Sets the position of the co-ordinate origin.

All subsequent drawing operations are then done relative to this origin.

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

See also:

[Top]


The internal drawing position


MoveTo()

void MoveTo(const TPoint& aPoint);

Description

Sets the internal drawing position relative to the co-ordinate origin.

A subsequent call to DrawLineTo() or DrawLineBy() uses the new drawing point as the start point for the line drawn.

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

See also:


MoveBy()

void MoveBy(const TPoint& aVector);

Description

Sets the drawing point relative to the current co-ordinates.

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

See also:

[Top]


Clipping


SetClippingRect()

void SetClippingRect(const TRect& aRect);

Description

Sets the clipping rectangle — the area of visible drawing depends on the clipping region.

The default clipping rectangle is the full device area.

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

See also:


CancelClipping()

void CancelClipping();

Description

Cancels clipping rectangle and region.


CancelClippingRect()

void CancelClippingRect();

Description

Cancels any clipping rectangle.

Clipping reverts to the full device area, the default.

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

See also:


CancelClippingRegion()

void CancelClippingRegion();

Description

Cancels the clipping region.


SetClippingRegion()

void SetClippingRegion(const TRegion* aRegion);

Description

Sets a clipping region.

Parameters

const TRegion* aRegion

The clipping region.

[Top]


Pen control


SetPenColor()

void SetPenColor(const TRgb& aColor);

Description

Sets the pen colour.

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

See also:


SetPenSize()

void SetPenSize(const TSize& aSize);

Description

Sets the line drawing size for the pen.

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

See also:


SetPenStyle()

void SetPenStyle(TPenStyle);

Description

Sets the line drawing style for the pen.

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

See also:

[Top]


Brush control


SetBrushOrigin()

void SetBrushOrigin(const TPoint& aOrigin);

Description

Sets the brush pattern origin.

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

See also:


SetBrushColor()

void SetBrushColor(const TRgb& aColor);

Description

Sets the brush colour.

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

See also:


SetBrushStyle()

void SetBrushStyle(TBrushStyle aBrushStyle);

Description

Sets the brush style.

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

See also:


UseBrushPattern()

void UseBrushPattern(const CFbsBitmap* aBitmap);

Description

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.

See also:


UseBrushPattern()

TInt UseBrushPattern(TInt aFbsBitmapHandle);

Description

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

Parameters

TInt aFbsBitmapHandle

The handle number of the bitmap.

Return value

TInt

KErrNone, if successful; otherwise another of the other system wide error codes.


IsBrushPatternUsed()

TBool IsBrushPatternUsed() const;

Description

Tests whether a brush pattern is being used.

Return value

TBool

True, if a brush pattern is being used; false, otherwise.


DiscardBrushPattern()

void DiscardBrushPattern();

Description

Discards a non-built-in brush pattern.

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

See also:

[Top]


Text control


UseFont()

void UseFont(const CFont* aFont);

Description

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.

See also:


UseFont()

TInt UseFont(TInt aFontHandle);

Description

Selects the device font, identified by handle number, to be used for text drawing.

Notes:

Parameters

TInt aFontHandle

A handle number for a device font.

Return value

TInt

The duplicate handle number for the device font.

See also:


UseFontNoDuplicate()

void UseFontNoDuplicate(const CFbsBitGcFont* aFont);

Description

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

const CFbsBitGcFont* aFont

A pointer to the font to be used.


DiscardFont()

void DiscardFont();

Description

Discards a selected device font.

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

See also:


SetWordJustification()

void SetWordJustification(TInt aExcessWidth,TInt aNumChars);

Description

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.

See also:


SetCharJustification()

void SetCharJustification(TInt aExcessWidth,TInt aNumGaps);

Description

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.

See also:


UpdateJustification()

void UpdateJustification(const TDesC& aText);

Description

Updates the justification settings.

This function assumes that ActivateNoJustAutoUpdate() has been used.

Parameters

const TDesC& aText

The text for which justification is to be adjusted.


UpdateJustificationVertical()

void UpdateJustificationVertical(const TDesC& aText,TBool aUp);

Description

Updates the justification for vertical text.

Parameters

const TDesC& aText

The text for which justification is to be adjusted.

TBool aUp

ETrue, if text is to be justified upwards;EFalse, if text is to be justified downwards.

[Top]


Setting font styles


SetUnderlineStyle()

void SetUnderlineStyle(TFontUnderline aUnderlineStyle);

Description

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.

See also:


SetStrikethroughStyle()

void SetStrikethroughStyle(TFontStrikethrough aStrikethroughStyle);

Description

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.

See also:

[Top]


Point drawing


Plot()

void Plot(const TPoint& aPoint);

Description

Draws a single point.

The point is drawn with the current pen settings using the current drawing mode.

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

See also:

[Top]


Non-fillable shape drawing


DrawArc()

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

Description

Draws an arc.

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

See also:


DrawLine()

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

Description

Draws a straight line between two points.

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

See also:


DrawLineBy()

void DrawLineBy(const TPoint& aVector);

Description

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

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

See also:


DrawLineTo()

void DrawLineTo(const TPoint& aPoint);

Description

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

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

See also:


DrawPolyLine()

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

Description

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.

See also:


DrawPolyLine()

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

Description

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

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

See also:


DrawPolyLineNoEndPoint()

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

Description

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

Parameters

const CArrayFix<TPoint>* aPointList

An array containing the points on the polyline.


DrawPolyLineNoEndPoint()

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

Description

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

Parameters

const TPoint* aPointList

Pointer to a set of points on the polyline.

TInt aNumPoints

Number of points in the list.

[Top]


Fillable shape drawing


DrawEllipse()

void DrawEllipse(const TRect& aRect);

Description

Draws and fills an ellipse.

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

See also:


DrawPie()

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

Description

Draws and fills a pie slice.

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

See also:


DrawPolygon()

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

Description

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.

See also:


DrawPolygon()

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

Description

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

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

See also:


DrawRoundRect()

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

Description

Draws and fills a rectangle with rounded corners.

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

See also:


DrawRect()

void DrawRect(const TRect& aRect);

Description

Draws and fills a rectangle.

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

See also:

[Top]


Text drawing


DrawText()

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

Description

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.

See also:


DrawText()

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

Description

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.

See also:


DrawText()

void DrawText(const TDesC& aText);

Description

Draws text at the last print position.

Parameters

const TDesC& aText

The text string to be drawn.


DrawText()

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

Description

Draws text clipped to the specified rectangle.

Parameters

const TDesC& aText

The text string to be drawn

const TRect& aBox

The clipping rectangle.


DrawTextVertical()

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

Description

Draws text without a surrounding box and then rotates it into a vertical position.

Parameters

const TDesC& aString

The text string to be drawn.

const TPoint& aPosition

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

TBool aUp

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

See also:


DrawTextVertical()

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

Description

Draws text inside a box and then rotates it into a vertical position.

Parameters

const TDesC& aString

The text string to be drawn.

const TRect& aBox

The box to draw the text in.

TInt aBaselineOffset

An offset from the top of the box to the text baseline.

TBool aUp

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

TTextAlign aHoriz

The text alignment mode — default is left aligned.

TInt aLeftMrg

The left margin for left-aligned text, or the right margin for right-aligned text — default is zero.

See also:


DrawTextVertical()

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

Description

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

Parameters

const TDesC& aText

The text string to be drawn.

TBool aUp

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


DrawTextVertical()

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

Description

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

Parameters

const TDesC& aText

The text string to be drawn

const TRect& aBox

The clipping rectangle.

TBool aUp

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

[Top]


Bitmap drawing


DrawBitmap()

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);

Description

Draws a bitmap.

The function has 3 overloads. The first draws the bitmap given the top left hand corner, doing a compress/stretch based on its internally stored size in twips. The second does a compress/stretch to fit a given rectangle. The third takes a rectangular section of the source bitmap and does a compress/stretch to fit a given destination rectangle.

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

See also:


SetDitherOrigin()

void SetDitherOrigin(const TPoint& aPoint);

Description

Sets the dither origin.

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

Parameters

const TPoint& aPoint

The dither origin.

[Top]


Other member functions


FadeArea()

void FadeArea(const TRegion* aRegion);

Description

Sets the fade area.

Parameters

const TRegion* aRegion

The region defining the fade area.


SetFaded()

void SetFaded(TBool aFaded);

Support

Supported from 6.0

Description

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.

See also:


SetFadingParamaters()

void SetFadingParameters(TUint8 aBlackMap,TUint8 aWhiteMap);

Support

Supported from 6.0

Description

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.

See also:


IsFontUsed()

TBool IsFontUsed() const;

Description

Tests whether a font is used.

Return value

TBool

True, if a font is being used; false, otherwise.


MapColors()

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

Description

Maps pixels in the specified rectangle.

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

Parameters

const TRect& aRect

The rectangle in which pixels are to be mapped.

const TRgb* aColors

A pointer to a set of RGB pairs.

TInt aNumPairs=2

The number of pairs

TBool aMapForwards=ETrue

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.


SetUserDisplayMode()

void SetUserDisplayMode(TDisplayMode aDisplayMode);

Description

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

TDisplayMode aDisplayMode

The display mode to be set.


SetShadowMode()

void SetShadowMode(TBool aShadowMode = EFalse);

Description

Sets the shadow mode on or off.

Parameters

TBool aShadowMode

ETrue, shadow mode is on; EFalse, shadow mode is off. EFalse is the default.


ShadowArea()

void ShadowArea(const TRegion* aRegion);

Description

Sets the shadow area.

Parameters

const TRegion* aRegion

The region defining the shadow area.


SetOrientation()

TBool SetOrientation(TGraphicsOrientation aOrientation);

Description

Sets the orientation.

Parameters

TGraphicsOrientation aOrientation

The required orientation

Return value

TBool aOrientation

True, if the requested orientation is supported; false, otherwise.


OrientationsAvailable()

void OrientationsAvailable(TBool aOrientation[4]);

Support

Supported from 6.0

Description

Gets the orientations supported.

Parameters

TBool aOrientation [4]

An array of four TBool values. Each entry in this array corresponds to successive values of the TGraphicsOrientation enum. If the first array entry has a true value, then the normal orientation is supported; if the second entry array has a true value, then a 90 degree orientation is supported etc.

[Top]


Enumerations


Enum TGraphicsOrientation

TGraphicsOrientation

Description

Defines possible rotation values.

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.