Class PathElement2d.ArcPathElement2d

    • Constructor Detail

      • ArcPathElement2d

        ArcPathElement2d​(double fromx,
                         double fromy,
                         double tox,
                         double toy,
                         double xradius,
                         double yradius,
                         double xrotation,
                         boolean largeArcFlag,
                         boolean sweepFlag)
        Constructor.
        Parameters:
        fromx - x coordinate of the origin point.
        fromy - y coordinate of the origin point.
        tox - x coordinate of the target point.
        toy - y coordinate of the target point.
        xradius - radius of the ellipse along its x axis.
        yradius - radius of the ellipse along its y axis.
        xrotation - rotation (in radians) of the ellipse's x axis.
        largeArcFlag - true iff the path will sweep the long way around the ellipse.
        sweepFlag - true iff the path will sweep clockwise around the ellipse.
    • 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.