Constructor and Description |
---|
RectangleSprite()
Creates a rectangle with no values.
|
RectangleSprite(double width,
double height)
Creates a rectangle using the given width and height.
|
RectangleSprite(double width,
double height,
double x,
double y)
Creates a rectangle using the given width, height and coordinates.
|
RectangleSprite(double width,
double height,
double x,
double y,
double radius)
Creates a rectangle using the given width, height, coordinates and corner
radius.
|
RectangleSprite(PreciseRectangle rectangle)
Creates a rectangle using the given
PreciseRectangle . |
RectangleSprite(RectangleSprite sprite)
Creates a copy of the given rectangle.
|
Modifier and Type | Method and Description |
---|---|
void |
clearDirtyFlags()
Clears all of the dirty flags on the sprite.
|
RectangleSprite |
copy()
Returns a copy of the sprite.
|
double |
getHeight()
Returns the height of the rectangle
|
PathSprite |
getPathSprite()
Returns the
Sprite as a path. |
double |
getRadius()
Returns the radius of the corners of the rectangle
|
double |
getWidth()
Returns the width of the rectangle
|
double |
getX()
Returns the x-coordinate of the rectangle.
|
double |
getY()
Returns the y-coordinate of the rectangle.
|
boolean |
isDirty()
Returns true if the sprite changed since the last render.
|
boolean |
isHeightDirty()
Returns true if the height changed since the last render.
|
boolean |
isRadiusDirty()
Returns true if the radius changed since the last render.
|
boolean |
isWidthDirty()
Returns true if the width changed since the last render.
|
boolean |
isXDirty()
Returns true if the x changed since the last render.
|
boolean |
isYDirty()
Returns true if the y changed since the last render.
|
void |
setHeight(double height)
Sets the height of the rectangle.
|
void |
setRadius(double radius)
Sets the radius of the corners of the rectangle
|
void |
setWidth(double width)
Sets the width of the rectangle.
|
void |
setX(double x)
Sets the x-coordinate of the rectangle.
|
void |
setY(double y)
Sets the y-coordinate of the rectangle.
|
PreciseRectangle |
toRectangle()
Returns the rectangle values of the sprite as a
PreciseRectangle . |
String |
toString() |
void |
update(Sprite sprite)
Updates the attributes of the sprite using the given sprite.
|
getBBox, getClipRectangle, getComponent, getFill, getFillOpacity, getOpacity, getRotation, getScaling, getStroke, getStrokeOpacity, getStrokeWidth, getSurface, getTranslation, getZIndex, isClipRectangleDirty, isFillDirty, isFillOpacityDirty, isHidden, isHiddenDirty, isOpacityDirty, isStrokeDirty, isStrokeOpacityDirty, isStrokeWidthDirty, isTransformDirty, isZIndexDirty, redraw, remove, setClipRectangle, setComponent, setCursor, setFill, setFillOpacity, setHidden, setOpacity, setRotation, setRotation, setRotation, setScaling, setScaling, setScaling, setStroke, setStrokeOpacity, setStrokeWidth, setSurface, setTranslation, setTranslation, setZIndex, transformMatrix
public RectangleSprite()
public RectangleSprite(double width, double height)
width
- the width of the rectangleheight
- the height of the rectanglepublic RectangleSprite(double width, double height, double x, double y)
width
- the width of the rectangleheight
- the height of the rectanglex
- the x-coordinate of the rectangley
- the y-coordinate of the rectanglepublic RectangleSprite(double width, double height, double x, double y, double radius)
width
- the width of the rectangleheight
- the height of the rectanglex
- the x-coordinate of the rectangley
- the y-coordinate of the rectangleradius
- the radius of the corners of the rectanglepublic RectangleSprite(PreciseRectangle rectangle)
PreciseRectangle
.rectangle
- the rectangle to be used by the spritepublic RectangleSprite(RectangleSprite sprite)
sprite
- the sprite to be copiedpublic void clearDirtyFlags()
Sprite
clearDirtyFlags
in class Sprite
public RectangleSprite copy()
Sprite
public double getHeight()
public PathSprite getPathSprite()
Sprite
Sprite
as a path.getPathSprite
in class Sprite
public double getRadius()
public double getWidth()
public double getX()
public double getY()
public boolean isDirty()
Sprite
public boolean isHeightDirty()
public boolean isRadiusDirty()
public boolean isWidthDirty()
public boolean isXDirty()
public boolean isYDirty()
public void setHeight(double height)
height
- the height of the rectanglepublic void setRadius(double radius)
radius
- the radius of the cornerspublic void setWidth(double width)
width
- the width of the rectanglepublic void setX(double x)
x
- the x-coordinate of the rectanglepublic void setY(double y)
y
- the y-coordinate of the rectanglepublic PreciseRectangle toRectangle()
PreciseRectangle
.Copyright © 2015. All rights reserved.