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,java.io.Serializable,java.lang.Cloneable
public class Rectangle extends Rectangle2D implements Shape, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.itextpdf.awt.geom.Rectangle2D
Rectangle2D.Double, Rectangle2D.Float, Rectangle2D.Iterator
-
-
Field Summary
Fields Modifier and Type Field Description doubleheightprivate static longserialVersionUIDdoublewidthdoublexdoubley-
Fields inherited from class com.itextpdf.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(double px, double py)voidadd(int px, int py)voidadd(Point p)voidadd(Rectangle r)booleancontains(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)booleancontains(Point p)booleancontains(Rectangle r)Rectangle2DcreateIntersection(Rectangle2D r)Rectangle2DcreateUnion(Rectangle2D r)booleanequals(java.lang.Object obj)RectanglegetBounds()Rectangle2DgetBounds2D()doublegetHeight()PointgetLocation()DimensiongetSize()doublegetWidth()doublegetX()doublegetY()voidgrow(double dx, double dy)voidgrow(int mx, int my)Rectangleintersection(Rectangle r)booleanintersects(Rectangle r)booleanisEmpty()intoutcode(double px, double py)voidsetBounds(double x, double y, double width, double height)voidsetBounds(int x, int y, int width, int height)voidsetBounds(Rectangle r)voidsetLocation(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)voidsetSize(Dimension d)java.lang.StringtoString()voidtranslate(double mx, double my)voidtranslate(int mx, int my)Rectangleunion(Rectangle r)-
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 Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
x
public double x
-
y
public double y
-
width
public double width
-
height
public double height
-
-
Constructor Detail
-
Rectangle
public Rectangle()
-
Rectangle
public Rectangle(Point p)
-
Rectangle
public Rectangle(double x, double y, double width, double height)
-
Rectangle
public Rectangle(int width, int height)
-
Rectangle
public Rectangle(Rectangle r)
-
Rectangle
public Rectangle(Rectangle r)
-
Rectangle
public Rectangle(Dimension d)
-
-
Method Detail
-
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
public Dimension getSize()
-
setSize
public void setSize(int mx, int my)
-
setSize
public void setSize(double width, double height)
-
setSize
public void setSize(Dimension d)
-
getLocation
public Point getLocation()
-
setLocation
public void setLocation(int mx, int my)
-
setLocation
public void setLocation(double x, double y)
-
setLocation
public void setLocation(Point p)
-
setRect
public void setRect(double x, double y, double width, double height)- Specified by:
setRectin classRectangle2D
-
getBounds
public Rectangle getBounds()
- Specified by:
getBoundsin interfaceShape- Overrides:
getBoundsin classRectangularShape
-
getBounds2D
public Rectangle2D 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
public void setBounds(Rectangle r)
-
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
public void add(Point p)
-
add
public void add(Rectangle r)
-
contains
public boolean contains(int px, int py)
-
contains
public boolean contains(double px, double py)- Specified by:
containsin interfaceShape- Overrides:
containsin classRectangle2D
-
contains
public boolean contains(Point p)
-
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
public boolean contains(Rectangle r)
-
createIntersection
public Rectangle2D createIntersection(Rectangle2D r)
- Specified by:
createIntersectionin classRectangle2D
-
intersects
public boolean intersects(Rectangle r)
-
outcode
public int outcode(double px, double py)- Specified by:
outcodein classRectangle2D
-
createUnion
public Rectangle2D createUnion(Rectangle2D r)
- Specified by:
createUnionin classRectangle2D
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classRectangle2D
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-