LineSegment.lineAtAngleFromStartPoint constructor

LineSegment.lineAtAngleFromStartPoint(
  1. {required ArcGISPoint startPoint,
  2. required double angleRadians,
  3. required double length}
)

Creates a line segment of the specified length and angle from a given start point.

Use this method to create a line segment. The represents a straight line between two points. the spatial reference of the point is used to determine the segment's spatial reference. The angle is specified in radians relative to the X axis The length is in the units of the spatial reference.

Parameters:

  • startPoint — The start point of the line segment.
  • angleRadians — The angle of the line relative to the X axis. Units are radians.
  • length — The length of the line.

Implementation

factory LineSegment.lineAtAngleFromStartPoint(
    {required ArcGISPoint startPoint,
    required double angleRadians,
    required double length}) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_LineSegment_createLineAtAngleFromStartPoint(
        startPoint._handle, angleRadians, length, errorHandler);
  });
  return LineSegment._withHandle(handle);
}