All Implemented Interfaces:
Mask

public class Line extends Shape<Line>
Represents a line segment from (x,y) to (x2,y2) in world units. This Shape does not have a fill.
  • Method Details

    • setX2

      public Line setX2(int x2)
      Sets the X coordinate of the end point of this Line.

      The starting point of this line is its position.

      Parameters:
      x2 - the X coordinate for the end point of this Line.
      Returns:
      this Line.
    • setX2

      public Line setX2(int x2, Curve curve)
      Sets the X coordinate of the end point of this Line.

      The starting point of this line is its position.

      Parameters:
      x2 - the X coordinate for the end point of this Line.
      curve - the transition to animate between values of this property.
      Returns:
      this Line.
    • getX2

      public int getX2()
      Returns the X coordinate of this Line's end point.
      Returns:
      the X coordinate of this Line's end point.
    • setY2

      public Line setY2(int y2)
      Sets the y coordinate of the end point of this Line.

      The starting point of this line is its position.

      Parameters:
      y2 - the Y coordinate for the end point of this Line.
      Returns:
      this Line.
    • setY2

      public Line setY2(int y2, Curve curve)
      Sets the y coordinate of the end point of this Line.

      The starting point of this line is its position.

      Parameters:
      y2 - the Y coordinate for the end point of this Line.
      curve - the transition to animate between values of this property.
      Returns:
      this Line.
    • getY2

      public int getY2()
      Returns the Y coordinate of this Line's end point.
      Returns:
      the Y coordinate of this Line's end point.