Class ShapeRenderer

java.lang.Object
de.gurkenlabs.litiengine.graphics.ShapeRenderer

public final class ShapeRenderer extends Object
  • Field Details

    • DEFAULT_STROKE

      public static final Stroke DEFAULT_STROKE
  • Method Details

    • render

      public static void render(Graphics2D g, Shape shape)
      Renders the specified Shape to the given Graphics2D object.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape to be drawn.
    • render

      public static void render(Graphics2D g, Shape shape, double x, double y)
      Renders the specified Shape to the given Graphics2D object at the specified coordinates.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape to be drawn.
      x - The x-coordinate of the shape.
      y - The y-coordinate of the shape.
    • render

      public static void render(Graphics2D g, Shape shape, Point2D location)
      Renders the specified Shape to the given Graphics2D object at the specified location.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape to be drawn.
      location - The location where the shape will be drawn.
    • renderOutline

      public static void renderOutline(Graphics2D g, Shape shape)
      Renders the outline of the specified Shape to the given Graphics2D object.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape whose outline is to be drawn.
    • renderOutline

      public static void renderOutline(Graphics2D g, Shape shape, float stroke)
      Renders the outline of the specified Shape to the given Graphics2D object with the specified stroke width.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape whose outline is to be drawn.
      stroke - The stroke width for the outline.
    • renderOutline

      public static void renderOutline(Graphics2D g, Shape shape, Stroke stroke)
      Renders the outline of the specified Shape to the given Graphics2D object with the specified stroke.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape whose outline is to be drawn.
      stroke - The stroke for the outline.
    • renderTransformed

      public static void renderTransformed(Graphics2D g, Shape shape, AffineTransform transform)
      Renders the specified Shape to the given Graphics2D object with a custom affine transformation.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape to be drawn.
      transform - The affine transformation to be applied to the shape.
    • renderOutlineTransformed

      public static void renderOutlineTransformed(Graphics2D g, Shape shape, AffineTransform transform)
      Renders the outline of the specified Shape to the given Graphics2D object with a custom affine transformation.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape whose outline is to be drawn.
      transform - The affine transformation to be applied to the shape.
    • renderOutlineTransformed

      public static void renderOutlineTransformed(Graphics2D g, Shape shape, AffineTransform transform, float stroke)
      Renders the outline of the specified Shape to the given Graphics2D object with a custom affine transformation and stroke width.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape whose outline is to be drawn.
      transform - The affine transformation to be applied to the shape.
      stroke - The stroke width for the outline.
    • renderOutlineTransformed

      public static void renderOutlineTransformed(Graphics2D g, Shape shape, AffineTransform transform, Stroke stroke)
      Renders the outline of the specified Shape to the given Graphics2D object with a custom affine transformation and stroke.
      Parameters:
      g - The graphics object to draw on.
      shape - The shape whose outline is to be drawn.
      transform - The affine transformation to be applied to the shape.
      stroke - The stroke for the outline.