Class ImageBackdrop
java.lang.Object
com.ardor3d.extension.ui.backdrop.UIBackdrop
com.ardor3d.extension.ui.backdrop.SolidBackdrop
com.ardor3d.extension.ui.backdrop.ImageBackdrop
This backdrop paints a single image on a colored plane behind the component, stretching it and aligning it to the
component based on given settings.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected Alignment
The alignment (to the component) to align the image to.protected ImageBackdrop.StretchAxis
The axis to stretch the image on.protected final double[]
used internally to hold component measurements prior to drawing backdropprotected SubTex
The image to draw. -
Constructor Summary
ConstructorDescriptionImageBackdrop
(SubTex image) Construct this back drop, using the given image.ImageBackdrop
(SubTex image, ReadOnlyColorRGBA color) Construct this back drop, using the given image and color. -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Renderer renderer, UIComponent comp) Draw this backdrop.void
getDimensions
(UIComponent comp, double[] vals) getImage()
void
setAlignment
(Alignment alignment) void
void
void
setTintColor
(ReadOnlyColorRGBA color) Sets a color to use for tinting the backdrop.Methods inherited from class com.ardor3d.extension.ui.backdrop.SolidBackdrop
getColor, setColor
Methods inherited from class com.ardor3d.extension.ui.backdrop.UIBackdrop
getBackdropHeight, getBackdropWidth
-
Field Details
-
_image
The image to draw. -
_axis
The axis to stretch the image on. -
_alignment
The alignment (to the component) to align the image to. -
_dims
protected final double[] _dimsused internally to hold component measurements prior to drawing backdrop
-
-
Constructor Details
-
ImageBackdrop
Construct this back drop, using the given image.- Parameters:
image
- the image
-
ImageBackdrop
Construct this back drop, using the given image and color.- Parameters:
image
- the image to drawcolor
- the color of the backdrop
-
-
Method Details
-
draw
Description copied from class:UIBackdrop
Draw this backdrop. Override this method to do the actual work.- Overrides:
draw
in classSolidBackdrop
- Parameters:
renderer
- the renderer to use in drawing.comp
- the component we are drawing the background for.
-
getDimensions
-
getImage
-
setImage
-
getStretch
-
setStretch
-
getAlignment
-
setAlignment
-
getTintColor
-
setTintColor
Sets a color to use for tinting the backdrop.- Parameters:
color
- the color to set
-