public class LineSegment extends Object
Constructor and Description |
---|
LineSegment(Vector startPoint, Vector endPoint)
Creates a new line segment.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsPoint(Vector point)
Checks if a segment contains a given point in itself
|
boolean |
containsSegment(LineSegment other)
Checks if a segment contains another segment in itself
|
Rectangle |
getBoundingRectangle()
Computes the bounding rectangle for this line segment.
|
Vector |
getEndPoint() |
float |
getLength() |
Vector |
getStartPoint() |
LineSegment |
transformBy(Matrix m)
Transforms the segment by the specified matrix
|
public Vector getStartPoint()
public Vector getEndPoint()
public float getLength()
public Rectangle getBoundingRectangle()
public LineSegment transformBy(Matrix m)
m
- the matrix for the transformation
public boolean containsSegment(LineSegment other)
other
- a segment to be checked
public boolean containsPoint(Vector point)
point
- a point to be checked
Copyright © 1998–2020 iText Group NV. All rights reserved.