Package com.ardor3d.extension.ui.util
Class SubTexUtil
java.lang.Object
com.ardor3d.extension.ui.util.SubTexUtil
SubTexUtil is a utility for drawing SubTex objects to a renderer.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
drawSubTex
(Renderer renderer, SubTex subTex, double x, double y, double width, double height) Draw the given SubTex to the screen at the given location.static void
drawSubTex
(Renderer renderer, SubTex subTex, double x, double y, double width, double height, ReadOnlyTransform appliedTransform) Draw the given SubTex to the screen at the given location.static void
drawSubTex
(Renderer renderer, SubTex subTex, double x, double y, double width, double height, ReadOnlyTransform appliedTransform, ReadOnlyColorRGBA tintOverride) Draw the given SubTex to the screen at the given location.static void
drawSubTex
(Renderer renderer, SubTex subTex, int x, int y) Draw the given SubTex, as-is, to the screen at the given location.static void
drawSubTex
(Renderer renderer, SubTex subTex, int x, int y, int width, int height, boolean flipVertical, ReadOnlyTransform appliedTransform) Draw the given SubTex, optionally inverted on the Y axis, to the screen at the given location.static void
drawSubTex
(Renderer renderer, SubTex subTex, int x, int y, int width, int height, boolean flipVertical, ReadOnlyTransform appliedTransform, ReadOnlyColorRGBA tintOverride) Draw the given SubTex, optionally inverted on the Y axis, to the screen at the given location.static void
drawSubTex
(Renderer renderer, SubTex subTex, int x, int y, int width, int height, ReadOnlyTransform appliedTransform) Draw the given SubTex to the screen at the given location.static void
drawTransformedSubTex
(Renderer renderer, TransformedSubTex subTex, int x, int y, int width, int height, boolean flipVertical, ReadOnlyTransform appliedTransform) Draw the given TransformedSubTex, optionally inverted on the Y axis, to the screen at the given location.
-
Constructor Details
-
SubTexUtil
public SubTexUtil()
-
-
Method Details
-
drawSubTex
Draw the given SubTex, as-is, to the screen at the given location.- Parameters:
renderer
- the renderer to usesubTex
- the SubTex to drawx
- the x coordinate of the screen location to draw aty
- the y coordinate of the screen location to draw at
-
drawSubTex
public static void drawSubTex(Renderer renderer, SubTex subTex, int x, int y, int width, int height, ReadOnlyTransform appliedTransform) Draw the given SubTex to the screen at the given location. Use the given width and height instead of those supplied in the SubTex.- Parameters:
renderer
- the renderer to usesubTex
- the SubTex to drawx
- the x coordinate of the screen location to draw aty
- the y coordinate of the screen location to draw atwidth
- the width in screen pixels to use when drawing the SubTex.height
- the height in screen pixels to use when drawing the SubTex.appliedTransform
- an optional transform to apply to the rendered subtex
-
drawSubTex
public static void drawSubTex(Renderer renderer, SubTex subTex, double x, double y, double width, double height, ReadOnlyTransform appliedTransform) Draw the given SubTex to the screen at the given location. Use the given width and height instead of those supplied in the SubTex. Does not flip vertically.- Parameters:
renderer
- the renderer to usesubTex
- the SubTex to drawx
- the x coordinate of the screen location to draw aty
- the y coordinate of the screen location to draw atwidth
- the width in screen pixels to use when drawing the SubTex.height
- the height in screen pixels to use when drawing the SubTex.appliedTransform
- an optional transform to apply to the rendered subtex
-
drawSubTex
public static void drawSubTex(Renderer renderer, SubTex subTex, double x, double y, double width, double height, ReadOnlyTransform appliedTransform, ReadOnlyColorRGBA tintOverride) Draw the given SubTex to the screen at the given location. Use the given width and height instead of those supplied in the SubTex. Does not flip vertically.- Parameters:
renderer
- the renderer to usesubTex
- the SubTex to drawx
- the x coordinate of the screen location to draw aty
- the y coordinate of the screen location to draw atwidth
- the width in screen pixels to use when drawing the SubTex.height
- the height in screen pixels to use when drawing the SubTex.appliedTransform
- an optional transform to apply to the rendered subtextintOverride
- an optional override for the SubTex tintColor
-
drawSubTex
public static void drawSubTex(Renderer renderer, SubTex subTex, double x, double y, double width, double height) Draw the given SubTex to the screen at the given location. Use the given width and height instead of those supplied in the SubTex.- Parameters:
renderer
- the renderer to usesubTex
- the SubTex to drawx
- the x coordinate of the screen location to draw aty
- the y coordinate of the screen location to draw atwidth
- the width in screen pixels to use when drawing the SubTex.height
- the height in screen pixels to use when drawing the SubTex.
-
drawSubTex
public static void drawSubTex(Renderer renderer, SubTex subTex, int x, int y, int width, int height, boolean flipVertical, ReadOnlyTransform appliedTransform) Draw the given SubTex, optionally inverted on the Y axis, to the screen at the given location. Use the given width and height instead of those supplied in the SubTex.- Parameters:
renderer
- the renderer to usesubTex
- the SubTex to drawx
- the x offset to draw aty
- the y offset to draw atwidth
- the width in screen pixels to use when drawing the SubTex.height
- the height in screen pixels to use when drawing the SubTex.flipVertical
- if true, invert the image vertically before drawingappliedTransform
- an optional transform to apply to the rendered subtex
-
drawSubTex
public static void drawSubTex(Renderer renderer, SubTex subTex, int x, int y, int width, int height, boolean flipVertical, ReadOnlyTransform appliedTransform, ReadOnlyColorRGBA tintOverride) Draw the given SubTex, optionally inverted on the Y axis, to the screen at the given location. Use the given width and height instead of those supplied in the SubTex.- Parameters:
renderer
- the renderer to usesubTex
- the SubTex to drawx
- the x offset to draw aty
- the y offset to draw atwidth
- the width in screen pixels to use when drawing the SubTex.height
- the height in screen pixels to use when drawing the SubTex.flipVertical
- if true, invert the image vertically before drawingappliedTransform
- an optional transform to apply to the rendered subtextintOverride
- an optional override for the SubTex tintColor.
-
drawTransformedSubTex
public static void drawTransformedSubTex(Renderer renderer, TransformedSubTex subTex, int x, int y, int width, int height, boolean flipVertical, ReadOnlyTransform appliedTransform) Draw the given TransformedSubTex, optionally inverted on the Y axis, to the screen at the given location. Use the given width and height instead of those supplied in the TransformedSubTex.- Parameters:
renderer
- the renderer to usesubTex
- the TransformedSubTex to drawx
- the x coordinate of the screen location to draw aty
- the y coordinate of the screen location to draw atwidth
- the width in screen pixels to use when drawing the TransformedSubTex.height
- the height in screen pixels to use when drawing the TransformedSubTex.flipVertical
- if true, invert the image vertically before drawingappliedTransform
- an optional transform to apply to the rendered subtex
-