Rogue Wave Views |
Rogue Wave Views Documentation Home |
Graphic path related class. More...
#include <ilviews/graphics/path.h>
Public Member Functions | |
IlvPathDrawingData (IlUInt step, IlvGraphic *object) | |
Constructor. More... | |
const IlvRegion * | getClip () const |
Returns the clipping region used for drawings. More... | |
IlvPort * | getPort () const |
Returns the port used as the destination for drawings. More... | |
void | initDraw (const IlvGraphicPath *gp, const IlvPointArray *transformed, IlvPort *port, const IlvTransformer *tr, const IlvRegion *reg) |
Initializes the object. More... | |
virtual void | setBackground (IlvColor *background) |
Sets the background color. More... | |
virtual void | setForeground (IlvColor *foreground) |
Sets the foreground color. More... | |
virtual void | setMode (IlvDrawMode mode) |
Sets the drawing mode. More... | |
virtual void | setPalette (IlvPalette *palette) |
Sets the palette. More... | |
Public Member Functions inherited from IlvPathSteppingData | |
IlFloat | getAngle () const |
Gets the angle of the current step. More... | |
IlUInt | getCurPath () const |
Gets the current path. More... | |
const IlvPoint * | getCurPosition () const |
Gets the coordinates of a point on the current segment. More... | |
IlUInt | getCurSegment () const |
Gets the current segment in the current path. More... | |
const IlvGraphicPath * | getGraphicPath () const |
Gets the graphic path. More... | |
const IlvPointArray * | getTransformedPaths () const |
Gets an array of transformed IlvPointArray . More... | |
const IlvTransformer * | getTransformer () const |
Gets the current transformer. More... | |
IlAny | getUserArg () const |
Gets the user-defined value given to the constructor. More... | |
IlUInt | getUserStep () const |
Gets the step used in stepping . More... | |
virtual void | init (const IlvGraphicPath *gp, const IlvPointArray *transformed, const IlvTransformer *tr) |
Reinitializes the drawing data. More... | |
virtual void | stepping () |
Implements the algorithm to travel along the graphic path. More... | |
Protected Member Functions | |
virtual IlBoolean | doIt () |
Draws the object returned by IlvPathSteppingData::getUserArg . More... | |
Protected Member Functions inherited from IlvPathSteppingData | |
IlvPathSteppingData (IlUInt userStep, IlAny userArg) | |
Constructor. More... | |
virtual IlBoolean | acceptPath () |
Protected Member Function. More... | |
virtual IlBoolean | beginStepping () |
Begins the travelling operation. More... | |
virtual void | endStepping () |
Begins the travelling operation. More... | |
Graphic path related class.
Library: views
The IlvPathDrawingData
class allows you to repeatedly draw a given IlvGraphic
along an IlvGraphicPath
. This additional drawing is automatically performed by IlvGraphicPath::draw
when an IlvPathDrawingData
is attached to a graphic path.
IlvGraphicPath
. IlvPathDrawingData::IlvPathDrawingData | ( | IlUInt | step, |
IlvGraphic * | object | ||
) |
Constructor.
The constructor initializes a new IlvPathDrawingData
object with a stepping distance of step, and a graphic object to be drawn set to object.
The parameter object is stored in the data member _userArg
in order to be used by the stepping mechanism.
object is not deleted by the IlvPathDrawingData
destructor.
step | The stepping distance. |
object | The graphic object to be drawn. |
|
protectedvirtual |
Draws the object returned by IlvPathSteppingData::getUserArg
.
Draws the object returned by IlvPathSteppingData::getUserArg
(which is a pointer to the parameter graphic of the constructor) at the position specified by IlvPathSteppingData::getCurPosition
and with a rotation specified by IlvPathSteppingData::getAngle
.
IlTrue
to carry on the drawing, and IlFalse
to stop it. The default implementation always returns IlTrue
. Implements IlvPathSteppingData.
const IlvRegion* IlvPathDrawingData::getClip | ( | ) | const |
Returns the clipping region used for drawings.
Returns the clipping region used for drawings.
IlvPort* IlvPathDrawingData::getPort | ( | ) | const |
Returns the port used as the destination for drawings.
void IlvPathDrawingData::initDraw | ( | const IlvGraphicPath * | gp, |
const IlvPointArray * | transformed, | ||
IlvPort * | port, | ||
const IlvTransformer * | tr, | ||
const IlvRegion * | reg | ||
) |
Initializes the object.
Used internally by IlvGraphicPath
to initialize the IlvPathDrawingData
before each call to IlvPathSteppingData::stepping
.
gp | The graphic path. |
transformed | The array of transformed IlvPointArray . |
port | The destination port where the drawings are performed. |
tr | The transformer to be applied to gp. |
reg | The clipping region. |
|
virtual |
Sets the background color.
The default implementation of this method does not do anything. It is called by the member function IlvGraphicPath::setBackground
. You can allow your subclasses to propagate resource modifications of the graphic path to the graphic object stored by IlvPathDrawingData
.
IlvGraphicPath
.
|
virtual |
Sets the foreground color.
The default implementation of this method does not do anything. It is called by the member function IlvGraphicPath::setForeground
. You can allow your subclasses to propagate resource modifications of the graphic path to the graphic object stored by IlvPathDrawingData
.
IlvGraphicPath
.
|
virtual |
Sets the drawing mode.
The default implementation of this method does not do anything. It is called by the member function IlvGraphicPath::setMode
. You can allow your subclasses to propagate resource modifications of the graphic path to the graphic object stored by IlvPathDrawingData
.
IlvGraphicPath
.
|
virtual |
Sets the palette.
The default implementation of this method does not do anything. It is called by the member function IlvGraphicPath::setPalette
. You can allow your subclasses to propagate resource modifications of the graphic path to the graphic object stored by IlvPathDrawingData
.
IlvGraphicPath
. © Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.