Package com.itextpdf.kernel.geom
Class Line
java.lang.Object
com.itextpdf.kernel.geom.Line
- All Implemented Interfaces:
-
IShape
Represents a line.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionTreat base points as the points which are enough to construct a shape.
-
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 Line -
y1
- y-coordinate of start point of this Line -
x2
- x-coordinate of end point of this Line -
y2
- y-coordinate of end point of this Line
-
Line
Constructs a new line based on the given coordinates.- Parameters:
-
p1
- start point of this Line -
p2
- 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.
-