Class PathElement2i.LinePathElement2i

    • Constructor Detail

      • LinePathElement2i

        LinePathElement2i​(int fromx,
                          int fromy,
                          int tox,
                          int toy)
        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.
    • 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: PathElement2ai
        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: PathElement2ai
        Copy the coords into the given array, except the source point.
        Parameters:
        array - the output array.
      • toArray

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