Location:
GDI.H
Link against: gdi.lib
class CBitmapContext : public CGraphicsContext;
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.
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
Defined in CBitmapContext
:
AlphaBlendBitmaps()
, AlphaBlendBitmaps()
, BitBlt()
, BitBlt()
, BitBltMasked()
, Clear()
, Clear()
, CopyRect()
, Reserved_CBitmapContext_1()
, Reserved_CBitmapContext_2()
, Reserved_CBitmapContext_3()
, Reserved_CGraphicsContext_2()
, SetFaded()
, SetFadingParameters()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CGraphicsContext
:
CancelClippingRect()
,
CancelClippingRegion()
,
Device()
,
DiscardBrushPattern()
,
DiscardFont()
,
DrawArc()
,
DrawBitmap()
,
DrawBitmapMasked()
,
DrawEllipse()
,
DrawLine()
,
DrawLineBy()
,
DrawLineTo()
,
DrawPie()
,
DrawPolyLine()
,
DrawPolygon()
,
DrawRect()
,
DrawRoundRect()
,
DrawText()
,
DrawTextExtended()
,
DrawTextVertical()
,
EAlternate
,
EAnd
,
ECenter
,
EDashedPen
,
EDiamondCrossHatchBrush
,
EDotDashPen
,
EDotDotDashPen
,
EDottedPen
,
EDrawModeAND
,
EDrawModeANDNOT
,
EDrawModeNOTAND
,
EDrawModeNOTANDNOT
,
EDrawModeNOTOR
,
EDrawModeNOTORNOT
,
EDrawModeNOTPEN
,
EDrawModeNOTSCREEN
,
EDrawModeNOTXOR
,
EDrawModeOR
,
EDrawModeORNOT
,
EDrawModePEN
,
EDrawModeWriteAlpha
,
EDrawModeXOR
,
EForwardDiagonalHatchBrush
,
EHorizontalHatchBrush
,
EInvertPen
,
EInvertScreen
,
ELeft
,
ELogicalOp
,
ENullBrush
,
ENullPen
,
EOr
,
EPatternedBrush
,
EPenmode
,
ERearwardDiagonalHatchBrush
,
ERight
,
ESolidBrush
,
ESolidPen
,
ESquareCrossHatchBrush
,
EVerticalHatchBrush
,
EWinding
,
EWriteAlpha
,
EXor
,
GetUnderlineMetrics()
,
JustificationInPixels()
,
MapColors()
,
MoveBy()
,
MoveTo()
,
Plot()
,
Reserved()
,
Reset()
,
SetBrushColor()
,
SetBrushOrigin()
,
SetBrushStyle()
,
SetCharJustification()
,
SetClippingRect()
,
SetClippingRegion()
,
SetDrawMode()
,
SetOrigin()
,
SetPenColor()
,
SetPenSize()
,
SetPenStyle()
,
SetStrikethroughStyle()
,
SetUnderlineStyle()
,
SetWordJustification()
,
TBrushStyle
,
TDrawMode
,
TDrawModeComponents
,
TDrawTextExtendedParam
,
TDrawTextParam
,
TFillRule
,
TPenStyle
,
TTextAlign
,
UseBrushPattern()
,
UseFont()
virtual void Clear()=0;
Clears the whole bitmap.
The cleared area is filled with the current brush colour.
This pure virtual function is implemented in derived classes.
virtual void Clear(const TRect &aRect)=0;
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.
|
virtual void CopyRect(const TPoint &aOffset, const TRect &aRect)=0;
Copies a rectangle.
This pure virtual function is implemented in derived classes.
|
virtual void BitBlt(const TPoint &aPoint, const CFbsBitmap *aBitmap)=0;
Performs a bitmap block transfer.
This pure virtual function is implemented in derived classes.
|
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.
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.
|
virtual void BitBltMasked(const TPoint &aPoint, const CFbsBitmap *aBitmap, const TRect &aSourceRect, const CFbsBitmap *aMaskBitmap,
TBool aInvertMask)=0;
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.
|
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.
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).
|
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. The formula used is: (S * A + W * (255 - A)) / 255, where:
S - a pixel from aSrcBmp;
W - a pixel from the window;
A - a pixel from aAlphaBmp; The contents of source and alpha bitmap are preserved. The calculated alpha blended pixels are written to the destination CBitmapContext.
|
|
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. For information on how this function works, see the other overload.
|
|
protected: virtual IMPORT_C void Reserved_CGraphicsContext_2();
A reserved virtual function for future use.
protected: virtual IMPORT_C void Reserved_CBitmapContext_3();