CubicBezierSegment constructor
- required ArcGISPoint startPoint,
- required ArcGISPoint controlPoint1,
- required ArcGISPoint controlPoint2,
- required ArcGISPoint endPoint,
- SpatialReference? spatialReference,
Creates a bezier segment based on a start and end point and two control points at tangents to the start and end points.
The spatial reference parameter is used if the points have a null spatial reference. If more than one spatial reference is supplied (as a parameter or as a property of an ArcGISPoint parameter), they must all be equal.
The z-value and m-value of the start and end points (if present) are used in the CubicBezierSegment. The z-value and m-value of the control points (if present) are ignored.
Parameters:
startPoint
— The start point of the segment.controlPoint1
— A point tangent to the start of the segment.controlPoint2
— A point tangent to the end of the segment.endPoint
— The end point of the segment.spatialReference
— A spatial reference to use for the segment if the points do not have spatial references set.
Implementation
factory CubicBezierSegment({
required ArcGISPoint startPoint,
required ArcGISPoint controlPoint1,
required ArcGISPoint controlPoint2,
required ArcGISPoint endPoint,
SpatialReference? spatialReference,
}) {
_initializeArcGISEnvironmentIfNeeded();
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_CubicBezierSegment_create(
startPoint._handle,
controlPoint1._handle,
controlPoint2._handle,
endPoint._handle,
spatialReference?._handle ?? ffi.nullptr,
errorHandler,
);
});
final CubicBezierSegment object = CubicBezierSegment._withHandle(handle);
object._spatialReference.cache(spatialReference);
return object;
}