CHuiCurvePath Class Reference
class CHuiCurvePath : public CBase |
CHuiCurvePath is a 2D path composed out of line segments and ellipse arcs. Each segment can have a length factor that causes it to be shorter or longer than its real length.
Nested Classes and Structures
Public Member Functions |
---|
| CHuiCurvePath() |
| ~CHuiCurvePath() |
IMPORT_C void | AppendArcL(const TPoint &, const TSize &, TReal32, TReal32, TReal32) |
IMPORT_C void | AppendArcL(const THuiRealPoint &, const THuiRealSize &, TReal32, TReal32, TReal32) |
IMPORT_C void | AppendLineL(const TPoint &, const TPoint &, TReal32) |
IMPORT_C void | AppendLineL(const THuiRealPoint &, const THuiRealPoint &, TReal32) |
IMPORT_C void | Draw(const TPoint &, CHuiGc *) |
IMPORT_C void | EnableLoop(TBool) |
IMPORT_C void | Evaluate(TReal32, THuiRealPoint &) |
IMPORT_C const CHuiVisual * | GetVisual() |
IMPORT_C TBool | IsLegacyApiUsed() |
IMPORT_C TReal32 | Length() |
IMPORT_C TBool | Loop() |
IMPORT_C TReal32 | MapValue(TReal32, TInt) |
IMPORT_C TBool | MappingFunctionChanged() |
IMPORT_C void | MappingFunctionClearChanged() |
IMPORT_C TBool | NeedUpdate() |
IMPORT_C CHuiCurvePath * | NewL() |
IMPORT_C CHuiCurvePath * | NewLC() |
IMPORT_C void | Reset() |
IMPORT_C void | SetNeedsUpdate() |
IMPORT_C void | SetOrigin(TReal32) |
IMPORT_C void | SetVisual(const CHuiVisual *) |
IMPORT_C void | Update(TReal32, TReal32, TReal32, MHuiMappingFunction *, MHuiMappingFunction *) |
Constructor & Destructor Documentation
CHuiCurvePath()
Constructor. Not exported.
Member Functions Documentation
AppendArcL(const TPoint &, const TSize &, TReal32, TReal32, TReal32)
Appends a curve segment to the path.
Parameters
const TPoint & aOrigin | Origin of the arc ellipse. |
const TSize & aSize | Horiz and vert radii of the arc ellipse. |
TReal32 aStartAngle | Start angle of the arc (degrees). |
TReal32 aEndAngle | End angle of the arc (degrees). |
TReal32 aLength = -1 | Negative length means that the length will be the actual length of the arc. |
AppendArcL(const THuiRealPoint &, const THuiRealSize &, TReal32, TReal32, TReal32)
Appends a curve segment to the path. Note that the coordinate values should match to the metrics unit type of the visual that uses this class.
Parameters
const THuiRealPoint & aOrigin | Origin of the arc ellipse. |
const THuiRealSize & aSize | Horiz and vert radii of the arc ellipse. |
TReal32 aStartAngle | Start angle of the arc (degrees). |
TReal32 aEndAngle | End angle of the arc (degrees). |
TReal32 aLength = -1 | Negative length means that the length will be the actual length of the arc. |
AppendLineL(const TPoint &, const TPoint &, TReal32)
Appends a line segment to the path.
Parameters
const TPoint & aStart | |
const TPoint & aEnd | |
TReal32 aLength = -1 | Negative length means that the length will be the actual length of the line segment. |
AppendLineL(const THuiRealPoint &, const THuiRealPoint &, TReal32)
Appends a line segment to the path. Note that the coordinate values should match to the metrics unit type of the visual that uses this class.
Parameters
const THuiRealPoint & aStart | Start point of the line segment. |
const THuiRealPoint & aEnd | End point of the line segment. |
TReal32 aLength = -1 | Negative length means that the length will be the actual length of the line segment. |
CalculateLength()
IMPORT_C TReal32 | CalculateLength | ( | ) | const [protected] |
Determines the total length of the path by summing the lengths of all the segments.
CurvePathExtension(const TUid &, TAny **)
IMPORT_C void | CurvePathExtension | ( | const TUid & | aExtensionUid, |
| TAny ** | aExtensionParams |
| ) | [protected, virtual] |
Provides expandability, helps keeping the binary compatibility. Since virtual table is now exported and this class is dll derivable and the implementation is more difficult to change, hence this method, which can provide additional extension APIs.
Parameters
const TUid & aExtensionUid | UID, which is being used for recognizing the extension |
TAny ** aExtensionParams | Return pointer to the extension API, once recognized from the extension uid |
Draw(const TPoint &, CHuiGc *)
IMPORT_C void | Draw | ( | const TPoint & | aOrigin, |
| CHuiGc * | aGc |
| ) | const [virtual] |
Draws the path's triangles.
EnableLoop(TBool)
IMPORT_C void | EnableLoop | ( | TBool | aEnable = ETrue | ) | |
Enables or disables looping of the path. Looping means that all positions are wrapped to the path, so that, e.g., positions past the end are wrapped to the beginning of the path. Looping is enabled by default.
Evaluate(TReal32, THuiRealPoint &)
Evaluates a point along the curve path.
Parameters
TReal32 aPos | Position along the path. |
THuiRealPoint & aPoint | X and Y coordinates of the point on the path. |
EvaluateSegment(TReal32, const TSegment &, THuiRealPoint &, THuiRealPoint *)
Evaluates a point on a segment.
IsLegacyApiUsed()
IMPORT_C TBool | IsLegacyApiUsed | ( | ) | const |
Length()
Determines the total length of the path.
Loop()
IMPORT_C TBool | Loop | ( | ) | const |
Determines if the path is wrapped.
MappingFunctionChanged()
IMPORT_C TBool | MappingFunctionChanged | ( | ) | const |
MappingFunctionClearChanged()
IMPORT_C void | MappingFunctionClearChanged | ( | ) | |
NeedUpdate()
IMPORT_C TBool | NeedUpdate | ( | ) | const |
Determines if the path needs updating.
NewLC()
Constructor. The new brush is left on the cleanup stack.
Reset()
IMPORT_C void | Reset | ( | ) | [virtual] |
Resets the path by removing all segments.
SegmentCount()
IMPORT_C TInt | SegmentCount | ( | ) | const [protected] |
Returns the number of segments.
SetNeedsUpdate()
IMPORT_C void | SetNeedsUpdate | ( | ) | |
Called when the path needs updating.
SetOrigin(TReal32)
IMPORT_C void | SetOrigin | ( | TReal32 | aPosOrigin | ) | |
Sets the position that is at path location zero.
Parameters
TReal32 aPosOrigin | Added to positions when evaluating. |
SetVisual(const CHuiVisual *)
IMPORT_C void | SetVisual | ( | const CHuiVisual * | aVisual | ) | const |
Update(TReal32, TReal32, TReal32, MHuiMappingFunction *, MHuiMappingFunction *)
Recalculate the path's vertices and colors.
Member Enumerations Documentation
Enum TSegmentType
Enumerators
ESegmentTypeLine | |
ESegmentTypeArc | |
Member Data Documentation
TBool
iChanged
Flag to determine if the path has changed.
THuiCurvePathExtension * iExtension
THuiCurvePathExtension * | iExtension | [private] |
TBool
iNeedUpdate
TBool
| iNeedUpdate | [private] |
THuiTimedPoint
iOffset
Offset to the entire path.
RArray< TSegment > iSegments
Array of line and arc segments.
TInt
iSpare
Spare member to help keeping binary compatibility, since HuiCurvePath is now dll derivable
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.