Class DrawingHelper
java.lang.Object
games.stendhal.client.gui.j2d.entity.helpers.DrawingHelper
Helper class for drawing sprites with a certain alignment in a certain area
- Author:
- madmetzger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voiddrawAlignedSprite(Graphics2D g2d, Sprite sprite, HorizontalAlignment horizontalAlign, VerticalAlignment verticalAlign, int x, int y, int width, int height) Align a sprite in a defined area, which is defined by upper left corner (x,y) and width to the right and height downwards
-
Constructor Details
-
DrawingHelper
public DrawingHelper()
-
-
Method Details
-
drawAlignedSprite
public static void drawAlignedSprite(Graphics2D g2d, Sprite sprite, HorizontalAlignment horizontalAlign, VerticalAlignment verticalAlign, int x, int y, int width, int height) Align a sprite in a defined area, which is defined by upper left corner (x,y) and width to the right and height downwards- Parameters:
g2d-sprite- the sprite to drawhorizontalAlign- (left, center, right)verticalAlign- (top, middle, bottom)x-y-width-height-
-