Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

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

Graphic class. More...

#include <ilviews/graphics/path.h>

Inheritance diagram for IlvGraphicPath:
IlvSimpleGraphic IlvGraphic IlvValueInterface

Public Member Functions

 IlvGraphicPath (IlvDisplay *display, IlUInt count, IlvPoint *points, IlBoolean copyPoints=IlTrue, IlvPalette *palette=0)
 Constructor. More...
 
 IlvGraphicPath (IlvDisplay *display, IlUInt count, IlvPointArray *paths, IlBoolean copyPoints=IlTrue, IlvPalette *palette=0)
 Constructor. More...
 
virtual ~IlvGraphicPath ()
 Destructor. More...
 
virtual void applyTransform (const IlvTransformer *t)
 Applies a transformation function to the graphic object. More...
 
const IlvRectbbox () const
 Retrieves the bounding box. More...
 
virtual void boundingBox (IlvRect &rect, const IlvTransformer *t=0) const
 Retrieves the bounding box. More...
 
virtual IlBoolean contains (const IlvPoint &p, const IlvPoint &tp, const IlvTransformer *t=0) const
 Checks if a point is contained. More...
 
virtual void draw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the path and its drawing data. More...
 
IlvPalettegetBackgroundPalette () const
 Retrieves the background palette. More...
 
IlUInt getBBoxExtent () const
 Gets the bounding box extent. More...
 
IlvDrawRule getDrawRule () const
 Retrieves the draw rule. More...
 
IlDouble getLength () const
 Computes the length of this graphic path. More...
 
IlDouble getLength (const IlvPointArray &path) const
 Computes the length of a path. More...
 
virtual IlDouble getLocation (IlUInt count, const IlvPointArray *paths, IlDouble distance=0., IlvPoint *pos=0, IlDouble *angle=0, IlUInt *path=0, IlUInt *segment=0) const
 Computes a location along a path. More...
 
IlDouble getLocation (IlDouble distance, IlvPoint *pos=0, IlDouble *angle=0, IlUInt *path=0, IlUInt *segment=0, IlvTransformer *t=0) const
 Computes a location along this path. More...
 
IlUInt getNumPaths () const
 Retrieves the number of paths. More...
 
IlvPathDrawingDatagetPathDrawingData () const
 Gets the drawing data. More...
 
const IlvPointArraygetPaths () const
 Retrieves the paths. More...
 
virtual void setAlpha (IlvIntensity)
 Sets the alpha value of the object. More...
 
virtual void setAntialiasingMode (IlvAntialiasingMode)
 Sets the anti-aliasing mode of the object. More...
 
virtual void setBackground (IlvColor *bg)
 Sets the background color. More...
 
void setBBoxExtent (IlUInt extent)
 Sets the bounding box extent. More...
 
void setDrawRule (IlvDrawRule val)
 Sets the draw rule. More...
 
virtual void setForeground (IlvColor *fg)
 Sets the foreground color. More...
 
virtual void setMode (IlvDrawMode mode)
 Sets the drawing mode. More...
 
virtual void setPalette (IlvPalette *pal)
 Sets the palette. More...
 
void setPathDrawingData (IlvPathDrawingData *data)
 Sets the drawing data. More...
 
- Public Member Functions inherited from IlvSimpleGraphic
 IlvSimpleGraphic (IlvDisplay *display, IlvPalette *palette=0)
 Initializes a new IlvSimpleGraphic. More...
 
virtual ~IlvSimpleGraphic ()
 Destructor. More...
 
virtual void applyResources (const char *, const char *, const char *, const char *, IlvDisplay *=0)
 Applies resources on a graphic object. More...
 
IlvIntensity getAlpha () const
 Retrieves the alpha value. More...
 
IlvAntialiasingMode getAntialiasingMode () const
 Retrieves the anti-aliasing mode. More...
 
IlvArcMode getArcMode () const
 Retrieves the arc mode. More...
 
IlvColorgetBackground () const
 Retrieves the background color. More...
 
IlvColorPatterngetColorPattern () const
 Retrieves the color pattern. More...
 
virtual IlvDisplaygetDisplay () const
 Retrieves the IlvDisplay instance. More...
 
IlvFillRule getFillRule () const
 Retrieves the fill rule. More...
 
IlvFillStyle getFillStyle () const
 Retrieves the fill style. More...
 
IlvFontgetFont () const
 Retrieves the font. More...
 
IlvColorgetForeground () const
 Retrieves the foreground color. More...
 
IlvGradientPatterngetGradientPattern () const
 Retrieves the gradient pattern. More...
 
IlvLineStylegetLineStyle () const
 Retrieves the line style. More...
 
IlUShort getLineWidth () const
 Retrieves the line width. More...
 
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look & feel handler used by this object. More...
 
virtual int getLookupStringInputMethod (IlvEvent &event, char *bufferReturn, int bytesBuffer, int *statusReturn)
 Gets the preedit string from an input method. More...
 
IlvDrawMode getMode () const
 Retrieves the draw mode. More...
 
IlBoolean getOverwrite () const
 Retrieves the overwrite mode. More...
 
IlvPalettegetPalette () const
 Retrieves the internal palette value. More...
 
IlvPatterngetPattern () const
 Retrieves the pattern. More...
 
virtual void invert (IlBoolean=IlFalse)
 Highlights the object. More...
 
virtual void registerInputMethod () const
 Controls the connection of a graphic object to an input method. More...
 
virtual void setArcMode (IlvArcMode)
 Sets the arc mode of the object. More...
 
virtual void setColorPattern (IlvColorPattern *)
 Sets the color pattern of the object. More...
 
virtual void setFillRule (IlvFillRule)
 Sets the fill rule of the object. More...
 
virtual void setFillStyle (IlvFillStyle)
 Sets the fill style of the object. More...
 
virtual void setFocusValuesInputMethod (IlUShort count, const IlvImValue *values) const
 Controls the interaction between a simple graphic object and an input method. More...
 
virtual void setFont (IlvFont *)
 Sets the font of the object. More...
 
virtual void setGradientPattern (IlvGradientPattern *)
 Sets the gradient pattern of the object. More...
 
virtual void setHolder (IlvGraphicHolder *)
 Sets the object's holder. More...
 
virtual void setLineStyle (IlvLineStyle *)
 Sets the line style of the object. More...
 
virtual void setLineWidth (IlUShort)
 Sets the line width of the object. More...
 
virtual void setOverwrite (IlBoolean)
 Sets an overwrite mode that modifies how the drawing member functions operate. More...
 
virtual void setPattern (IlvPattern *)
 Sets the pattern of the object. More...
 
virtual void setValuesInputMethod (IlUShort count, const IlvImValue *values) const
 Controls the interaction between a graphic object and an input method. More...
 
virtual void unRegisterInputMethod () const
 Controls the disconnection of a graphic object from an input method. More...
 
virtual void unsetFocusInputMethod () const
 Controls the interaction between a graphic object and an input method. More...
 
- Public Member Functions inherited from IlvGraphic
void addCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Adds a callback function to a callback list. More...
 
void addCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0)
 Adds a callback function to a callback list. More...
 
void addCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data)
 Adds a callback function to a callback list. More...
 
void addClassProperty (const IlSymbol *key, IlAny value)
 Adds a property to this object's class. More...
 
void addProperty (const IlSymbol *key, IlAny value)
 Adds a specific property to the object. More...
 
void addTag (const IlSymbol *tag)
 Adds a tag. More...
 
virtual void apply (IlvApplyObject function, IlAny arg)
 Applies a function to objects that compose another object. More...
 
IlBoolean applyAttribute (const char *attributeClassName, IlInt value, IlAny checkData=0) const
 Applies attributes. More...
 
IlBoolean applyAttribute (const char *attributeClassName, IlFloat value, IlAny checkData=0) const
 Applies attributes. More...
 
IlBoolean applyAttribute (const char *attributeClassName, const char *value, IlAny checkData=0) const
 Applies attributes. More...
 
virtual void applyReferences (IlvApplyObject function, IlAny arg)
 Applies a function to objects that are referenced by another object. More...
 
virtual void callCallbacks (const IlSymbol *callbackType)
 Calls every callback of a given type. More...
 
const char * className () const
 Returns the class name of an object. More...
 
virtual void computeFocusRegion (IlvRegion &r, const IlvTransformer *t=0) const
 Computes the region needed for the drawing of the focus. More...
 
IlBoolean contains (const IlvPoint &p) const
 Checks whether a point is in the object. More...
 
virtual IlvGraphiccopy () const =0
 Copies this object. More...
 
void draw (IlvPort *dst, const IlvTransformer *t, const IlvRect *clip) const
 Draws a graphic object. More...
 
virtual void drawFocus (IlvPort *dst, const IlvPalette *palette, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws additional drawings for an object that has the keyboard focus. More...
 
virtual void getAccessors (const IlSymbol *const **, const IlvValueTypeClass *const **, IlUInt &) const
 Retrieves the list of available accessors of an object. More...
 
IlvGraphicCallback getCallback (const IlSymbol *callbackType) const
 Gets a callback. More...
 
IlvGraphicCallback getCallback () const
 Gets the main callback function. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Gets a callback user data. More...
 
IlAny getCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Gets a callback user data. More...
 
IlSymbolgetCallbackName (const IlSymbol *callbackType) const
 Gets the name of a callback. More...
 
IlSymbolgetCallbackName () const
 Gets the symbol that identifies the main callback. More...
 
virtual IlUInt getCallbackTypes (const char *const **names, const IlSymbol *const **types) const
 Gets the number of register callback types for the object. More...
 
virtual IlvGraphicgetChildAt (IlUInt index) const
 Returns the sub-object of the graphic object specified by index. More...
 
virtual IlvGraphicgetChildByName (const char *name) const
 Returns the sub-object of the graphic object specified by a name. More...
 
virtual IlUInt getChildCount () const
 Returns the number of children of this graphic object. More...
 
virtual IlInt getChildIndex (const IlvGraphic *object) const
 Returns the index of the specified sub-object in this graphic object. More...
 
virtual IlvGraphic *const * getChildren (IlUInt &count) const
 Returns an array containing the sub-objects of this graphic object. More...
 
virtual IlvClassInfogetClassInfo () const
 Gets class information. More...
 
IlAny getClassProperty (const IlSymbol *key, IlBoolean checkParent=IlFalse) const
 Retrieves the indicated property value in the class of this object. More...
 
IlAny getClientData () const
 Gets client data. More...
 
virtual const char * getDefaultInteractor () const
 Gets the name of the default interactor for this object. More...
 
virtual IlvGraphicHoldergetHolder () const
 Gets a pointer to an object's holder. More...
 
IlvInteractorgetInteractor () const
 Returns the interactor associated with the current object. More...
 
const char * getName () const
 Gets the name of the object. More...
 
IlvNamedPropertygetNamedProperty (const IlSymbol *name) const
 Gets a named property. More...
 
IlSymbolgetNextFocusGraphic () const
 Gets the next object in the focus chain. More...
 
IlSymbolgetPreviousFocusGraphic () const
 Gets the previous object in the focus chain. More...
 
IlAny getProperty (const IlSymbol *key) const
 Gets a property. More...
 
IlvSmartSetgetSmartSet () const
 Gets the smart set object containing this graphic object. More...
 
const IlSymbol *const * getTags (IlUInt &count) const
 Returns all the tags applied to this object. More...
 
IlvDim h () const
 Gets the height value of the object. More...
 
void h (IlvDim h)
 Sets the height value of the object. More...
 
IlBoolean hasCallback (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallback (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function is in a callback list. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback) const
 Checks whether a callback function has user data. More...
 
IlBoolean hasCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName) const
 Checks whether a callback function has user data. More...
 
const IlvClassInfohasClassProperty (const IlSymbol *key, IlBoolean s=IlFalse) const
 Checks for a class where the keyed property exists. More...
 
IlBoolean hasProperty (const IlSymbol *key) const
 Checks whether the object has a particular property. More...
 
IlBoolean hasTag (const IlSymbol *tag) const
 Checks whether the object has a specific tag. More...
 
virtual IlBoolean inside (const IlvRegion &r, const IlvTransformer *t=0) const
 Determines whether an object with transformation applied is inside the bounding box. More...
 
IlBoolean inside (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const
 Determines whether an object with transformation applied is inside the bounding box. More...
 
IlBoolean inside (const IlvRect &r) const
 Determines whether a rectangle is inside the bounding box. More...
 
virtual IlBoolean intersects (const IlvRegion &r, const IlvTransformer *t=0) const
 Checks whether a region intersects the bounding box with transformation applied. More...
 
IlBoolean intersects (const IlvRect &r, const IlvRect &tr, const IlvTransformer *t=0) const
 Checks whether a rectangle intersects the bounding box with transformation applied. More...
 
IlBoolean intersects (const IlvRect &r) const
 Checks whether a rectangle intersects the bounding box. More...
 
IlBoolean isFirstFocusGraphic () const
 Checks whether the object is first in the focus chain. More...
 
IlBoolean isFocusable () const
 Checks whether the object can receive the keyboard focus. More...
 
IlBoolean isInSmartSet () const
 Checks whether a graphic object belongs to a smart set. More...
 
IlBoolean isLastFocusGraphic () const
 Checks whether the object is last in the focus chain. More...
 
IlBoolean isSensitive () const
 Checks whether the object is sensitive. More...
 
IlBoolean isSubtypeOf (const char *parentClass) const
 Checks whether this object's class is a subclass of a given parent class. More...
 
IlBoolean isSubtypeOf (const IlvClassInfo *classInfo) const
 Checks whether this object's class is a subclass. More...
 
virtual void move (IlvPos x, IlvPos y)
 Moves the graphic object. More...
 
void move (const IlvPoint &p)
 Moves the graphic object. More...
 
void moveResize (const IlvRect &size)
 Moves and resizes a graphic object. More...
 
virtual IlBoolean needsInputContext () const
 Indicates whether the graphic instance can connect to an input method for locale dependent input. More...
 
virtual void print (std::ostream &out, int level=0) const
 Prints for debugging purposes. More...
 
void removeCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Removes a callback function from a callback list. More...
 
void removeCallback (const IlSymbol *callbackType, const IlSymbol *callbackName)
 Removes a callback function from a callback list. More...
 
IlBoolean removeClassProperty (const IlSymbol *key)
 Removes a property from this object's class. More...
 
void removeInteractor ()
 Removes the interactor from the current object. More...
 
IlvNamedPropertyremoveNamedProperty (IlSymbol *name)
 Removes a named property from the object. More...
 
IlBoolean removeProperty (const IlSymbol *key)
 Removes a property from the object. More...
 
void removeTag (const IlSymbol *tag)
 Removes a tag. More...
 
IlBoolean replaceClassProperty (const IlSymbol *key, IlAny value)
 Replaces a property in this object's class. More...
 
IlBoolean replaceProperty (const IlSymbol *key, IlAny value)
 Replaces a property. More...
 
virtual void resize (IlvDim newW, IlvDim newH)
 Resizes a graphic object. More...
 
virtual void rotate (const IlvPoint &center, IlFloat angle)
 Rotates a graphic object. More...
 
virtual void scale (IlFloat zoomX, IlFloat zoomY)
 Scales the graphic object. More...
 
void setCallback (const IlSymbol *callbackType, IlvGraphicCallback callback)
 Sets a new callback. More...
 
void setCallback (const IlSymbol *callbackType, const IlSymbol *callbackName, const IlSymbol *script=0)
 Removes all previously set callbacks. More...
 
void setCallback (const IlSymbol *callbackType, IlvGraphicCallback callbackName, IlAny data)
 Removes all previously set callbacks. More...
 
void setCallback (IlvGraphicCallback callback, IlAny data)
 Sets the main callback function. More...
 
void setCallbackData (const IlSymbol *callbackType, IlvGraphicCallback callback, IlAny data)
 Sets the callback user data for a callback function. More...
 
void setCallbackData (const IlSymbol *callbackType, const IlSymbol *callbackName, IlAny data)
 Sets the callback user data for a callback function. More...
 
void setCallbackName (const IlSymbol *callbackName)
 Sets the symbol that identifies the main callback. More...
 
void setClientData (IlAny clientData)
 Sets client data. More...
 
void setFirstFocusGraphic ()
 Sets the object to be first in the focus chain.
 
void setFocusable (IlBoolean value)
 Set the focusable state of the object. More...
 
IlBoolean setInteractor (IlvInteractor *inter)
 Attaches an interactor to the current object. More...
 
IlBoolean setInteractor (const char *name)
 Attaches an interactor to this graphic object. More...
 
void setLastFocusGraphic ()
 Sets the object to be last in the focus chain.
 
virtual void setName (const char *name)
 Sets the name of the object. More...
 
IlvNamedPropertysetNamedProperty (IlvNamedProperty *property)
 Sets a named property on the object. More...
 
virtual void setNeedsInputContext (IlBoolean val)
 Specifies whether the graphic object should have locale dependent input. More...
 
void setNextFocusGraphic (IlSymbol *name)
 Sets the object to be next in the focus chain. More...
 
void setPreviousFocusGraphic (IlSymbol *name)
 Sets an object as previous in the focus chain. More...
 
void setProperty (const IlSymbol *key, IlAny value)
 Sets a property of the object to a value. More...
 
virtual void setSensitive (IlBoolean value)
 Sets the sensitivity of the object. More...
 
virtual void symmetry (IlvDirection axis)
 Flips a graphic object. More...
 
virtual void translate (IlvPos dx, IlvPos dy)
 Applies a transformation function on a graphic object. More...
 
IlvDim w () const
 Gets the width value of the object. More...
 
void w (IlvDim w)
 Sets the width value of the object. More...
 
virtual void write (IlvOutputFile &output) const =0
 Writes an object description to a file. More...
 
IlvPos x () const
 Gets the x coordinate value of the object. More...
 
void x (IlvPos x)
 Sets the x coordinate value of the object. More...
 
IlvPos y () const
 Gets the y coordinate value of the object. More...
 
void y (IlvPos y)
 Sets the y coordinate value of the object. More...
 
virtual IlBoolean zoomable () const
 Checks whether this object is zoomable. More...
 
- Public Member Functions inherited from IlvValueInterface
virtual IlBoolean applyValue (const IlvValue &value)
 Apply an accessor. More...
 
virtual IlBoolean changeValue (const IlvValue &val)
 Changes the value of an accessor. More...
 
virtual IlBoolean changeValues (const IlvValue *values, IlUShort count=0)
 Changes several accessor values simultaneously. More...
 
virtual IlvValuequeryValue (IlvValue &val) const
 Retrieves an accessor value. More...
 
virtual void queryValues (IlvValue *values, IlUShort count) const
 Retrieves multiple accessor values simultaneously. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvGraphic
static void AddProperty (const IlSymbol *key, IlAny value)
 Adds a property to this object's class. More...
 
static void AddToCallbackTypeList (IlUInt &count, const char *const **names, const IlSymbol *const **types, const char *newName, const IlSymbol *newType)
 Adds a callback to a list. More...
 
static void AllowZoom (IlBoolean az)
 Sets or inhibits zooming. More...
 
static IlvClassInfoClassInfo () const
 Gets class information. More...
 
static IlAny GetProperty (const IlSymbol *key, IlBoolean checkSuperClass=IlFalse)
 Retrieves the property value associated with the key in this object's class. More...
 
static const IlvClassInfoHasProperty (const IlSymbol *key, IlBoolean checkSuperClass=IlFalse)
 Checks for the existence of a property for this object's class hierarchy. More...
 
static IlBoolean IsZoomAllowed ()
 Checks whether zoomable objects can display themselves when zooming out. More...
 
static IlvGraphicread (IlvInputFile &file, IlvPalette *palette)
 Reads an object description from a file. More...
 
static IlBoolean RemoveProperty (const IlSymbol *key)
 Removes a property from this object's class. More...
 
static IlBoolean ReplaceProperty (const IlSymbol *key, IlAny value)
 Replaces a property in this object's class. More...
 

Detailed Description

Graphic class.

Library: views

An IlvGraphicPath is a collection of polypoints.

Depending on the value of the DrawRule attribute of the object, the polypoints are drawn as polylines (IlvStrokeOnly), filled polygons (IlvFillOnly), or both; that is, filled polygons with an outline (IlvStrokeAndFill).

The palette defined by the IlvSimpleGraphic superclass is used to draw the outline of the polygon. IlvGraphicPath defines a second palette (backgroundPalette) to fill the polygons.

The main differences between an IlvGraphicPath and a set of IlvPolygons are the following:

IlvGraphicPath also allows user-specific actions when the polypoints are drawn. This is done by attaching a data structure to the IlvGraphicPath. At each redraw, the graphic path "travels" along the collection of paths, triggering a data structure method at each step. This mechanism is described in the sections on the member function setPathDrawingData and the class IlvPathSteppingData and its subclass IlvPathDrawingData.

Both of the IlvGraphicPath constructors automatically compute the background palette from the resource of the regular palette. Foreground color and background color are swapped; other resources are identical.

See also
IlvPathDrawingData, IlvPathSteppingData, IlvPointArray,

Constructor & Destructor Documentation

§ IlvGraphicPath() [1/2]

IlvGraphicPath::IlvGraphicPath ( IlvDisplay display,
IlUInt  count,
IlvPoint points,
IlBoolean  copyPoints = IlTrue,
IlvPalette palette = 0 
)

Constructor.

This constructor initializes an IlvGraphicPath containing only one polypoint.

Parameters
displayThe display instance.
countThe number of points that define this graphic path.
pointsThe array of at least count points that defines the shape of this object.
copyPointsIndicates, if set to IlTrue, that the array is copied. If this parameter is set to IlFalse, then the point array points is internally stored in the object.
paletteThe palette instance.

§ IlvGraphicPath() [2/2]

IlvGraphicPath::IlvGraphicPath ( IlvDisplay display,
IlUInt  count,
IlvPointArray paths,
IlBoolean  copyPoints = IlTrue,
IlvPalette palette = 0 
)

Constructor.

This constructor initializes an IlvGraphicPath containing several polypoints.

Parameters
displayThe display instance.
countThe number of paths that define this graphic path.
pathsThe array of at least count point arrays that define the shape of this object. This array is destroyed in this object's destructor.
copyPointsIf set to IlTrue, both paths and the point that they contain are copied. Otherwise, paths is stored by this object, and deleted in its constructor.
paletteThe palette instance.

§ ~IlvGraphicPath()

virtual IlvGraphicPath::~IlvGraphicPath ( )
virtual

Destructor.

The destructor unlocks the background palette and deletes the array of IlvPointArray. If setPathDrawingData has been called, the corresponding IlvPathDrawingData is deleted as well.

Member Function Documentation

§ applyTransform()

virtual void IlvGraphicPath::applyTransform ( const IlvTransformer t)
virtual

Applies a transformation function to the graphic object.

Applies the transformer t to the shape of the object. Unless the transformation is a scaling operation, the result of applying it to certain objects can be insignificant. For example, applying a non-scaling transformer to an IlvRectangle object is meaningless, since the rectangle remains a rectangle. On the other hand, meaningful transformations can be applied to objects that are instances of types such as IlvLine or IlvPolyPoints.

Note
applyTransform() is one of the most important method to be rewritten for classes derived from IlvGraphic, since it is called by the resize(), move(), moveResize(), scale(), etc., methods.
Parameters
tThe transformer value. If 0, no transformation is performed.

Implements IlvGraphic.

§ bbox()

const IlvRect& IlvGraphicPath::bbox ( ) const

Retrieves the bounding box.

Returns
The smallest box containing all the points of the object.

§ boundingBox()

virtual void IlvGraphicPath::boundingBox ( IlvRect rect,
const IlvTransformer t = 0 
) const
virtual

Retrieves the bounding box.

This member function has the same specification as for IlvGraphic::boundingBox, only the box is extended in the four directions by the value returned by getBBoxExtent.

Parameters
rectThe rectangle that will be set to the bounding box of this object, when transformed with t.
tThe transformer that must be used when computing the bounding box.

Implements IlvGraphic.

§ contains()

virtual IlBoolean IlvGraphicPath::contains ( const IlvPoint p,
const IlvPoint tp,
const IlvTransformer t = 0 
) const
virtual

Checks if a point is contained.

This member function has the same specifications as for IlvGraphic::contains. The returned value depends on the DrawRule. The drawing data is not taken into account by this member function.

Parameters
pThe point to be tested, in the object coordinate system.
tpThe point to be tested, in the transformed coordinate system.
tThe transformer that transforms p to tp.
Returns
A Boolean value that indicates whether or not the provided points are located inside this graphic path.

Reimplemented from IlvGraphic.

§ draw()

virtual void IlvGraphicPath::draw ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const
virtual

Draws the path and its drawing data.

This member function has specifications as for IlvGraphic::draw, but after drawing the graphic path according to the DrawRule, it sets the drawing data by calling IlvPathDrawingData::initDraw and calls the IlvPathSteppingData::stepping member function which starts the iteration along the collection of polypoints.
If the transformer t is not 0, a new array of IlvPointArray containing transformed points is passed to the drawing data, instead of the original array of IlvPointArray.

Parameters
dstThe destination drawing port.
tThe transformer used in this drawing.
clipThe clipping region that must be used.

Implements IlvGraphic.

§ getBackgroundPalette()

IlvPalette* IlvGraphicPath::getBackgroundPalette ( ) const

Retrieves the background palette.

Returns
The background palette of the object. This palette is used to fill the polygons defined by the collection of IlvPointArray (not applicable if the draw rule is set to IlvStrokeOnly).

§ getBBoxExtent()

IlUInt IlvGraphicPath::getBBoxExtent ( ) const

Gets the bounding box extent.

Returns
The value of the bounding box extent.
See also
setBBoxExtent.

§ getDrawRule()

IlvDrawRule IlvGraphicPath::getDrawRule ( ) const

Retrieves the draw rule.

Returns
The draw rule of the object.

§ getLength() [1/2]

IlDouble IlvGraphicPath::getLength ( ) const

Computes the length of this graphic path.

This method uses the virtual method getLocation.

Returns
The length of the graphic path.

§ getLength() [2/2]

IlDouble IlvGraphicPath::getLength ( const IlvPointArray path) const

Computes the length of a path.

This method uses the virtual method getLocation.

Parameters
pathThe array of points whose length is queried.
Returns
The length of path.

§ getLocation() [1/2]

virtual IlDouble IlvGraphicPath::getLocation ( IlUInt  count,
const IlvPointArray paths,
IlDouble  distance = 0.,
IlvPoint pos = 0,
IlDouble angle = 0,
IlUInt path = 0,
IlUInt segment = 0 
) const
virtual

Computes a location along a path.

This member function does not use the internal array of polypoints of the object but the one specified by the parameters count and paths.

Parameters
countThe number of paths stored in the array paths.
pathsThe array of at least count paths that are travelled along.
distanceIf set to 0 (the default value) or to a positive value greater than the path's total length, the remaining parameters pos, angle, path and segment are ignored; the method just computes the length of each polypoint in the array and returns the sum of these lengths.
If set to a negative value, the result is undetermined.
If set to a positive value smaller than the total length of the path, it is interpreted as the distance to travel along the path. The remaining parameters can provide information about the point situated at this distance from the beginning of the path.
posIgnored if distance is set to 0. Otherwise, if it is not 0, this parameter must point to a variable that is set to the coordinates of the point on the path at the distance distance from its start.
angleIgnored if distance is set to 0. Otherwise, if it is not 0, this parameter must point to a variable that is set to the angle, in degrees of the tangent to the path at the distance distance from its start.
pathIgnored if distance is set to 0. Otherwise, if it is not 0, this parameter must point to a variable that is set to the index of the point array stored in paths that is reached along the path at the distance distance from its start.
segmentIgnored if distance is set to 0. Otherwise, if it is not 0, this parameter must point to a variable that is set to the index of the point in the array designated by path that is reached along the path at the distance distance from its start, so that pos is located somewhere on the segment [paths[ipath]->points[ipoint], paths[ipath]->points[ipoint+1]].
Returns
The total length of the path if distance is 0 or a value greater than the total length of the path. A negative value is returned in other cases.

§ getLocation() [2/2]

IlDouble IlvGraphicPath::getLocation ( IlDouble  distance,
IlvPoint pos = 0,
IlDouble angle = 0,
IlUInt path = 0,
IlUInt segment = 0,
IlvTransformer t = 0 
) const

Computes a location along this path.

This member function is similar to the virtual method getLocation, but it operates on the array of polypoints stored by this object and allows the application of a transformation. This member function actually calls getLocation.

See the previous getLocation() for a complete description of all the parameters of this member function.

Parameters
distanceThe distance, along the path, where the point location is computed.
posThe point location.
angleThe tangent to the path at the indicated location, in degrees.
pathThe index of the polypoints that is traversed at the indicated distance.
segmentThe index of the last point, in the polypoint indicated by path, that is traversed at the indicated distance.
tThe transformer that is applied to the internal path before the point location is computed.

§ getNumPaths()

IlUInt IlvGraphicPath::getNumPaths ( ) const

Retrieves the number of paths.

Returns
The number of IlvPointArray paths managed by the object.

§ getPathDrawingData()

IlvPathDrawingData* IlvGraphicPath::getPathDrawingData ( ) const

Gets the drawing data.

Returns
The drawing data structure that has been set by setPathDrawingData.

§ getPaths()

const IlvPointArray* IlvGraphicPath::getPaths ( ) const

Retrieves the paths.

Returns
The array of IlvPointArray managed by the object.

§ setAlpha()

virtual void IlvGraphicPath::setAlpha ( IlvIntensity  alpha)
virtual

Sets the alpha value of the object.

Parameters
alphaThe new alpha value.

Reimplemented from IlvSimpleGraphic.

§ setAntialiasingMode()

virtual void IlvGraphicPath::setAntialiasingMode ( IlvAntialiasingMode  mode)
virtual

Sets the anti-aliasing mode of the object.

Parameters
modeThe new anti-aliasing mode.

Reimplemented from IlvSimpleGraphic.

§ setBackground()

virtual void IlvGraphicPath::setBackground ( IlvColor bg)
virtual

Sets the background color.

This member function sets the background color of the normal palette to bg. It also sets the foreground color of the background palette to bg and, if the drawing data is not 0, sets its background color to bg as well.

Parameters
bgThe new background color of this graphic path, and its drawing data if there is one. The color is locked.

Reimplemented from IlvSimpleGraphic.

§ setBBoxExtent()

void IlvGraphicPath::setBBoxExtent ( IlUInt  extent)

Sets the bounding box extent.

This member function allows you to notify the object that its bounding box should always be augmented by the value extent in all directions. This is specially useful when attaching a drawing data structure to the object: if this data structure is set to draw an additional object along the path, this object should be taken into account when computing the bounding box of the IlvGraphicPath.

Parameters
extentThe new bounding box extent.

§ setDrawRule()

void IlvGraphicPath::setDrawRule ( IlvDrawRule  val)

Sets the draw rule.

Parameters
valThe new draw rule of this object. This attribute controls the way polypoints are displayed.

§ setForeground()

virtual void IlvGraphicPath::setForeground ( IlvColor fg)
virtual

Sets the foreground color.

This member function sets the foreground color of the normal palette to fg. It also sets the background color of the background palette to fg and, if the drawing data is not 0, sets its foreground color to fg as well.

Parameters
fgThe new foreground color of this graphic path, and its drawing data if there is one. The color is locked.

Reimplemented from IlvSimpleGraphic.

§ setMode()

virtual void IlvGraphicPath::setMode ( IlvDrawMode  mode)
virtual

Sets the drawing mode.

Sets the draw mode to mode for the palette of the object, its background palette, and the palette of the drawing data (if not 0).

Parameters
modeThe new drawing mode of this object.

Reimplemented from IlvSimpleGraphic.

§ setPalette()

virtual void IlvGraphicPath::setPalette ( IlvPalette pal)
virtual

Sets the palette.

This member function sets the normal palette to pal. It also sets the background palette to a copy of that palette, except that its foreground and background color are swapped. If the drawing data is not 0, this method sets its palette to pal as well.

Parameters
palThe new palette of this graphic path, and the one of its drawing data if there is one. The palette is locked.

Reimplemented from IlvSimpleGraphic.

§ setPathDrawingData()

void IlvGraphicPath::setPathDrawingData ( IlvPathDrawingData data)

Sets the drawing data.

Attaches a drawing data structure to the object. If another data structure was set, it is the user's responsibility to delete it. The IlvGraphicPath destructor deletes this structure. IlvGraphicPath only uses this structure in the * draw method.

Parameters
datathe new drawing data of this graphic path.

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