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 Rectangle2D
Rectangle2D.Double, Rectangle2D.Float, Rectangle2D.Iterator -
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleprivate static final longdoubledoubledoubleFields inherited from class Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double px, double py) voidadd(int px, int py) voidvoidbooleancontains(double px, double py) booleancontains(double rx, double ry, double rw, double rh) booleancontains(int px, int py) booleancontains(int rx, int ry, int rw, int rh) booleanbooleanbooleandoublegetSize()doublegetWidth()doublegetX()doublegetY()voidgrow(double dx, double dy) voidgrow(int mx, int my) booleanbooleanisEmpty()intoutcode(double px, double py) voidsetBounds(double x, double y, double width, double height) voidsetBounds(int x, int y, int width, int height) voidvoidsetLocation(double x, double y) voidsetLocation(int mx, int my) voidsetLocation(Point p) voidsetRect(double x, double y, double width, double height) voidsetSize(double width, double height) voidsetSize(int mx, int my) voidtoString()voidtranslate(double mx, double my) voidtranslate(int mx, int my) Methods inherited from class Rectangle2D
add, add, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, unionMethods inherited from class RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonalMethods inherited from interface 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:
getXin classRectangularShape
-
getY
public double getY()- Specified by:
getYin classRectangularShape
-
getHeight
public double getHeight()- Specified by:
getHeightin classRectangularShape
-
getWidth
public double getWidth()- Specified by:
getWidthin classRectangularShape
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin 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:
setRectin classRectangle2D
-
getBounds
- Specified by:
getBoundsin interfaceShape- Overrides:
getBoundsin classRectangularShape
-
getBounds2D
- Specified by:
getBounds2Din interfaceShape- Overrides:
getBounds2Din 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:
addin classRectangle2D
-
add
-
add
-
contains
public boolean contains(int px, int py) -
contains
public boolean contains(double px, double py) - Specified by:
containsin interfaceShape- Overrides:
containsin 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:
containsin interfaceShape- Overrides:
containsin classRectangle2D
-
contains
-
createIntersection
- Specified by:
createIntersectionin classRectangle2D
-
intersection
-
intersects
-
outcode
public int outcode(double px, double py) - Specified by:
outcodein classRectangle2D
-
createUnion
- Specified by:
createUnionin classRectangle2D
-
union
-
equals
- Overrides:
equalsin classRectangle2D
-
toString
-