|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lowagie.text.pdf.internal.PolylineShape
public class PolylineShape
Class that defines a Polyline shape. This class was originally written by wil - amristar.com.au and integrated into iText by Bruno.
| Field Summary | |
|---|---|
protected int |
np
The total number of points. |
protected int[] |
x
All the X-values of the coordinates in the polyline. |
protected int[] |
y
All the Y-values of the coordinates in the polyline. |
| Constructor Summary | |
|---|---|
PolylineShape(int[] x,
int[] y,
int nPoints)
Creates a PolylineShape. |
|
| Method Summary | |
|---|---|
boolean |
contains(double x,
double y)
A polyline can't contain a point. |
boolean |
contains(double x,
double y,
double w,
double h)
A polyline can't contain a point. |
boolean |
contains(Point2D p)
A polyline can't contain a point. |
boolean |
contains(Rectangle2D r)
A polyline can't contain a point. |
Rectangle |
getBounds()
Returns the bounding box of this polyline. |
Rectangle2D |
getBounds2D()
Returns the bounding box of this polyline. |
PathIterator |
getPathIterator(AffineTransform at)
Returns an iteration object that defines the boundary of the polyline. |
PathIterator |
getPathIterator(AffineTransform at,
double flatness)
There's no difference with getPathIterator(AffineTransform at); we just need this method to implement the Shape interface. |
boolean |
intersects(double x,
double y,
double w,
double h)
Checks if one of the lines in the polyline intersects with a given rectangle. |
boolean |
intersects(Rectangle2D r)
Checks if one of the lines in the polyline intersects with a given rectangle. |
private int[] |
rect()
Calculates the origin (X, Y) and the width and height of a rectangle that contains all the segments of the polyline. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int[] x
protected int[] y
protected int np
| Constructor Detail |
|---|
public PolylineShape(int[] x,
int[] y,
int nPoints)
| Method Detail |
|---|
public Rectangle2D getBounds2D()
getBounds2D in interface ShapeRectangle2D that is the high-precision
bounding box of this line.Shape.getBounds2D()public Rectangle getBounds()
getBounds in interface ShapeShape.getBounds()private int[] rect()
public boolean contains(double x,
double y)
contains in interface ShapeShape.contains(double, double)public boolean contains(Point2D p)
contains in interface ShapeShape.contains(java.awt.geom.Point2D)
public boolean contains(double x,
double y,
double w,
double h)
contains in interface ShapeShape.contains(double, double, double, double)public boolean contains(Rectangle2D r)
contains in interface ShapeShape.contains(java.awt.geom.Rectangle2D)
public boolean intersects(double x,
double y,
double w,
double h)
intersects in interface ShapeShape.intersects(double, double, double, double)public boolean intersects(Rectangle2D r)
intersects in interface ShapeShape.intersects(java.awt.geom.Rectangle2D)public PathIterator getPathIterator(AffineTransform at)
getPathIterator in interface Shapeat - the specified AffineTransform
PathIterator that defines the boundary of this polyline.Shape.intersects(java.awt.geom.Rectangle2D)
public PathIterator getPathIterator(AffineTransform at,
double flatness)
getPathIterator in interface Shape
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||