Class FlippedSprite

java.lang.Object
games.stendhal.client.sprite.FlippedSprite
All Implemented Interfaces:
Sprite

public class FlippedSprite extends Object implements Sprite
  • Constructor Details

    • FlippedSprite

      public FlippedSprite(Sprite orig, int flags)
  • Method Details

    • createRegion

      public Sprite createRegion(int x, int y, int width, int height, Object ref)
      Description copied from interface: Sprite
      Create a sub-region of this sprite. NOTE: This does not use caching.
      Specified by:
      createRegion in interface Sprite
      Parameters:
      x - The starting X coordinate.
      y - The starting Y coordinate.
      width - The region width.
      height - The region height.
      ref - The sprite reference.
      Returns:
      A new sprite.
    • draw

      public void draw(Graphics g, int x, int y)
      Description copied from interface: Sprite
      Draw the sprite onto the graphics context provided.
      Specified by:
      draw in interface Sprite
      Parameters:
      g - The graphics context on which to draw the sprite
      x - The x location at which to draw the sprite
      y - The y location at which to draw the sprite
    • draw

      public void draw(Graphics g, int destx, int desty, int x, int y, int w, int h)
      Description copied from interface: Sprite
      Draws the image.
      Specified by:
      draw in interface Sprite
      Parameters:
      g - the graphics context where to draw to
      destx - destination x
      desty - destination y
      x - the source x
      y - the source y
      w - the width
      h - the height
    • getHeight

      public int getHeight()
      Description copied from interface: Sprite
      Get the height of the drawn sprite.
      Specified by:
      getHeight in interface Sprite
      Returns:
      The height in pixels of this sprite
    • getReference

      public Object getReference()
      Description copied from interface: Sprite
      Get the sprite reference. This identifier is an externally opaque object that implements equals() and hashCode() to uniquely/repeatably reference a keyed sprite.
      Specified by:
      getReference in interface Sprite
      Returns:
      The reference identifier, or null if not referencable.
    • getWidth

      public int getWidth()
      Description copied from interface: Sprite
      Get the width of the drawn sprite.
      Specified by:
      getWidth in interface Sprite
      Returns:
      The width in pixels of this sprite
    • isConstant

      public boolean isConstant()
      Description copied from interface: Sprite
      Check whether the sprite won't change between draws.
      Specified by:
      isConstant in interface Sprite
      Returns:
      true if different draws of the sprite always have the same result.