Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions | Protected Member Functions
IlvPathDrawingData Class Reference

Graphic path related class. More...

#include <ilviews/graphics/path.h>

Inheritance diagram for IlvPathDrawingData:
IlvPathSteppingData

Public Member Functions

 IlvPathDrawingData (IlUInt step, IlvGraphic *object)
 Constructor. More...
 
const IlvRegiongetClip () const
 Returns the clipping region used for drawings. More...
 
IlvPortgetPort () 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 IlvPointgetCurPosition () 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 IlvGraphicPathgetGraphicPath () const
 Gets the graphic path. More...
 
const IlvPointArraygetTransformedPaths () const
 Gets an array of transformed IlvPointArray. More...
 
const IlvTransformergetTransformer () 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...
 

Detailed Description

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.

See also
IlvGraphicPath.

Constructor & Destructor Documentation

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.

Parameters
stepThe stepping distance.
objectThe graphic object to be drawn.

Member Function Documentation

virtual IlBoolean IlvPathDrawingData::doIt ( )
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.

Returns
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.

Returns
The clipping region used for drawings.
IlvPort* IlvPathDrawingData::getPort ( ) const

Returns the port used as the destination for drawings.

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.

Parameters
gpThe graphic path.
transformedThe array of transformed IlvPointArray.
portThe destination port where the drawings are performed.
trThe transformer to be applied to gp.
regThe clipping region.
virtual void IlvPathDrawingData::setBackground ( IlvColor background)
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.

See also
IlvGraphicPath.
virtual void IlvPathDrawingData::setForeground ( IlvColor foreground)
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.

See also
IlvGraphicPath.
virtual void IlvPathDrawingData::setMode ( IlvDrawMode  mode)
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.

See also
IlvGraphicPath.
virtual void IlvPathDrawingData::setPalette ( IlvPalette palette)
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.

See also
IlvGraphicPath.

© Copyright 2016, 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.