public class Geometry
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
Geometry() |
Geometry(float width,
float height,
float x,
float y)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Geometry |
clone() |
float |
getHeight()
Return the height.
|
java.awt.geom.Rectangle2D |
getRectangle()
Return a rectangle corresponding to the position and dimension of the geometry.
|
float |
getWidth()
Return the width.
|
float |
getX()
Return the x position.
|
float |
getY()
Return the y position.
|
void |
setHeight(float height)
Set the height.
|
void |
setPosition(float x,
float y)
Set the position.
|
void |
setRectangle(java.awt.geom.Rectangle2D rec)
Set the rectangle corresponding to the position and dimension of the geometry.
|
void |
setWidth(float width)
Set the width.
|
void |
setX(float x)
Set the x position.
|
void |
setY(float y)
Set the y position.
|
public Geometry()
public Geometry(float width, float height, float x, float y)
width
- the widthheight
- the heightx
- the x positiony
- the y positionpublic Geometry clone()
clone
in class java.lang.Object
public java.awt.geom.Rectangle2D getRectangle()
public void setRectangle(java.awt.geom.Rectangle2D rec)
rec
- the rectanglepublic void setX(float x)
x
- the x positionpublic float getX()
public void setY(float y)
y
- the y positionpublic float getY()
public void setPosition(float x, float y)
x
- the x positiony
- the y positionpublic void setWidth(float width)
width
- the widthpublic float getWidth()
public void setHeight(float height)
height
- the heightpublic float getHeight()
Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence