Package games.stendhal.client.sprite
Class FlippedSprite
java.lang.Object
games.stendhal.client.sprite.FlippedSprite
- All Implemented Interfaces:
Sprite
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRegion(int x, int y, int width, int height, Object ref) Create a sub-region of this sprite.voidDraw the sprite onto the graphics context provided.voidDraws the image.intGet the height of the drawn sprite.Get the sprite reference.intgetWidth()Get the width of the drawn sprite.booleanCheck whether the sprite won't change between draws.
-
Constructor Details
-
FlippedSprite
-
-
Method Details
-
createRegion
Description copied from interface:SpriteCreate a sub-region of this sprite. NOTE: This does not use caching.- Specified by:
createRegionin interfaceSprite- 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
Description copied from interface:SpriteDraw the sprite onto the graphics context provided. -
draw
Description copied from interface:SpriteDraws the image. -
getHeight
public int getHeight()Description copied from interface:SpriteGet the height of the drawn sprite. -
getReference
Description copied from interface:SpriteGet the sprite reference. This identifier is an externally opaque object that implements equals() and hashCode() to uniquely/repeatably reference a keyed sprite.- Specified by:
getReferencein interfaceSprite- Returns:
- The reference identifier, or
nullif not referencable.
-
getWidth
public int getWidth()Description copied from interface:SpriteGet the width of the drawn sprite. -
isConstant
public boolean isConstant()Description copied from interface:SpriteCheck whether the sprite won't change between draws.- Specified by:
isConstantin interfaceSprite- Returns:
trueif different draws of the sprite always have the same result.
-