|
Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
|
An abstract, device-independent, interface to bitmapped graphics contexts. More...
#include <gdi.h>
Public Member Functions | |
| virtual void | Clear ()=0 |
| Clears the whole bitmap. | |
| virtual void | Clear (const TRect &aRect)=0 |
| Clears a rectangular area of a bitmap. | |
| virtual void | CopyRect (const TPoint &aOffset, const TRect &aRect)=0 |
| Copies a rectangle. | |
| virtual void | BitBlt (const TPoint &aPoint, const CFbsBitmap *aBitmap)=0 |
| Performs a bitmap block transfer. | |
| virtual void | BitBlt (const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aRect)=0 |
| Performs a bitmap block transfer of a rectangular piece of a bitmap. | |
| virtual void | BitBltMasked (const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask)=0 |
| Performs a masked bitmap block transfer. | |
| virtual void | SetFaded (TBool aFaded)=0 |
| Sets whether the graphics context is faded. | |
| virtual void | SetFadingParameters (TUint8 aBlackMap, TUint8 aWhiteMap)=0 |
| Sets the fading parameters. | |
| virtual TInt | AlphaBlendBitmaps (const TPoint &aDestPt, const CFbsBitmap *aSrcBmp, const TRect &aSrcRect, const CFbsBitmap *aAlphaBmp, const TPoint &aAlphaPt)=0 |
| Performs an alpha blending of the source data, aSrcBmp, with the CBitmapContext, using the data from aAlphaBmp as an alpha blending factor. | |
| virtual TInt | AlphaBlendBitmaps (const TPoint &aDestPt, const CWsBitmap *aSrcBmp, const TRect &aSrcRect, const CWsBitmap *aAlphaBmp, const TPoint &aAlphaPt)=0 |
| The method performs an alpha blending of the source data, aSrcBmp, with the CBitmapContext, using the data from aAlphaBmp as an alpha blending factor. | |
Public Member Functions inherited from CGraphicsContext | |
| virtual CGraphicsDevice * | Device () const =0 |
| Gets a pointer to the graphics context's graphics device. | |
| virtual void | SetOrigin (const TPoint &aPos=TPoint(0, 0))=0 |
| Sets the position of the co-ordinate origin. | |
| virtual void | SetDrawMode (TDrawMode aDrawingMode)=0 |
| Sets the drawing mode. | |
| virtual void | SetClippingRect (const TRect &aRect)=0 |
| Sets the clipping rectangle. | |
| virtual void | CancelClippingRect ()=0 |
| Cancels any clipping rectangle. | |
| virtual void | Reset ()=0 |
| Resets the graphics context to its default settings: | |
| virtual void | UseFont (const CFont *aFont)=0 |
| Sets the device font to be used for text drawing. | |
| virtual void | DiscardFont ()=0 |
| Discards a font. | |
| virtual void | SetUnderlineStyle (TFontUnderline aUnderlineStyle)=0 |
| Sets the underline style. | |
| virtual void | SetStrikethroughStyle (TFontStrikethrough aStrikethroughStyle)=0 |
| Sets the strikethrough style. | |
| virtual void | SetWordJustification (TInt aExcessWidth, TInt aNumGaps)=0 |
| Adjusts the spaces between words to stretch or squeeze to a certain width. | |
| virtual void | SetCharJustification (TInt aExcessWidth, TInt aNumChars)=0 |
| Sets character justification. | |
| virtual void | SetPenColor (const TRgb &aColor)=0 |
| Sets the pen colour. | |
| virtual void | SetPenStyle (TPenStyle aPenStyle)=0 |
| Sets the line drawing style for the pen. | |
| virtual void | SetPenSize (const TSize &aSize)=0 |
| Sets the line drawing size for the pen. | |
| virtual void | SetBrushColor (const TRgb &aColor)=0 |
| Sets the brush colour. | |
| virtual void | SetBrushStyle (TBrushStyle aBrushStyle)=0 |
| Sets the brush style. | |
| virtual void | SetBrushOrigin (const TPoint &aOrigin)=0 |
| Sets the brush pattern origin. | |
| virtual void | UseBrushPattern (const CFbsBitmap *aBitmap)=0 |
| Sets the brush pattern to the specified bitmap. | |
| virtual void | DiscardBrushPattern ()=0 |
| Discards a non-built-in brush pattern. | |
| virtual void | MoveTo (const TPoint &aPoint)=0 |
| Sets the drawing point relative to the co-ordinate origin. | |
| virtual void | MoveBy (const TPoint &aVector)=0 |
| Sets the drawing point relative to the current co-ordinates. | |
| virtual void | Plot (const TPoint &aPoint)=0 |
| Draws a single point. | |
| virtual void | DrawArc (const TRect &aRect, const TPoint &aStart, const TPoint &aEnd)=0 |
| Draws an arc. | |
| virtual void | DrawLine (const TPoint &aPoint1, const TPoint &aPoint2)=0 |
| Draws a straight line between two points. | |
| virtual void | DrawLineTo (const TPoint &aPoint)=0 |
| Draws a straight line from the current drawing point to a specified point. | |
| virtual void | DrawLineBy (const TPoint &aVector)=0 |
| Draws a straight line relative to the current drawing point, using a vector. | |
| virtual void | DrawPolyLine (const CArrayFix< TPoint > *aPointList)=0 |
| Draws a polyline from a set of points in an array. | |
| virtual void | DrawPolyLine (const TPoint *aPointList, TInt aNumPoints)=0 |
| Draws a polyline from a set of points in a list. | |
| virtual void | DrawPie (const TRect &aRect, const TPoint &aStart, const TPoint &aEnd)=0 |
| Draws and fills a pie slice. | |
| virtual void | DrawEllipse (const TRect &aRect)=0 |
| Draws and fills an ellipse. | |
| virtual void | DrawRect (const TRect &aRect)=0 |
| Draws and fills a rectangle. | |
| virtual void | DrawRoundRect (const TRect &aRect, const TSize &aCornerSize)=0 |
| Draws and fills a rectangle with rounded corners. | |
| virtual TInt | DrawPolygon (const CArrayFix< TPoint > *aPointList, TFillRule aFillRule=EAlternate)=0 |
| Draws and fills a polygon defined using an array of points. | |
| virtual TInt | DrawPolygon (const TPoint *aPointList, TInt aNumPoints, TFillRule aFillRule=EAlternate)=0 |
| Draws and fills a polygon defined using a list of points. | |
| virtual void | DrawBitmap (const TPoint &aTopLeft, const CFbsBitmap *aSource)=0 |
| Draws a bitmap at the specified point. | |
| virtual void | DrawBitmap (const TRect &aDestRect, const CFbsBitmap *aSource)=0 |
| Draws a bitmap to fit a given rectangle. | |
| virtual void | DrawBitmap (const TRect &aDestRect, const CFbsBitmap *aSource, const TRect &aSourceRect)=0 |
| Draws a specified rectangle of a source bitmap to fit into a given destination rectangle. | |
| virtual void | DrawBitmapMasked (const TRect &aDestRect, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap, TBool aInvertMask)=0 |
| Draws a specified rectangle of a source bitmap to fit into a given rectangle using a given mask. | |
| virtual void | DrawBitmapMasked (const TRect &aDestRect, const CWsBitmap *aBitmap, const TRect &aSourceRect, const CWsBitmap *aMaskBitmap, TBool aInvertMask)=0 |
| Draws a specified rectangle from a wserv bitmap and its mask into another rectangle. | |
| virtual void | DrawText (const TDesC &aText, const TPoint &aPosition)=0 |
| Draws text without a surrounding box. | |
| virtual void | DrawText (const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TTextAlign aAlignment=ELeft, TInt aLeftMargin=0)=0 |
| Draws text inside a box. | |
| virtual IMPORT_C void | DrawText (const TDesC &aText, const TPoint &aPosition, const TDrawTextParam &aParam) |
| Draws the specified text at the given position using the parameters supplied. | |
| virtual IMPORT_C void | Reserved () |
| Reserved function for future use. | |
| IMPORT_C TInt | DrawTextExtended (const TDesC &aText, const TPoint &aPosition, const TDrawTextExtendedParam &aParam) |
| Draws text, optionally changing its direction (right-to-left / left-to-right). | |
| virtual void | MapColors (const TRect &aRect, const TRgb *aColors, TInt aNumPairs, TBool aMapForwards)=0 |
| Maps pixels in the specified rectangle. | |
| virtual TInt | SetClippingRegion (const TRegion &aRegion)=0 |
| Sets the clipping region, any items that fall outside the extent of the clipping region will not be drawn. | |
| virtual void | CancelClippingRegion ()=0 |
| Cancels the current clipping region. | |
| virtual void | DrawTextVertical (const TDesC &aText, const TPoint &aPos, TBool aUp)=0 |
| Draws vertical text in the specified direction. | |
| virtual void | DrawTextVertical (const TDesC &aText, const TRect &aBox, TInt aBaselineOffset, TBool aUp, TTextAlign aVert=ELeft, TInt aMargin=0)=0 |
| Draws text vertically in the specified direction, within a box of the specified size. | |
| IMPORT_C TInt | GetUnderlineMetrics (TInt &aTop, TInt &aBottom) |
| IMPORT_C TInt | SetShadowColor (const TRgb &aShadowColor) |
| Set the font's shadow colour. | |
| IMPORT_C TInt | GetShadowColor (TRgb &aShadowColor) |
| Get the font's shadow colour. | |
| IMPORT_C TBool | IsFbsBitGc () const |
| Determine if the Gc is a CFbsBitGc. | |
| IMPORT_C void | DrawText (const TDesC &aText, const TTextParameters *iParam, const TPoint &aPosition) |
| IMPORT_C void | DrawText (const TDesC &aText, const TTextParameters *iParam, const TRect &aBox, TInt aBaselineOffset, TTextAlign aHrz=ELeft, TInt aMargin=0) |
| IMPORT_C void | DrawText (const TDesC &aText, const TTextParameters *iParam, const TPoint &aPosition, const TDrawTextParam &aParam) |
| IMPORT_C void | DrawTextVertical (const TDesC &aText, const TTextParameters *iParam, const TPoint &aPos, TBool aUp) |
| IMPORT_C void | DrawTextVertical (const TDesC &aText, const TTextParameters *iParam, const TRect &aBox, TInt aBaselineOffset, TBool aUp, TTextAlign aVert=ELeft, TInt aMargin=0) |
| IMPORT_C TInt | DrawTextExtended (const TDesC &aText, const TTextParameters *iParam, const TPoint &aPosition, const TDrawTextExtendedParam &aParam) |
| Draws text, optionally changing its direction (right-to-left / left-to-right). | |
Public Member Functions inherited from CBase | |
| CBase () | |
| Default constructor. | |
| virtual IMPORT_C | ~CBase () |
| Virtual destructor. | |
| TAny * | operator new (TUint aSize, TAny *aBase) __NO_THROW |
| Initialises the object to binary zeroes. | |
| TAny * | operator new (TUint aSize) __NO_THROW |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TLeave) |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TUint aExtraSize) __NO_THROW |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
| TAny * | operator new (TUint aSize, TLeave, TUint aExtraSize) |
| Allocates the object from the heap and then initialises its contents to binary zeroes. | |
Protected Member Functions | |
| IMPORT_C TInt | APIExtension (TUid aUid, TAny *&aOutput, TAny *aInput) |
| IMPORT_C void | Reserved_CGraphicsContext_2 () |
| A reserved virtual function for future use. | |
| virtual IMPORT_C void | Reserved_CBitmapContext_1 () |
| virtual IMPORT_C void | Reserved_CBitmapContext_2 () |
| virtual IMPORT_C void | Reserved_CBitmapContext_3 () |
Protected Member Functions inherited from CBase | |
| virtual IMPORT_C TInt | Extension_ (TUint aExtensionId, TAny *&a0, TAny *a1) |
| Extension function. | |
Additional Inherited Members | |
Public Types inherited from CGraphicsContext | |
| enum | TTextAlign { ELeft , ECenter , ERight } |
| Text alignment. More... | |
| enum | TDrawModeComponents { EInvertScreen =1 , EXor =2 , EOr =4 , EAnd =8 , ELogicalOp =14 , EInvertPen =16 , EPenmode =32 , EWriteAlpha =64 } |
| enum | TDrawMode { EDrawModeAND =EAnd , EDrawModeNOTAND =EInvertScreen|EAnd , EDrawModePEN =EPenmode , EDrawModeANDNOT =EAnd|EInvertPen , EDrawModeXOR =EXor , EDrawModeOR =EOr , EDrawModeNOTANDNOT =EInvertScreen|EAnd|EInvertPen , EDrawModeNOTXOR =EInvertScreen|EXor , EDrawModeNOTSCREEN =EInvertScreen , EDrawModeNOTOR =EInvertScreen|EOr , EDrawModeNOTPEN =EInvertPen|EPenmode , EDrawModeORNOT =EOr|EInvertPen , EDrawModeNOTORNOT =EInvertScreen|EOr|EInvertPen , EDrawModeWriteAlpha =EWriteAlpha } |
| enum | TPenStyle { ENullPen , ESolidPen , EDottedPen , EDashedPen , EDotDashPen , EDotDotDashPen } |
| enum | TBrushStyle { ENullBrush , ESolidBrush , EPatternedBrush , EVerticalHatchBrush , EForwardDiagonalHatchBrush , EHorizontalHatchBrush , ERearwardDiagonalHatchBrush , ESquareCrossHatchBrush , EDiamondCrossHatchBrush } |
| enum | TFillRule { EAlternate , EWinding } |
Static Public Member Functions inherited from CGraphicsContext | |
| static IMPORT_C TInt | JustificationInPixels (TInt aExcessPixels, TInt aTotalUnits, TInt aFirstUnit, TInt aNumUnits) |
| Gets the amount of space in pixels by which to adjust letter or word spacing, given the total number of words and spaces, a start space, and the number of units to be adjusted. | |
| static IMPORT_C TInt | JustificationInPixels (TInt &aExcessPixels, TInt &aTotalUnits) |
| Gets the amount of space in pixels by which to adjust the current letter or word spacing, and also retrieves the number of excess pixels and word spaces remaining after the adjustment is performed. | |
Static Public Member Functions inherited from CBase | |
| static IMPORT_C void | Delete (CBase *aPtr) |
| Deletes the specified object. | |
An abstract, device-independent, interface to bitmapped graphics contexts.
This holds the setting used to draw to a CBitmapDevice.
The default settings of a CBitmapContext object immediately after construction are:
drawing mode is EDrawModePen (pen and brush colours used as they are)
no clipping rectangle
pen settings are: black, solid, single pixel width
brush style is null
no text font selected
The classes CFbsBitGc and CWindowGc are derived from this class.
|
pure virtual |
Performs an alpha blending of the source data, aSrcBmp, with the CBitmapContext, using the data from aAlphaBmp as an alpha blending factor.
The formula used is: (S * A + W * (255 - A)) / 255, where:
| 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. |
Implemented in CWindowGc.
|
pure virtual |
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.
| 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. |
Implemented in CWindowGc.
|
protectedvirtual |
| aOutput | is for output |
| aInput | is for input |
(generated from Symbian Developer Library)
Reimplemented from CGraphicsContext.
Reimplemented in CWindowGc.
|
pure virtual |
Performs a bitmap block transfer.
This pure virtual function is implemented in derived classes.
| aPoint | The destination for the top left corner of the transferred bitmap. It is relative to the top left corner of the destination bitmap, which may be the screen. |
| aBitmap | A memory-resident bitmap. |
Implemented in CWindowGc.
|
pure virtual |
Performs a bitmap block transfer of a rectangular piece of a bitmap.
If the specified rectangle is larger than the bitmap then the bitmap is padded with white.
This pure virtual function is implemented in derived classes.
| aPoint | The destination for the top left corner of the transferred bitmap. It is relative to the top left corner of the destination bitmap, which may be the screen. |
| aBitmap | A memory-resident bitmap |
| aRect | A rectangle defining the portion of the bitmap to transfer. Its coordinates are relative to the top left corner of the source bitmap. |
Implemented in CWindowGc.
|
pure virtual |
Performs a masked bitmap block transfer.
The mask bitmap can be used as either a positive or negative mask. Masked pixels are not mapped to the destination rectangle.
This function uses either a black and white (binary) mask bitmap, or if aMaskBitmap's display mode is EGray256, alpha blending is used. Use of any other mode may result in unpredictable results
With aInvertMask=EFalse, black pixels in the mask bitmap stop corresponding pixels in the source bitmap from being transferred to the destination rectangle. With aInvertMask=ETrue, white pixels in the mask bitmap stop corresponding pixels in the source bitmap from being transferred to the destination rectangle.
Note that if the mask bitmap is smaller than the source bitmap, then it is tiled across the bitmap. Note that the mask is applied before the piece of the bitmap is defined - the mask is tiled relative to the top left of the original source bitmap rather than the top left of the bitmap piece.
This pure virtual function is implemented in derived classes.
| aPoint | The destination for the top left corner of the transferred bitmap. It is relative to the top left corner of the destination bitmap, which may be the screen. |
| aBitmap | A memory-resident source bitmap. |
| aSourceRect | A rectangle defining the piece of the bitmap to be drawn, with co-ordinates relative to the top left corner of the bitmap. |
| aMaskBitmap | A mask bitmap |
| aInvertMask | If EFalse, a source pixel that is masked by a black pixel is not transferred to the destination rectangle. If ETrue, then a source pixel that is masked by a white pixel is not transferred to the destination rectangle. |
Implemented in CWindowGc.
|
pure virtual |
Clears the whole bitmap.
The cleared area is filled with the current brush colour.
This pure virtual function is implemented in derived classes.
Implemented in CWindowGc.
|
pure virtual |
Clears a rectangular area of a bitmap.
The cleared area is filled with the current brush colour.
This pure virtual function is implemented in derived classes.
| aRect | The rectangle to clear. |
Implemented in CWindowGc.
Copies a rectangle.
This pure virtual function is implemented in derived classes.
| aOffset | The offset from the top left corner of the rectangle to be copied to the top left corner of the copy. |
| aRect | The rectangular area to be copied. |
Implemented in CWindowGc.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
A reserved virtual function for future use.
Reimplemented from CGraphicsContext.
|
pure virtual |
Sets whether the graphics context is faded.
| aFaded | ETrue to fade the GC; EFalse to unfade it. |
Implemented in CWindowGc.
|
pure virtual |
Sets the fading parameters.
This function allows you to override the map used when drawing with a faded graphics context (GC). However if you draw to a faded window with a faded GC, then fading on the GC is ignored and the fading of the window is used.
Fading is used to change the colour of a window to make other windows stand out. Fading can either make a faded window closer to white or closer to black.
Fading re-maps colours in the faded GC to fall between the specified black and white map values. If aBlackMap=0 and aWhiteMap=255 then the colours are mapped unchanged. As the values converge the colours are mapped to a smaller range - so the differences between colours in the faded GC decrease. If the values are reversed then the colours are inverted (i.e. where the GC would be black, it is now white).
| aBlackMap | Black map fading parameter. Unfaded this is 0. |
| aWhiteMap | White map fading parameter. Unfaded this is 255. |
Implemented in CWindowGc.