Class SubTexUtil

java.lang.Object
com.ardor3d.extension.ui.util.SubTexUtil

public class SubTexUtil extends Object
SubTexUtil is a utility for drawing SubTex objects to a renderer.
  • Constructor Details

    • SubTexUtil

      public SubTexUtil()
  • Method Details

    • drawSubTex

      public static void drawSubTex(Renderer renderer, SubTex subTex, int x, int y)
      Draw the given SubTex, as-is, to the screen at the given location.
      Parameters:
      renderer - the renderer to use
      subTex - the SubTex to draw
      x - the x coordinate of the screen location to draw at
      y - 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 use
      subTex - the SubTex to draw
      x - the x coordinate of the screen location to draw at
      y - the y coordinate of the screen location to draw at
      width - 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 use
      subTex - the SubTex to draw
      x - the x coordinate of the screen location to draw at
      y - the y coordinate of the screen location to draw at
      width - 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 use
      subTex - the SubTex to draw
      x - the x coordinate of the screen location to draw at
      y - the y coordinate of the screen location to draw at
      width - 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
      tintOverride - 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 use
      subTex - the SubTex to draw
      x - the x coordinate of the screen location to draw at
      y - the y coordinate of the screen location to draw at
      width - 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 use
      subTex - the SubTex to draw
      x - the x offset to draw at
      y - the y offset to draw at
      width - 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 drawing
      appliedTransform - 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 use
      subTex - the SubTex to draw
      x - the x offset to draw at
      y - the y offset to draw at
      width - 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 drawing
      appliedTransform - an optional transform to apply to the rendered subtex
      tintOverride - 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 use
      subTex - the TransformedSubTex to draw
      x - the x coordinate of the screen location to draw at
      y - the y coordinate of the screen location to draw at
      width - 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 drawing
      appliedTransform - an optional transform to apply to the rendered subtex