Class PathElement2d.QuadPathElement2d

    • Constructor Detail

      • QuadPathElement2d

        QuadPathElement2d​(double fromx,
                          double fromy,
                          double ctrlx,
                          double ctrly,
                          double tox,
                          double toy)
        Constructor.
        Parameters:
        fromx - x coordinate of the origin point.
        fromy - y coordinate of the origin point.
        ctrlx - x coordinate of the control point.
        ctrly - y coordinate of the control point.
        tox - x coordinate of the target point.
        toy - y coordinate of the target point.
    • Method Detail

      • isEmpty

        @Pure
        public boolean isEmpty()
        Description copied from interface: PathElement2D
        Replies if the element is empty, ie. the points are the same.
        Returns:
        true if the points are the same; otherwise false.
      • isDrawable

        @Pure
        public boolean isDrawable()
        Description copied from interface: PathElement2D
        Replies if the element is not empty and is drawable.

        Only the path elements that may produce pixels on the screen must reply true in this function.

        Returns:
        true if the path element is drawable; otherwise false.
      • toArray

        public void toArray​(int[] array)
        Description copied from interface: PathElement2afp
        Copy the coords into the given array, except the source point.
        Parameters:
        array - the output array.
      • toArray

        public void toArray​(double[] array)
        Description copied from interface: PathElement2afp
        Copy the coords into the given array, except the source point.
        Parameters:
        array - the output array.
      • toArray

        @Pure
        public double[] toArray()
        Description copied from class: PathElement2d
        Copy the coords into an array, except the source point.
        Specified by:
        toArray in class PathElement2d
        Returns:
        the array of the points, except the source point.
      • getFromX

        public double getFromX()
        Description copied from interface: PathElement2afp
        Replies the x coordinate of the starting point.
        Returns:
        the x coordinate, or 0 if the type is PathElementType.MOVE_TO.
      • getFromY

        public double getFromY()
        Description copied from interface: PathElement2afp
        Replies the y coordinate of the starting point.
        Returns:
        the y coordinate, or 0 if the type is PathElementType.MOVE_TO.