EllipticArcSegment.withCenter constructor

EllipticArcSegment.withCenter(
  1. {required ArcGISPoint centerPoint,
  2. required double rotationAngle,
  3. required double semiMajorAxis,
  4. required double minorMajorRatio,
  5. required double startAngle,
  6. required double centralAngle,
  7. required SpatialReference? spatialReference}
)

Creates an elliptic arc based on parameters that define an ellipse and the portion of that ellipse that defines the arc.

The spatial reference parameter is used if the center point parameter has a null spatial reference. If both spatial references are supplied, they must be equal.

The z-value and m-value of the center point (if present) are ignored. Use EllipticArcSegment.withStartAndEndpoints to create an EllipticArcSegment with end points with z-value and/or m-value.

Parameters:

  • centerPoint — The center point of the embedded ellipse.
  • rotationAngle — The angle in radians by which the major axis of the embedded ellipse is rotated from the x-axis.
  • semiMajorAxis — The length of the semi-major axis of the embedded ellipse in the units of the spatial reference.
  • minorMajorRatio — The ratio of the length of the semi-minor axis to the length of the semi-major axis of the embedded ellipse.
  • startAngle — The parametric angle in radians of the start of the arc relative to the major axis of the embedded ellipse.
  • centralAngle — The parametric angle in radians measuring the span of the arc from EllipticArcSegment.startAngle to EllipticArcSegment.endAngle.
  • spatialReference — A spatial reference to use for the segment if the center point parameter does not have a spatial reference set.

Implementation

factory EllipticArcSegment.withCenter(
    {required ArcGISPoint centerPoint,
    required double rotationAngle,
    required double semiMajorAxis,
    required double minorMajorRatio,
    required double startAngle,
    required double centralAngle,
    required SpatialReference? spatialReference}) {
  _initializeArcGISEnvironmentIfNeeded();
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_EllipticArcSegment_createWithCenter(
        centerPoint._handle,
        rotationAngle,
        semiMajorAxis,
        minorMajorRatio,
        startAngle,
        centralAngle,
        spatialReference?._handle ?? ffi.nullptr,
        errorHandler);
  });
  final EllipticArcSegment object = EllipticArcSegment._withHandle(handle);
  object._spatialReference.cache(spatialReference);
  return object;
}