GoDiagram Web Reference
CalculateArrowhead Method

The arrowhead anchor position, giving the spot the arrow is coming from
The arrowhead end point
true if for the "To" end, false if for the "From" end
An array of PointF of at least length four to hold the results
Modify an array of points to hold the four points of a polygon outlining an arrowhead
Syntax
'Declaration
 
Public Overridable Sub CalculateArrowhead( _
   ByVal anchor As PointF, _
   ByVal endPoint As PointF, _
   ByVal atEnd As Boolean, _
   ByVal poly() As PointF _
) 
public virtual void CalculateArrowhead( 
   PointF anchor,
   PointF endPoint,
   bool atEnd,
   PointF[] poly
)

Parameters

anchor
The arrowhead anchor position, giving the spot the arrow is coming from
endPoint
The arrowhead end point
atEnd
true if for the "To" end, false if for the "From" end
poly
An array of PointF of at least length four to hold the results
Remarks

By default the four points are as follows:

If necessary, the length of the arrowhead is actually scaled down to fit in the distance between the anchor and the endPoint.

This method is normally called by Paint to produce a point array to be passed to DrawArrowhead in the following fashion:

              if (this.ToArrow && this.PointsCount >= 2) {
                PointF[] toPoly = new PointF[GetArrowheadPointsCount(true)];
                PointF anchor = this.ToArrowAnchorPoint;
                PointF end = this.ToArrowEndPoint;
                CalculateArrowhead(anchor, end, true, toPoly);
                ... now use the toPoly array ...
              }
            

Requirements

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

See Also

Reference

GoStroke Class
GoStroke Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback