Package com.itextpdf.kernel.geom
Class Line
java.lang.Object
com.itextpdf.kernel.geom.Line
- All Implemented Interfaces:
IShape
Represents a line.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionTreat base points as the points which are enough to construct a shape.
-
Field Details
-
p1
-
p2
-
-
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.- Parameters:
x1
- x-coordinate of start point of this Liney1
- y-coordinate of start point of this Linex2
- x-coordinate of end point of this Liney2
- y-coordinate of end point of this Line
-
Line
Constructs a new line based on the given coordinates.- Parameters:
p1
- start point of this Linep2
- end point of this Line
-
-
Method Details
-
getBasePoints
Description copied from interface:IShape
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 interfaceIShape
- Returns:
- Ordered
List
consisting of shape's base points.
-