Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Implementation of links drawn with a spline defined by 2 orthogonal segments. More...
#include <ilviews/grapher/links.h>
Public Member Functions | |
IlvOneSplineLinkImage (IlvDisplay *display, IlvLinkOrientation orientation, IlBoolean oriented, IlvGraphic *from, IlvGraphic *to, IlvPalette *palette=0) | |
Constructor. More... | |
virtual IlvPoint * | getLinkPoints (IlUInt &nPoints, const IlvTransformer *t=0) const |
Returns the points defining the shape of the link. More... | |
void | setControlPoint (const IlvPoint &p, const IlvTransformer *t=0) |
Sets the coordinates of the double control point. More... | |
Public Member Functions inherited from IlvOneLinkImage | |
IlvOneLinkImage (IlvDisplay *display, IlvLinkOrientation orientation, IlBoolean oriented, IlvGraphic *from, IlvGraphic *to, IlvPalette *palette=0) | |
Constructor. More... | |
IlvLinkOrientation | getOrientation () const |
Returns the orientation of the link. More... | |
void | setOrientation (IlvLinkOrientation orient) |
Changes the orientation of the link. More... | |
Public Member Functions inherited from IlvLinkImage | |
IlvLinkImage (IlvDisplay *display, IlBoolean oriented, IlvGraphic *from, IlvGraphic *to, IlvPalette *palette=0) | |
Constructor. More... | |
virtual void | computePoints (IlvPoint &src, IlvPoint &dst, const IlvTransformer *t=0) const |
Computes the endpoints of the link when it is drawn as a straight line. More... | |
IlvGraphic * | getFrom () const |
Returns the start node. More... | |
IlvGraphic * | getTo () const |
Returns the end node. More... | |
IlBoolean | isOriented () const |
Indicates whether the link is oriented. More... | |
void | setFrom (IlvGraphic *f) |
Sets the start node. More... | |
void | setOriented (IlBoolean oriented) |
Changes the oriented mode. More... | |
void | setTo (IlvGraphic *t) |
Sets the end node. More... | |
virtual IlBoolean | zoomable () const |
Returns the zoomable property of the link. More... | |
Implementation of links drawn with a spline defined by 2 orthogonal segments.
Library: ilvgrapher
A link of the IlvOneSplineLinkImage
class is drawn as a spline, as shown in the figure below. It inherits its orientation from the IlvOneLinkImage
class.
The start and end points both depend on the relative positions of the start and end nodes. The two control points of the drawn spline are both at the crossing coordinate of the start and end tangents of the link. You are given the opportunity to modify the position of the double control point with the setControlPoint
member function.
IlvMakeOneSplineLinkImageInteractor
. IlvOneSplineLinkImage::IlvOneSplineLinkImage | ( | IlvDisplay * | display, |
IlvLinkOrientation | orientation, | ||
IlBoolean | oriented, | ||
IlvGraphic * | from, | ||
IlvGraphic * | to, | ||
IlvPalette * | palette = 0 |
||
) |
Constructor.
Initializes a new instance of the IlvOneSplineLinkImage
class. The orientation parameter specifies the direction (horizontal or vertical) the link takes upon leaving the from node.
display | The display connection that handles the drawing of this object. |
orientation | The orientation for the link. |
oriented | A Boolean indicating whether an arrowhead is to be drawn at the end of the link. |
from | The IlvGraphic object representing the start node of the link. |
to | The IlvGraphic object representing the end node of the link. |
palette | The palette used to draw the link. |
|
virtual |
Returns the points defining the shape of the link.
Returns an array of points defining the shape of the link when it is drawn with the transformer t. The size of the resulting array of points is returned in the nPoints parameter. The array is stored in an IlPoolOf(IlvPoint)
and should not be deleted or modified.
This method is internally used by the methods draw
, contains
, and boundingBox
. It is meant to replace various methods defined in subclasses in previous releases of Rogue Wave Views; like the obsolete IlvOneLinkImage::getPoints
.
This function is overloaded by subclasses defining a specific shape for links. The default implementation returns an array of two points computed with the IlvLinkImage::computePoints
method.
nPoints | The number of points in the returned array. |
t | The transformer applied to the link. |
Reimplemented from IlvOneLinkImage.
void IlvOneSplineLinkImage::setControlPoint | ( | const IlvPoint & | p, |
const IlvTransformer * | t = 0 |
||
) |
Sets the coordinates of the double control point.
p | The new position for the double control point. |
t | The transformer applied to the link. |
© Copyright 2012, 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.