Package com.lowagie.text.pdf.internal
Class PolylineShape
java.lang.Object
com.lowagie.text.pdf.internal.PolylineShape
- All Implemented Interfaces:
Shape
Class that defines a Polyline shape.
This class was originally written by wil - amristar.com.au
and integrated into iText by Bruno.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(double x, double y) A polyline can't contain a point.booleancontains(double x, double y, double w, double h) A polyline can't contain a point.booleanA polyline can't contain a point.booleanA polyline can't contain a point.Returns the bounding box of this polyline.Returns the bounding box of this polyline.Returns an iteration object that defines the boundary of the polyline.getPathIterator(AffineTransform at, double flatness) There's no difference with getPathIterator(AffineTransform at); we just need this method to implement the Shape interface.booleanintersects(double x, double y, double w, double h) Checks if one of the lines in the polyline intersects with a given rectangle.booleanChecks if one of the lines in the polyline intersects with a given rectangle.
-
Field Details
-
x
protected int[] xAll the X-values of the coordinates in the polyline. -
y
protected int[] yAll the Y-values of the coordinates in the polyline. -
np
protected int npThe total number of points.
-
-
Constructor Details
-
PolylineShape
public PolylineShape(int[] x, int[] y, int nPoints) Creates a PolylineShape.
-
-
Method Details
-
getBounds2D
Returns the bounding box of this polyline.- Specified by:
getBounds2Din interfaceShape- Returns:
- a
Rectangle2Dthat is the high-precision bounding box of this line. - See Also:
-
getBounds
Returns the bounding box of this polyline. -
contains
public boolean contains(double x, double y) A polyline can't contain a point. -
contains
A polyline can't contain a point. -
contains
public boolean contains(double x, double y, double w, double h) A polyline can't contain a point. -
contains
A polyline can't contain a point. -
intersects
public boolean intersects(double x, double y, double w, double h) Checks if one of the lines in the polyline intersects with a given rectangle.- Specified by:
intersectsin interfaceShape- See Also:
-
intersects
Checks if one of the lines in the polyline intersects with a given rectangle.- Specified by:
intersectsin interfaceShape- See Also:
-
getPathIterator
Returns an iteration object that defines the boundary of the polyline.- Specified by:
getPathIteratorin interfaceShape- Parameters:
at- the specifiedAffineTransform- Returns:
- a
PathIteratorthat defines the boundary of this polyline. - See Also:
-
getPathIterator
There's no difference with getPathIterator(AffineTransform at); we just need this method to implement the Shape interface.- Specified by:
getPathIteratorin interfaceShape
-