Northwoods.Go Assembly > Northwoods.Go Namespace > GoLink Class : CalculateStroke Method |
'Declaration Public Overridable Sub CalculateStroke()
public virtual void CalculateStroke()
The standard stroke path is determined by properties of this link and of the two ports it is connected to. If both ports are GoPorts, by default this method considers the FromPort's FromSpot and the ToPort's ToSpot. If both spots are GoObject.NoSpot
, this link's stroke will consist of two points determined by calling GetFromLinkPoint and GetToLinkPoint. (There are four points if the Style is GoStrokeStyle.Bezier--the points are plotted according to the value of Curviness.) If both spots have "spots" (i.e. not GoObject.NoSpot
), there will be four points in the stroke, resulting in three straight line segments, unless Orthogonal is true, in which case there are six points (five horizontal or vertical line segments).
However, if there are already more than the standard number of points in this link, the AdjustPoints method is called to give the link a chance to decide how it wants to modify its path. The behavior of AdjustPoints depends on the value of AdjustingStyle. If AdjustPoints returns false, this method plots the standard stroke as described above.
If either port is not a GoPort, this stroke is just a single straight line segment between the centers of the objects. If either port is not a GoObject, this method does nothing.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2