Package com.itextpdf.awt.geom
Class Rectangle2D
- java.lang.Object
-
- com.itextpdf.awt.geom.RectangularShape
-
- com.itextpdf.awt.geom.Rectangle2D
-
- All Implemented Interfaces:
Shape
,java.lang.Cloneable
- Direct Known Subclasses:
Rectangle
,Rectangle2D.Double
,Rectangle2D.Float
public abstract class Rectangle2D extends RectangularShape
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Rectangle2D.Double
static class
Rectangle2D.Float
(package private) class
Rectangle2D.Iterator
-
Field Summary
Fields Modifier and Type Field Description static int
OUT_BOTTOM
static int
OUT_LEFT
static int
OUT_RIGHT
static int
OUT_TOP
-
Constructor Summary
Constructors Modifier Constructor Description protected
Rectangle2D()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
add(double x, double y)
void
add(Point2D p)
void
add(Rectangle2D r)
boolean
contains(double x, double y)
boolean
contains(double x, double y, double width, double height)
abstract Rectangle2D
createIntersection(Rectangle2D r)
abstract Rectangle2D
createUnion(Rectangle2D r)
boolean
equals(java.lang.Object obj)
Rectangle2D
getBounds2D()
PathIterator
getPathIterator(AffineTransform t)
PathIterator
getPathIterator(AffineTransform t, double flatness)
int
hashCode()
static void
intersect(Rectangle2D src1, Rectangle2D src2, Rectangle2D dst)
boolean
intersects(double x, double y, double width, double height)
boolean
intersectsLine(double x1, double y1, double x2, double y2)
boolean
intersectsLine(Line2D l)
abstract int
outcode(double x, double y)
int
outcode(Point2D p)
void
setFrame(double x, double y, double width, double height)
abstract void
setRect(double x, double y, double width, double height)
void
setRect(Rectangle2D r)
static void
union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dst)
-
Methods inherited from class com.itextpdf.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getHeight, getMaxX, getMaxY, getMinX, getMinY, getWidth, getX, getY, intersects, isEmpty, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
-
-
-
-
Field Detail
-
OUT_LEFT
public static final int OUT_LEFT
- See Also:
- Constant Field Values
-
OUT_TOP
public static final int OUT_TOP
- See Also:
- Constant Field Values
-
OUT_RIGHT
public static final int OUT_RIGHT
- See Also:
- Constant Field Values
-
OUT_BOTTOM
public static final int OUT_BOTTOM
- See Also:
- Constant Field Values
-
-
Method Detail
-
setRect
public abstract void setRect(double x, double y, double width, double height)
-
outcode
public abstract int outcode(double x, double y)
-
createIntersection
public abstract Rectangle2D createIntersection(Rectangle2D r)
-
createUnion
public abstract Rectangle2D createUnion(Rectangle2D r)
-
setRect
public void setRect(Rectangle2D r)
-
setFrame
public void setFrame(double x, double y, double width, double height)
- Specified by:
setFrame
in classRectangularShape
-
getBounds2D
public Rectangle2D getBounds2D()
-
intersectsLine
public boolean intersectsLine(double x1, double y1, double x2, double y2)
-
intersectsLine
public boolean intersectsLine(Line2D l)
-
outcode
public int outcode(Point2D p)
-
contains
public boolean contains(double x, double y)
-
intersects
public boolean intersects(double x, double y, double width, double height)
-
contains
public boolean contains(double x, double y, double width, double height)
-
intersect
public static void intersect(Rectangle2D src1, Rectangle2D src2, Rectangle2D dst)
-
union
public static void union(Rectangle2D src1, Rectangle2D src2, Rectangle2D dst)
-
add
public void add(double x, double y)
-
add
public void add(Point2D p)
-
add
public void add(Rectangle2D r)
-
getPathIterator
public PathIterator getPathIterator(AffineTransform t)
-
getPathIterator
public PathIterator getPathIterator(AffineTransform t, double flatness)
- Specified by:
getPathIterator
in interfaceShape
- Overrides:
getPathIterator
in classRectangularShape
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-