Class DrawingHelper

java.lang.Object
games.stendhal.client.gui.j2d.entity.helpers.DrawingHelper

public class DrawingHelper extends Object
Helper class for drawing sprites with a certain alignment in a certain area
Author:
madmetzger
  • 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 draw
      horizontalAlign - (left, center, right)
      verticalAlign - (top, middle, bottom)
      x -
      y -
      width -
      height -