Interface Path2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>

  • Type Parameters:
    ST - is the type of the general implementation.
    IT - is the type of the implementation of this shape.
    IE - is the type of the path elements.
    P - is the type of the points.
    V - is the type of the vectors.
    B - is the type of the bounding boxes.
    All Superinterfaces:
    Cloneable, JsonableObject, Path2D<ST,​IT,​PathIterator2afp<IE>,​P,​V,​B>, Serializable, Shape2afp<ST,​IT,​IE,​P,​V,​B>, Shape2D<ST,​IT,​PathIterator2afp<IE>,​P,​V,​B>
    All Known Implementing Classes:
    Path2d, Path2dfx

    public interface Path2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
    extends Shape2afp<ST,​IT,​IE,​P,​V,​B>, Path2D<ST,​IT,​PathIterator2afp<IE>,​P,​V,​B>
    Fonctional interface that represented a 2D path on a plane.
    Since:
    13.0
    Version:
    17.0 2020-01-04 14:41:43
    Author:
    Stéphane GALLAND, Hamza JAFFALI
    Maven Group Id:
    org.arakhne.afc.core
    Maven Artifact Id:
    mathgeom
    • Method Detail

      • calculatesCrossingsPathIteratorPathShadow

        static int calculatesCrossingsPathIteratorPathShadow​(int crossings,
                                                             PathIterator2afp<?> iterator,
                                                             BasicPathShadow2afp shadow,
                                                             CrossingComputationType type)
        Accumulate the number of times the path crosses the shadow extending to the right of the second path. See the comment for the SHAPE_INTERSECTS constant for more complete details. The return value is the sum of all crossings for both the top and bottom of the shadow for every segment in the path, or the special value SHAPE_INTERSECTS if the path ever enters the interior of the rectangle. The path must start with a SEG_MOVETO, otherwise an exception is thrown. The caller must check r[xy]{min, max} for NaN values.
        Parameters:
        crossings - is the initial value for crossing.
        iterator - is the iterator on the path elements.
        shadow - is the description of the shape to project to the right.
        type - is the type of special computation to apply. If null, it is equivalent to CrossingComputationType.STANDARD.
        Returns:
        the crossings.
        See Also:
        "Weiler–Atherton clipping algorithm"
      • findsClosestPointPathIteratorPoint

        static void findsClosestPointPathIteratorPoint​(PathIterator2afp<? extends PathElement2afp> pi,
                                                       double x,
                                                       double y,
                                                       Point2D<?,​?> result)
        Replies the point on the path that is closest to the given point.

        CAUTION: This function works only on path iterators that are replying not-curved primitives, ie. if the PathIterator2D.isCurved() of pi is replying false. getClosestPointTo(Point2D) avoids this restriction.

        Parameters:
        pi - is the iterator on the elements of the path.
        x - x coordinate of the point.
        y - y coordinate of the point.
        result - the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(Point2D<?,​?> pt)
        Description copied from interface: Shape2D
        Replies the point on the shape that is closest to the given point.
        Specified by:
        getClosestPointTo in interface Shape2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        pt - the point.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(Circle2afp<?,​?,​?,​?,​?,​?> circle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given circle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        circle - the circle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(Ellipse2afp<?,​?,​?,​?,​?,​?> ellipse)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given ellipse.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        ellipse - the ellipse.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(Rectangle2afp<?,​?,​?,​?,​?,​?> rectangle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given rectangle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        rectangle - the rectangle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(Segment2afp<?,​?,​?,​?,​?,​?> segment)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given segment.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        segment - the segment.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(Triangle2afp<?,​?,​?,​?,​?,​?> triangle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given triangle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        triangle - the triangle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(Path2afp<?,​?,​?,​?,​?,​?> path)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given path.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        path - the path.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(OrientedRectangle2afp<?,​?,​?,​?,​?,​?> orientedRectangle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given oriented rectangle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        orientedRectangle - the oriented rectangle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(Parallelogram2afp<?,​?,​?,​?,​?,​?> parallelogram)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given parallelogram.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        parallelogram - the parallelogram.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • getClosestPointTo

        @Pure
        default P getClosestPointTo​(RoundRectangle2afp<?,​?,​?,​?,​?,​?> roundRectangle)
        Description copied from interface: Shape2afp
        Replies the closest point on this shape to the given round rectangle.

        If the two shapes are intersecting, the replied point is always at the intersection of the two shapes. This function does not enforce the meaning of the replied point in the case of shape intersection. In other words, this function is warranting that the reply point is the either the penetration point, nor a perimeter point, nor any point with a specific meaning.

        Specified by:
        getClosestPointTo in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        roundRectangle - the round rectangle.
        Returns:
        the closest point on the shape; or the point itself if it is inside the shape.
      • findsFarthestPointPathIteratorPoint

        static void findsFarthestPointPathIteratorPoint​(PathIterator2afp<? extends PathElement2afp> pi,
                                                        double x,
                                                        double y,
                                                        Point2D<?,​?> result)
        Replies the point on the path that is farthest to the given point.

        CAUTION: This function works only on path iterators that are replying not-curved primitives, ie. if the PathIterator2D.isCurved() of pi is replying false. getFarthestPointTo(Point2D) avoids this restriction.

        Parameters:
        pi - is the iterator on the elements of the path.
        x - x coordinate of the point.
        y - y coordinate of the point.
        result - the farthest point on the shape.
      • containsPoint

        static boolean containsPoint​(PathIterator2afp<? extends PathElement2afp> pi,
                                     double x,
                                     double y)
        Tests if the specified coordinates are inside the closed boundary of the specified PathIterator2afp.

        This method provides a basic facility for implementors of the Shape2afp interface to implement support for the Shape2afp.contains(double, double) method.

        Parameters:
        pi - the specified PathIterator2f
        x - the specified X coordinate
        y - the specified Y coordinate
        Returns:
        true if the specified coordinates are inside the specified PathIterator2f; false otherwise
      • containsRectangle

        static boolean containsRectangle​(PathIterator2afp<? extends PathElement2afp> pi,
                                         double rx,
                                         double ry,
                                         double rwidth,
                                         double rheight)
        Tests if the specified rectangle is inside the closed boundary of the specified PathIterator2afp.

        This method provides a basic facility for implementors of the Shape2afp interface to implement support for the Shape2afp.contains(Rectangle2afp) method.

        Parameters:
        pi - the specified PathIterator2f
        rx - the lowest corner of the rectangle.
        ry - the lowest corner of the rectangle.
        rwidth - is the width of the rectangle.
        rheight - is the width of the rectangle.
        Returns:
        true if the specified rectangle is inside the specified PathIterator2f; false otherwise.
      • intersectsPathIteratorRectangle

        static boolean intersectsPathIteratorRectangle​(PathIterator2afp<? extends PathElement2afp> pi,
                                                       double x,
                                                       double y,
                                                       double width,
                                                       double height)
        Tests if the interior of the specified PathIterator2afp intersects the interior of a specified set of rectangular coordinates.
        Parameters:
        pi - the specified PathIterator2afp.
        x - the specified X coordinate of the rectangle.
        y - the specified Y coordinate of the rectangle.
        width - the width of the specified rectangular coordinates.
        height - the height of the specified rectangular coordinates.
        Returns:
        true if the specified PathIterator2afp and the interior of the specified set of rectangular coordinates intersect each other; false otherwise.
      • calculatesCrossingsPathIteratorPointShadow

        static int calculatesCrossingsPathIteratorPointShadow​(int crossings,
                                                              PathIterator2afp<? extends PathElement2afp> iterator,
                                                              double px,
                                                              double py,
                                                              CrossingComputationType type)
        Calculates the number of times the given path crosses the ray extending to the right from (px, py). If the point lies on a part of the path, then no crossings are counted for that intersection. +1 is added for each crossing where the Y coordinate is increasing -1 is added for each crossing where the Y coordinate is decreasing. The return value is the sum of all crossings for every segment in the path. The path must start with a MOVE_TO, otherwise an exception is thrown.
        Parameters:
        crossings - is the initial value for crossing.
        iterator - is the description of the path.
        px - is the reference point to test.
        py - is the reference point to test.
        type - is the type of special computation to apply. If null, it is equivalent to CrossingComputationType.STANDARD.
        Returns:
        the crossing
      • calculatesCrossingsPathIteratorEllipseShadow

        static int calculatesCrossingsPathIteratorEllipseShadow​(int crossings,
                                                                PathIterator2afp<? extends PathElement2afp> iterator,
                                                                double ex,
                                                                double ey,
                                                                double ew,
                                                                double eh,
                                                                CrossingComputationType type)
        Calculates the number of times the given path crosses the given ellipse extending to the right.
        Parameters:
        crossings - is the initial value for crossing.
        iterator - is the description of the path.
        ex - is the first point of the ellipse.
        ey - is the first point of the ellipse.
        ew - is the width of the ellipse.
        eh - is the height of the ellipse.
        type - is the type of special computation to apply. If null, it is equivalent to CrossingComputationType.STANDARD.
        Returns:
        the crossing or GeomConstants.SHAPE_INTERSECTS
      • calculatesCrossingsPathIteratorRoundRectangleShadow

        static int calculatesCrossingsPathIteratorRoundRectangleShadow​(int crossings,
                                                                       PathIterator2afp<? extends PathElement2afp> iterator,
                                                                       double x1,
                                                                       double y1,
                                                                       double x2,
                                                                       double y2,
                                                                       double arcWidth,
                                                                       double arcHeight,
                                                                       CrossingComputationType type)
        Calculates the number of times the given path crosses the given round rectangle extending to the right.
        Parameters:
        crossings - is the initial value for crossing.
        iterator - is the description of the path.
        x1 - is the first corner of the rectangle.
        y1 - is the first corner of the rectangle.
        x2 - is the second corner of the rectangle.
        y2 - is the second corner of the rectangle.
        arcWidth - is the width of the arc.
        arcHeight - is the width of the arc.
        type - is the type of special computation to apply. If null, it is equivalent to CrossingComputationType.STANDARD.
        Returns:
        the crossing or GeomConstants.SHAPE_INTERSECTS
      • calculatesCrossingsPathIteratorCircleShadow

        static int calculatesCrossingsPathIteratorCircleShadow​(int crossings,
                                                               PathIterator2afp<? extends PathElement2afp> iterator,
                                                               double cx,
                                                               double cy,
                                                               double radius,
                                                               CrossingComputationType type)
        Calculates the number of times the given path crosses the given circle extending to the right.
        Parameters:
        crossings - is the initial value for crossing.
        iterator - is the description of the path.
        cx - is the center of the circle.
        cy - is the center of the circle.
        radius - is the radius of the circle.
        type - is the type of special computation to apply. If null, it is equivalent to CrossingComputationType.STANDARD.
        Returns:
        the crossing
      • calculatesCrossingsPathIteratorSegmentShadow

        static int calculatesCrossingsPathIteratorSegmentShadow​(int crossings,
                                                                PathIterator2afp<? extends PathElement2afp> iterator,
                                                                double x1,
                                                                double y1,
                                                                double x2,
                                                                double y2,
                                                                CrossingComputationType type)
        Calculates the number of times the given path crosses the given segment extending to the right.
        Parameters:
        crossings - is the initial value for crossing.
        iterator - is the description of the path.
        x1 - is the first point of the segment.
        y1 - is the first point of the segment.
        x2 - is the first point of the segment.
        y2 - is the first point of the segment.
        type - is the type of special computation to apply. If null, it is equivalent to CrossingComputationType.STANDARD.
        Returns:
        the crossing
      • calculatesCrossingsPathIteratorRectangleShadow

        static int calculatesCrossingsPathIteratorRectangleShadow​(int crossings,
                                                                  PathIterator2afp<? extends PathElement2afp> iterator,
                                                                  double rxmin,
                                                                  double rymin,
                                                                  double rxmax,
                                                                  double rymax,
                                                                  CrossingComputationType type)
        Accumulate the number of times the path crosses the shadow extending to the right of the rectangle. See the comment for the SHAPE_INTERSECTS constant for more complete details. The return value is the sum of all crossings for both the top and bottom of the shadow for every segment in the path, or the special value SHAPE_INTERSECTS if the path ever enters the interior of the rectangle. The path must start with a SEG_MOVETO, otherwise an exception is thrown. The caller must check r[xy]{min, max} for NaN values.
        Parameters:
        crossings - is the initial value for crossing.
        iterator - is the iterator on the path elements.
        rxmin - is the first corner of the rectangle.
        rymin - is the first corner of the rectangle.
        rxmax - is the second corner of the rectangle.
        rymax - is the second corner of the rectangle.
        type - is the type of special computation to apply. If null, it is equivalent to CrossingComputationType.STANDARD.
        Returns:
        the crossings.
      • calculatesCrossingsPathIteratorTriangleShadow

        static int calculatesCrossingsPathIteratorTriangleShadow​(int crossings,
                                                                 PathIterator2afp<? extends PathElement2afp> iterator,
                                                                 double x1,
                                                                 double y1,
                                                                 double x2,
                                                                 double y2,
                                                                 double x3,
                                                                 double y3,
                                                                 CrossingComputationType type)
        Accumulate the number of times the path crosses the shadow extending to the right of the triangle. See the comment for the SHAPE_INTERSECTS constant for more complete details. The return value is the sum of all crossings for both the top and bottom of the shadow for every segment in the path, or the special value SHAPE_INTERSECTS if the path ever enters the interior of the triangle. The path must start with a SEG_MOVETO, otherwise an exception is thrown. The caller must check for NaN values.
        Parameters:
        crossings - is the initial value for crossing.
        iterator - is the iterator on the path elements.
        x1 - is the first point of the triangle.
        y1 - is the first point of the triangle.
        x2 - is the second point of the triangle.
        y2 - is the second point of the triangle.
        x3 - is the third point of the triangle.
        y3 - is the third point of the triangle.
        type - is the type of special computation to apply. If null, it is equivalent to CrossingComputationType.STANDARD.
        Returns:
        the crossings.
      • calculatesPathLength

        static double calculatesPathLength​(PathIterator2afp<?> iterator)
        Compute the total squared length of the path.
        Parameters:
        iterator - the iterator on the path elements.
        Returns:
        the squared length of the path.
      • equalsToShape

        @Pure
        default boolean equalsToShape​(IT shape)
        Description copied from interface: Shape2D
        Replies this shape is equal to the given shape.
        Specified by:
        equalsToShape in interface Shape2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        shape - the shape to compare to.
        Returns:
        true if this shape is equal is equal to the given path.
      • add

        default void add​(Iterator<? extends PathElement2afp> iterator)
        Add the elements replied by the iterator into this path.
        Parameters:
        iterator - the iterator that provides the elements to add in the path.
      • set

        default void set​(Path2afp<?,​?,​?,​?,​?,​?> path)
        Set the path.
        Parameters:
        path - the path to copy.
      • moveTo

        void moveTo​(double x,
                    double y)
        Adds a point to the path by moving to the specified coordinates specified in double precision.
        Parameters:
        x - the specified X coordinate
        y - the specified Y coordinate
      • moveToIfFar

        default void moveToIfFar​(double x,
                                 double y)
        Adds a point to the path by moving to the specified coordinates specified in double precision if and only if the current position does not corresponds to the given position.
        Parameters:
        x - the specified X coordinate
        y - the specified Y coordinate
      • lineTo

        void lineTo​(double x,
                    double y)
        Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.
        Parameters:
        x - the specified X coordinate
        y - the specified Y coordinate
      • lineTo

        default void lineTo​(Point2D<?,​?> to)
        Description copied from interface: Path2D
        Adds a point to the path by drawing a straight line from the current coordinates to the new specified coordinates specified in double precision.
        Specified by:
        lineTo in interface Path2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        to - the end point
      • quadTo

        void quadTo​(double x1,
                    double y1,
                    double x2,
                    double y2)
        Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates (x2, y2), using the specified point (x1, y1) as a quadratic parametric control point. All coordinates are specified in double precision.
        Parameters:
        x1 - the X coordinate of the quadratic control point
        y1 - the Y coordinate of the quadratic control point
        x2 - the X coordinate of the final end point
        y2 - the Y coordinate of the final end point
      • quadTo

        default void quadTo​(Point2D<?,​?> ctrl,
                            Point2D<?,​?> to)
        Description copied from interface: Path2D
        Adds a curved segment, defined by two new points, to the path by drawing a Quadratic curve that intersects both the current coordinates and the specified coordinates (x2, y2), using the specified point (x1, y1) as a quadratic parametric control point. All coordinates are specified in double precision.
        Specified by:
        quadTo in interface Path2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        ctrl - the quadratic control point
        to - the final end point
      • curveTo

        void curveTo​(double x1,
                     double y1,
                     double x2,
                     double y2,
                     double x3,
                     double y3)
        Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates (x3, y3), using the specified points (x1, y1) and (x2, y2) as Bézier control points. All coordinates are specified in double precision.
        Parameters:
        x1 - the X coordinate of the first Bézier control point
        y1 - the Y coordinate of the first Bézier control point
        x2 - the X coordinate of the second Bézier control point
        y2 - the Y coordinate of the second Bézier control point
        x3 - the X coordinate of the final end point
        y3 - the Y coordinate of the final end point
      • curveTo

        default void curveTo​(Point2D<?,​?> ctrl1,
                             Point2D<?,​?> ctrl2,
                             Point2D<?,​?> to)
        Description copied from interface: Path2D
        Adds a curved segment, defined by three new points, to the path by drawing a Bézier curve that intersects both the current coordinates and the specified coordinates (x3, y3), using the specified points (x1, y1) and (x2, y2) as Bézier control points. All coordinates are specified in double precision.
        Specified by:
        curveTo in interface Path2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        ctrl1 - the first Bézier control point
        ctrl2 - the second Bézier control point
        to - the final end point
      • arcTo

        default void arcTo​(double ctrlx,
                           double ctrly,
                           double tox,
                           double toy,
                           double tfrom,
                           double tto,
                           Path2D.ArcType type)
        Adds a section of an shallow ellipse to the current path. The ellipse from which a quadrant is taken is the ellipse that would be inscribed in a parallelogram defined by 3 points. The current point which is considered to be the midpoint of the edge leading into the corner of the ellipse where the ellipse grazes it, (ctrlx, ctrly) which is considered to be the location of the corner of the parallelogram in which the ellipse is inscribed, and (tox, toy) which is considered to be the midpoint of the edge leading away from the corner of the oval where the oval grazes it.

        Only the portion of the ellipse from tfrom to tto will be included where 0f represents the point where the ellipse grazes the leading edge, 1f represents the point where the oval grazes the trailing edge, and 0.5f represents the point on the oval closest to the control point. The two values must satisfy the relation (0 <= tfrom <= tto <= 1).

        If tfrom is not 0f then the caller would most likely want to use one of the arc type values that inserts a segment leading to the initial point. An initial moveTo(double, double) or lineTo(double, double) can be added to direct the path to the starting point of the ellipse section if Path2D.ArcType.MOVE_THEN_ARC or Path2D.ArcType.LINE_THEN_ARC are specified by the type argument. The lineTo path segment will only be added if the current point is not already at the indicated location to avoid spurious empty line segments. The type can be specified as Path2D.ArcType.ARC_ONLY if the current point on the path is known to be at the starting point of the ellipse section.

        Parameters:
        ctrlx - the x coordinate of the control point, i.e. the corner of the parallelogram in which the ellipse is inscribed.
        ctrly - the y coordinate of the control point, i.e. the corner of the parallelogram in which the ellipse is inscribed.
        tox - the x coordinate of the target point.
        toy - the y coordinate of the target point.
        tfrom - the fraction of the ellipse section where the curve should start.
        tto - the fraction of the ellipse section where the curve should end
        type - the specification of what additional path segments should be appended to lead the current path to the starting point.
      • arcTo

        default void arcTo​(Point2D<?,​?> ctrl,
                           Point2D<?,​?> to,
                           double tfrom,
                           double tto,
                           Path2D.ArcType type)
        Description copied from interface: Path2D
        Adds a section of an shallow ellipse to the current path. The ellipse from which a quadrant is taken is the ellipse that would be inscribed in a parallelogram defined by 3 points, The current point which is considered to be the midpoint of the edge leading into the corner of the ellipse where the ellipse grazes it, (ctrlx, ctrly) which is considered to be the location of the corner of the parallelogram in which the ellipse is inscribed, and (tox, toy) which is considered to be the midpoint of the edge leading away from the corner of the oval where the oval grazes it.

        Only the portion of the ellipse from tfrom to tto will be included where 0f represents the point where the ellipse grazes the leading edge, 1f represents the point where the oval grazes the trailing edge, and 0.5f represents the point on the oval closest to the control point. The two values must satisfy the relation (0 <= tfrom <= tto <= 1).

        If tfrom is not 0f then the caller would most likely want to use one of the arc type values that inserts a segment leading to the initial point. An initial Path2D.moveTo(Point2D) or Path2D.lineTo(Point2D) can be added to direct the path to the starting point of the ellipse section if Path2D.ArcType.MOVE_THEN_ARC or Path2D.ArcType.LINE_THEN_ARC are specified by the type argument. The lineTo path segment will only be added if the current point is not already at the indicated location to avoid spurious empty line segments. The type can be specified as Path2D.ArcType.ARC_ONLY if the current point on the path is known to be at the starting point of the ellipse section.

        Specified by:
        arcTo in interface Path2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        ctrl - the control point, i.e. the corner of the parallelogram in which the ellipse is inscribed.
        to - the target point.
        tfrom - the fraction of the ellipse section where the curve should start.
        tto - the fraction of the ellipse section where the curve should end
        type - the specification of what additional path segments should be appended to lead the current path to the starting point.
      • arcTo

        default void arcTo​(double ctrlx,
                           double ctrly,
                           double tox,
                           double toy)
        Adds a section of an shallow ellipse to the current path.

        This function is equivalent to:

        
         this.arcTo(ctrl, to, 0.0, 1.0, ArcType.ARCONLY);
         
        Parameters:
        ctrlx - the x coordinate of the control point, i.e. the corner of the parallelogram in which the ellipse is inscribed.
        ctrly - the y coordinate of the control point, i.e. the corner of the parallelogram in which the ellipse is inscribed.
        tox - the x coordinate of the target point.
        toy - the y coordinate of the target point.
      • arcTo

        default void arcTo​(Point2D<?,​?> to,
                           Vector2D<?,​?> radii,
                           double xAxisRotation,
                           boolean largeArcFlag,
                           boolean sweepFlag)
        Description copied from interface: Path2D
        Adds a section of an shallow ellipse to the current path. The ellipse from which the portions are extracted follows the rules:
        • The ellipse will have its X axis tilted from horizontal by the angle xAxisRotation specified in radians.
        • The ellipse will have the X and Y radii (viewed from its tilted coordinate system) specified by radiusx and radiusy unless that ellipse is too small to bridge the gap from the current point to the specified destination point in which case a larger ellipse with the same ratio of dimensions will be substituted instead.
        • The ellipse may slide perpendicular to the direction from the current point to the specified destination point so that it just touches the two points. The direction it slides (to the "left" or to the "right") will be chosen to meet the criteria specified by the two boolean flags as described below. Only one direction will allow the method to meet both criteria.
        • If the largeArcFlag is true, then the ellipse will sweep the longer way around the ellipse that meets these criteria.
        • If the sweepFlag is true, then the ellipse will sweep clockwise around the ellipse that meets these criteria.

        The method will do nothing if the destination point is the same as the current point. The method will draw a simple line segment to the destination point if either of the two radii are zero.

        Specified by:
        arcTo in interface Path2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        to - the target point.
        radii - the X and Y radii of the tilted ellipse.
        xAxisRotation - the angle of tilt of the ellipse.
        largeArcFlag - true iff the path will sweep the long way around the ellipse.
        sweepFlag - true iff the path will sweep clockwise around the ellipse.
        See Also:
        "http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands"
      • arcTo

        default void arcTo​(double tox,
                           double toy,
                           double radiusx,
                           double radiusy,
                           double xAxisRotation,
                           boolean largeArcFlag,
                           boolean sweepFlag)
        Adds a section of an shallow ellipse to the current path. The ellipse from which the portions are extracted follows the rules:
        • The ellipse will have its X axis tilted from horizontal by the angle xAxisRotation specified in radians.
        • The ellipse will have the X and Y radii (viewed from its tilted coordinate system) specified by radiusx and radiusy unless that ellipse is too small to bridge the gap from the current point to the specified destination point in which case a larger ellipse with the same ratio of dimensions will be substituted instead.
        • The ellipse may slide perpendicular to the direction from the current point to the specified destination point so that it just touches the two points. The direction it slides (to the "left" or to the "right") will be chosen to meet the criteria specified by the two boolean flags as described below. Only one direction will allow the method to meet both criteria.
        • If the largeArcFlag is true, then the ellipse will sweep the longer way around the ellipse that meets these criteria.
        • If the sweepFlag is true, then the ellipse will sweep clockwise around the ellipse that meets these criteria.

        The method will do nothing if the destination point is the same as the current point. The method will draw a simple line segment to the destination point if either of the two radii are zero.

        Parameters:
        tox - the X coordinate of the target point.
        toy - the Y coordinate of the target point.
        radiusx - the X radius of the tilted ellipse.
        radiusy - the Y radius of the tilted ellipse.
        xAxisRotation - the angle of tilt of the ellipse.
        largeArcFlag - true iff the path will sweep the long way around the ellipse.
        sweepFlag - true iff the path will sweep clockwise around the ellipse.
        See Also:
        "http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands"
      • getDistanceSquared

        @Pure
        default double getDistanceSquared​(Point2D<?,​?> pt)
        Description copied from interface: Shape2D
        Replies the squared value of the minimal distance from this shape to the given point.
        Specified by:
        getDistanceSquared in interface Shape2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        pt - the point.
        Returns:
        squared value of the minimal distance between this shape and the point.
      • getDistanceL1

        @Pure
        default double getDistanceL1​(Point2D<?,​?> pt)
        Description copied from interface: Shape2D
        Computes the L-1 (Manhattan) distance between this shape and point p1. The L-1 distance is equal to abs(x1-x2) + abs(y1-y2).
        Specified by:
        getDistanceL1 in interface Shape2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        pt - the point
        Returns:
        the distance.
      • getDistanceLinf

        @Pure
        default double getDistanceLinf​(Point2D<?,​?> pt)
        Description copied from interface: Shape2D
        Computes the L-infinite distance between this shape and point p1. The L-infinite distance is equal to MAX[abs(x1-x2), abs(y1-y2)].
        Specified by:
        getDistanceLinf in interface Shape2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        pt - the point
        Returns:
        the distance.
      • contains

        @Pure
        default boolean contains​(double x,
                                 double y)
        Description copied from interface: Shape2afp
        Replies if the given point is inside this shape.
        Specified by:
        contains in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        x - x coordinate of the point to test.
        y - y coordinate of the point to test.
        Returns:
        true if the given point is inside this shape, otherwise false.
      • contains

        default boolean contains​(Rectangle2afp<?,​?,​?,​?,​?,​?> rectangle)
        Description copied from interface: Shape2afp
        Replies if the given rectangle is inside this shape.
        Specified by:
        contains in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        rectangle - the rectangle.
        Returns:
        true if the given rectangle is inside this shape, otherwise false.
      • intersects

        @Pure
        default boolean intersects​(Rectangle2afp<?,​?,​?,​?,​?,​?> rectangle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given rectangle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        rectangle - the rectangle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(RoundRectangle2afp<?,​?,​?,​?,​?,​?> roundRectangle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given rectangle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        roundRectangle - the round rectangle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Ellipse2afp<?,​?,​?,​?,​?,​?> ellipse)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given ellipse.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        ellipse - the ellipse.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Circle2afp<?,​?,​?,​?,​?,​?> circle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given circle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        circle - the circle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Segment2afp<?,​?,​?,​?,​?,​?> segment)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given line.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        segment - the segment.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Triangle2afp<?,​?,​?,​?,​?,​?> triangle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given triangle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        triangle - the triangle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(OrientedRectangle2afp<?,​?,​?,​?,​?,​?> orientedRectangle)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given rectangle.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        orientedRectangle - the oriented rectangle.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Parallelogram2afp<?,​?,​?,​?,​?,​?> sparallelogram)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given parallelogram.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        sparallelogram - the parallelogram.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(Path2afp<?,​?,​?,​?,​?,​?> path)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given path.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        path - the other path.
        Returns:
        true if this shape is intersecting the given path; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(PathIterator2afp<?> iterator)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the shape representing the given path iterator.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        iterator - the path iterator.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • intersects

        @Pure
        default boolean intersects​(MultiShape2afp<?,​?,​?,​?,​?,​?,​?> multishape)
        Description copied from interface: Shape2afp
        Replies if this shape is intersecting the given multishape.
        Specified by:
        intersects in interface Shape2afp<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        multishape - the multishape.
        Returns:
        true if this shape is intersecting the given shape; false if there is no intersection.
      • getCoordAt

        @Pure
        double getCoordAt​(int index)
        Replies the coordinate at the given index. The index is in [0;Path2D.size()*2).
        Parameters:
        index - the index.
        Returns:
        the coordinate at the given index.
      • setLastPoint

        void setLastPoint​(double x,
                          double y)
        Change the coordinates of the last inserted point.
        Parameters:
        x - the new x coordinate of the last point.
        y - the new y coordinate of the last point.
      • getPathIterator

        @Pure
        default PathIterator2afp<IE> getPathIterator​(double flatness)
        Description copied from interface: Path2D
        Replies an iterator on the path elements.

        Only PathElementType.MOVE_TO, PathElementType.LINE_TO, and PathElementType.CLOSE types are returned by the iterator.

        The amount of subdivision of the curved segments is controlled by the flatness parameter, which specifies the maximum distance that any point on the unflattened transformed curve can deviate from the returned flattened path segments. Note that a limit on the accuracy of the flattened path might be silently imposed, causing very small flattening parameters to be treated as larger values. This limit, if there is one, is defined by the particular implementation that is used.

        The iterator for this class is not multi-threaded safe.

        Specified by:
        getPathIterator in interface Path2D<ST extends Shape2afp<?,​?,​IE,​P,​V,​B>,​IT extends Path2afp<?,​?,​IE,​P,​V,​B>,​IE extends PathElement2afp,​P extends Point2D<? super P,​? super V>,​V extends Vector2D<? super V,​? super P>,​B extends Rectangle2afp<?,​?,​IE,​P,​V,​B>>
        Parameters:
        flatness - is the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.
        Returns:
        an iterator on the path elements.
      • getPathIterator

        @Pure
        default PathIterator2afp<IE> getPathIterator​(Transform2D transform,
                                                     double flatness)
        Replies an iterator on the path elements.

        Only PathElementType.MOVE_TO, PathElementType.LINE_TO, and PathElementType.CLOSE types are returned by the iterator.

        The amount of subdivision of the curved segments is controlled by the flatness parameter, which specifies the maximum distance that any point on the unflattened transformed curve can deviate from the returned flattened path segments. Note that a limit on the accuracy of the flattened path might be silently imposed, causing very small flattening parameters to be treated as larger values. This limit, if there is one, is defined by the particular implementation that is used.

        The iterator for this class is not multi-threaded safe.

        Parameters:
        transform - is an optional affine Transform2D to be applied to the coordinates as they are returned in the iteration, or null if untransformed coordinates are desired.
        flatness - is the maximum distance that the line segments used to approximate the curved segments are allowed to deviate from any point on the original curve.
        Returns:
        an iterator on the path elements.
      • getCurrentX

        @Pure
        double getCurrentX()
        Replies the x coordinate of the last point in the path.
        Returns:
        the x coordinate of the last point in the path.
      • getCurrentY

        @Pure
        double getCurrentY()
        Replies the y coordinate of the last point in the path.
        Returns:
        the y coordinate of the last point in the path.
      • remove

        boolean remove​(double x,
                       double y)
        Remove the point with the given coordinates.

        If the given coordinates do not match exactly a point in the path, nothing is removed.

        Parameters:
        x - the x coordinate of the ponit to remove.
        y - the y coordinate of the ponit to remove.
        Returns:
        true if the point was removed; false otherwise.