Class CubicBezierSegment


  • public class CubicBezierSegment
    extends Segment
    A cubic Bezier curve for use in a multipart geometry.
    Since:
    100.12.0
    • Constructor Detail

      • CubicBezierSegment

        public CubicBezierSegment​(Point startPoint,
                                  Point controlPoint1,
                                  Point controlPoint2,
                                  Point 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 a Point parameter), they must all be equal.

        The z and m values of the start and end points (if present) are used in the CubicBezierSegment. The z and m values 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, may be null
        Throws:
        java.lang.IllegalArgumentException - if startPoint is null
        java.lang.IllegalArgumentException - if controlPoint1 is null
        java.lang.IllegalArgumentException - if controlPoint2 is null
        java.lang.IllegalArgumentException - if endPoint is null
        Since:
        100.12.0
    • Method Detail

      • getControlPoint1

        public Point getControlPoint1()
        Gets a point tangent to the start of the segment.
        Returns:
        a point tangent to the start of the segment
        Since:
        100.12.0
      • getControlPoint2

        public Point getControlPoint2()
        Gets a point tangent to the end of the segment.
        Returns:
        a point tangent to the end of the segment
        Since:
        100.12.0
      • toString

        public java.lang.String toString()
        Returns a string representation of this CubicBezierSegment instance. The format and content of this string is subject to change without notice.

        This value may be useful for debugging purposes, but cannot be relied upon for persistence purposes.

        Overrides:
        toString in class java.lang.Object
        Returns:
        a String representation of this segment with useful information for debugging.
        Since:
        100.12.0