Class Line

java.lang.Object
com.itextpdf.text.pdf.parser.Line
All Implemented Interfaces:
Shape

public class Line extends Object implements Shape
Represents a line.
Since:
5.5.6
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Point2D
     
    private final Point2D
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new zero-length line starting at zero.
    Line(float x1, float y1, float x2, float y2)
    Constructs a new line based on the given coordinates.
    Line(Point2D p1, Point2D p2)
    Constructs a new line based on the given coordinates.
  • Method Summary

    Modifier and Type
    Method
    Description
    Treat base points as the points which are enough to construct a shape.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Line

      public Line()
      Constructs a new zero-length line starting at zero.
    • Line

      public Line(float x1, float y1, float x2, float y2)
      Constructs a new line based on the given coordinates.
    • Line

      public Line(Point2D p1, Point2D p2)
      Constructs a new line based on the given coordinates.
  • Method Details

    • getBasePoints

      public List<Point2D> getBasePoints()
      Description copied from interface: Shape
      Treat base points as the points which are enough to construct a shape. E.g. for a bezier curve they are control points, for a line segment - the start and the end points of the segment.
      Specified by:
      getBasePoints in interface Shape
      Returns:
      Ordered List consisting of shape's base points.