This document is archived and information here might be outdated.  Recommended version.


IBezierCurve.QueryChordLengthTangentAtTo Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IBezierCurve.QueryChordLengthTangentAtTo Method

Returns tangent vector at 'to' point, based on chord length parametrization; and whether it has been set by user or by smoothing process.

[Visual Basic .NET]
Public Sub QueryChordLengthTangentAtTo ( _
    ByVal tangent As IPoint, _
    ByRef setByUser As Boolean _
)
[C#]
public void QueryChordLengthTangentAtTo (
    IPoint tangent,
    ref bool setByUser
);
[C++]
HRESULT QueryChordLengthTangentAtTo(
  IPoint* tangent,
  VARIANT_BOOL* setByUser
);
[C++]

Parameters tangent
tangent is a parameter of type IPoint setByUser [in, out] setByUser is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Returns the ChordLength Tangent at the To Point of the BezierCurve along with a flag indicating whether this ChordLength Tangent was set by the user or defined from Control Points.  The ChordLength Tangent is not the same as the internal Control Points or the Tangent at the To Point although both lie on the same line. The coordinates of the returned point are in reality a Dx and Dy which can be added to the To point in order to get the tangent.

[C#]     private void QueryChordLengthTangentAtTo()
    {
        //Control points
        IPoint[] controlPoints=new IPoint[4];
        //Bezier FromPoint / From Tangent FromPoint
        controlPoints[0]=new ESRI.ArcGIS.Geometry.Point();
        //From Tangent ToPoint
        controlPoints[1]=new ESRI.ArcGIS.Geometry.Point();
        //To Tangent FromPoint
        controlPoints[2]=new ESRI.ArcGIS.Geometry.Point();
        //Bezier To Point / To Tangent ToPoint
        controlPoints[3]=new ESRI.ArcGIS.Geometry.Point();
        //Define the Bezier Control Points.  This is a simple S-Curve.
        controlPoints[0].PutCoords(100, 100);
        controlPoints[1].PutCoords(150, 200);
        controlPoints[2].PutCoords(250, 0);
        controlPoints[3].PutCoords(400, 100);
        IBezierCurveGEN bezierCurve=new BezierCurve();
        bezierCurve.PutCoords(ref controlPoints);
        //QueryChordLengthTangentAtTo
        IPoint tangentPoint=new ESRI.ArcGIS.Geometry.Point();
        bool isUserSet=false;
        bezierCurve.QueryChordLengthTangentAtTo(tangentPoint, ref isUserSet);
        //Report
        String report="QueryChordLengthTangentAtTo \n" +
                        "Point At From : " + tangentPoint.X + " , " + tangentPoint.Y + "\n" +
                        "Set by the user : " + isUserSet;
        System.Windows.Forms.MessageBox.Show(report);
    }

See Also

IBezierCurve Interface