public class TiledImageBackground extends AbstractImageBackground
Constructor and Description |
---|
TiledImageBackground()
Creates a tiled image background.
|
TiledImageBackground(Image image,
int alignment,
boolean fillColor,
boolean horizontalRepeat,
boolean verticalRepeat)
Creates a tiled image background specifying its attributes.
|
Modifier and Type | Method and Description |
---|---|
protected void |
drawImage(GraphicsContext g,
Rectangle bounds)
Draws the background image.
|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
boolean |
isHorizontalRepeat()
Gets whether the image is repeated horizontally or not.
|
boolean |
isVerticalRepeat()
Gets whether the image is repeated vertically or not.
|
void |
setHorizontalRepeat(boolean horizontalRepeat)
Sets whether or not the image is repeated horizontally.
|
void |
setVerticalRepeat(boolean verticalRepeat)
Sets whether or not the image is repeated horizontally.
|
apply, getAlignment, getImage, isFillColor, isTransparent, setAlignment, setFillColor, setImage
public TiledImageBackground()
public TiledImageBackground(Image image, int alignment, boolean fillColor, boolean horizontalRepeat, boolean verticalRepeat)
image
- the background image to set.alignment
- the alignment to set.fillColor
- true
to fill remaining area with background color, false
otherwise.horizontalRepeat
- true
if the image is repeated horizontally, false
otherwise.verticalRepeat
- true
if the image is repeated vertically, false
otherwise.public boolean isHorizontalRepeat()
true
if the image is repeated horizontally, false
otherwise.public void setHorizontalRepeat(boolean horizontalRepeat)
horizontalRepeat
- true
if the image is repeated horizontally, false
otherwise.public boolean isVerticalRepeat()
true
if the image is repeated vertically, false
otherwise.public void setVerticalRepeat(boolean verticalRepeat)
verticalRepeat
- true
if the image is repeated vertically, false
otherwise.protected void drawImage(GraphicsContext g, Rectangle bounds)
AbstractImageBackground
drawImage
in class AbstractImageBackground
g
- the graphics context.bounds
- the available rectangle.public boolean equals(@Nullable java.lang.Object obj)
equals
in class AbstractImageBackground
public int hashCode()
hashCode
in class AbstractImageBackground