Package com.itextpdf.awt.geom
Class Rectangle
java.lang.Object
com.itextpdf.awt.geom.RectangularShape
com.itextpdf.awt.geom.Rectangle2D
com.itextpdf.awt.geom.Rectangle
- All Implemented Interfaces:
Shape
,Serializable
,Cloneable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.itextpdf.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float, Rectangle2D.Iterator
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
private static final long
double
double
double
Fields inherited from class com.itextpdf.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(double px, double py) void
add
(int px, int py) void
void
boolean
contains
(double px, double py) boolean
contains
(double rx, double ry, double rw, double rh) boolean
contains
(int px, int py) boolean
contains
(int rx, int ry, int rw, int rh) boolean
boolean
boolean
double
getSize()
double
getWidth()
double
getX()
double
getY()
void
grow
(double dx, double dy) void
grow
(int mx, int my) boolean
boolean
isEmpty()
int
outcode
(double px, double py) void
setBounds
(double x, double y, double width, double height) void
setBounds
(int x, int y, int width, int height) void
void
setLocation
(double x, double y) void
setLocation
(int mx, int my) void
setLocation
(Point p) void
setRect
(double x, double y, double width, double height) void
setSize
(double width, double height) void
setSize
(int mx, int my) void
toString()
void
translate
(double mx, double my) void
translate
(int mx, int my) Methods inherited from class com.itextpdf.awt.geom.Rectangle2D
add, add, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
Methods inherited from class com.itextpdf.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.itextpdf.awt.geom.Shape
contains, contains, getPathIterator, getPathIterator, intersects, intersects
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
x
public double x -
y
public double y -
width
public double width -
height
public double height
-
-
Constructor Details
-
Rectangle
public Rectangle() -
Rectangle
-
Rectangle
-
Rectangle
public Rectangle(double x, double y, double width, double height) -
Rectangle
public Rectangle(int width, int height) -
Rectangle
-
Rectangle
-
Rectangle
-
-
Method Details
-
getX
public double getX()- Specified by:
getX
in classRectangularShape
-
getY
public double getY()- Specified by:
getY
in classRectangularShape
-
getHeight
public double getHeight()- Specified by:
getHeight
in classRectangularShape
-
getWidth
public double getWidth()- Specified by:
getWidth
in classRectangularShape
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in classRectangularShape
-
getSize
-
setSize
public void setSize(int mx, int my) -
setSize
public void setSize(double width, double height) -
setSize
-
getLocation
-
setLocation
public void setLocation(int mx, int my) -
setLocation
public void setLocation(double x, double y) -
setLocation
-
setRect
public void setRect(double x, double y, double width, double height) - Specified by:
setRect
in classRectangle2D
-
getBounds
- Specified by:
getBounds
in interfaceShape
- Overrides:
getBounds
in classRectangularShape
-
getBounds2D
- Specified by:
getBounds2D
in interfaceShape
- Overrides:
getBounds2D
in classRectangle2D
-
setBounds
public void setBounds(int x, int y, int width, int height) -
setBounds
public void setBounds(double x, double y, double width, double height) -
setBounds
-
grow
public void grow(int mx, int my) -
grow
public void grow(double dx, double dy) -
translate
public void translate(int mx, int my) -
translate
public void translate(double mx, double my) -
add
public void add(int px, int py) -
add
public void add(double px, double py) - Overrides:
add
in classRectangle2D
-
add
-
add
-
contains
public boolean contains(int px, int py) -
contains
public boolean contains(double px, double py) - Specified by:
contains
in interfaceShape
- Overrides:
contains
in classRectangle2D
-
contains
-
contains
public boolean contains(int rx, int ry, int rw, int rh) -
contains
public boolean contains(double rx, double ry, double rw, double rh) - Specified by:
contains
in interfaceShape
- Overrides:
contains
in classRectangle2D
-
contains
-
createIntersection
- Specified by:
createIntersection
in classRectangle2D
-
intersection
-
intersects
-
outcode
public int outcode(double px, double py) - Specified by:
outcode
in classRectangle2D
-
createUnion
- Specified by:
createUnion
in classRectangle2D
-
union
-
equals
- Overrides:
equals
in classRectangle2D
-
toString
-