CHuiBrush Class Reference
class CHuiBrush : public CBase
|
A brush implements a series of graphics drawing operations. Brushes are attached to visuals and drawn whenever the visual is drawn. Brushes can be used for augmenting the normal appearance of visuals with graphical features such as background pictures, gradients, overlay icons, and selection highlights. Technically, a brush is a simple class whose most important method is
Draw()
that draws the brush into the specified area of the display.
CHuiVisual::EnableBrushesL()
CHuiBrushArray
Public Attributes
|
THuiTimedValue
|
iOpacity
|
Constructor & Destructor Documentation
CHuiBrush()
IMPORT_C
|
CHuiBrush
|
(
|
)
|
[protected]
|
Member Functions Documentation
ActivateBrushGuide(const CHuiVisual *)
void
|
ActivateBrushGuide
|
(
|
const
CHuiVisual
*
|
aNewGuide
|
)
|
const
|
Notifies change in the brush guide
BeginDraw(CHuiGc &, const MHuiBrushGuide &)
IMPORT_C void
|
BeginDraw
|
(
|
CHuiGc
&
|
aGc,
|
|
const
MHuiBrushGuide
&
|
aGuide
|
|
)
|
const [virtual]
|
The brush is about to get drawn, usually gc parameters are set here
BrushExtension(const TUid &, TAny **)
IMPORT_C void
|
BrushExtension
|
(
|
const
TUid
&
|
aExtensionUid,
|
|
TAny
**
|
aExtensionParameters
|
|
)
|
[protected, virtual]
|
Parameters
const
TUid
& aExtensionUid
|
|
TAny
** aExtensionParameters
|
|
BrushGuide()
Returns active brush guide as a visual if it exist.
Changed()
IMPORT_C
TBool
|
Changed
|
(
|
)
|
const [virtual]
|
Determines whether the brush has been changed and needs to be redrawn.
ClearChanged()
IMPORT_C void
|
ClearChanged
|
(
|
)
|
[virtual]
|
Clears the changed status of the brush. This is called automatically by the refresh loop after a frame has been drawn.
ClipToVisual()
IMPORT_C
TBool
|
ClipToVisual
|
(
|
)
|
const
|
Draw(CHuiGc &, const MHuiBrushGuide &)
IMPORT_C void
|
Draw
|
(
|
CHuiGc
&
|
aGc,
|
|
const
MHuiBrushGuide
&
|
aGuide
|
|
)
|
const [virtual]
|
Draw the brush using the current drawing parameters.
EndDraw(CHuiGc &, const MHuiBrushGuide &)
IMPORT_C void
|
EndDraw
|
(
|
CHuiGc
&
|
aGc,
|
|
const
MHuiBrushGuide
&
|
aGuide
|
|
)
|
const [virtual]
|
The brush has been drawn, usually parameters changed in BeginDraw are reset here
ExpandVisualRect(TRect &)
IMPORT_C void
|
ExpandVisualRect
|
(
|
TRect
&
|
aRect
|
)
|
const [virtual]
|
Expands the dirty region of a visual. Called when a visual's dirty region is being determined. The brush is allowed to expand the rectangle to cover any additional drawing the brush is doing. This is not called when the brush is clipped to the visual rectangle, because in that case no drawing can occur outside the visual's area.
Parameters
TRect
& aRect
|
Rectangle to expand. Visual's dirty region.
|
SessionId()
IMPORT_C
TInt
|
SessionId
|
(
|
)
|
const
|
Gets the session id for object.
SetChanged()
IMPORT_C void
|
SetChanged
|
(
|
)
|
|
Mark the brush as changed or unchanged.
SetClipToVisual(TBool)
IMPORT_C void
|
SetClipToVisual
|
(
|
TBool
|
aClipToVisual
|
)
|
|
Defines whether the brush can draw outside brush guide (i.e. visual's) rect
SetLayer(THuiBrushLayer)
Defines the layer where brush is drawn (on top of / below visual)
THuiBrushLayer
SetSessionId(TInt)
IMPORT_C void
|
SetSessionId
|
(
|
TInt
|
aSessionId
|
)
|
|
Sets the session id for object.
Type()
IMPORT_C TType
|
Type
|
(
|
)
|
const
|
Type2()
TInt
|
Type2
|
(
|
)
|
const [inline, virtual]
|
Member Enumerations Documentation
Enum TType2
Enumerators
ENotKnown
|
|
EImageBrush
|
|
ECmdBufferBrush
|
|
Member Data Documentation
TBool
iChanged
ETrue
if the brush needs to be redrawn.
TBool
iClipToVisual
TBool
|
iClipToVisual
|
[private]
|
Clip brush to the visual.
TBool
iEnabled
ETrue
if the brush will be drawn.
CHuiVisual * iGuideVisual
THuiBrushLayer
iLayer
Layer determines drawing order.
TInt
iSessionId
TInt
|
iSessionId
|
[private]
|
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.