Class Shaper.CircleShape

java.lang.Object
ActiverseUtils.Shaper.CircleShape
Enclosing class:
Shaper

public static class Shaper.CircleShape extends Object
Represents a circle shape configuration.
Version:
1.4.1
Author:
Knivier
  • Constructor Details

    • CircleShape

      public CircleShape(int diameter)
      Creates a circle shape with the specified diameter.
      Parameters:
      diameter - The diameter of the circle
  • Method Details

    • withFillColor

      public Shaper.CircleShape withFillColor(Color color)
      Sets the fill color of the circle.
      Parameters:
      color - The color to fill the circle with
      Returns:
      This CircleShape instance for method chaining
    • withOutlineColor

      public Shaper.CircleShape withOutlineColor(Color color)
      Sets the outline color of the circle.
      Parameters:
      color - The color for the circle outline
      Returns:
      This CircleShape instance for method chaining
    • withOutlineWidth

      public Shaper.CircleShape withOutlineWidth(int width)
      Sets the outline width of the circle.
      Parameters:
      width - The width of the outline in pixels
      Returns:
      This CircleShape instance for method chaining
    • getDiameter

      public int getDiameter()
      Gets the diameter of the circle.
      Returns:
      The diameter
    • getFillColor

      public Color getFillColor()
      Gets the fill color.
      Returns:
      The fill color
    • getOutlineColor

      public Color getOutlineColor()
      Gets the outline color.
      Returns:
      The outline color, or null if not set
    • getOutlineWidth

      public int getOutlineWidth()
      Gets the outline width.
      Returns:
      The outline width
    • paint

      public void paint(Graphics g, int x, int y)
      Paints the circle on the given graphics context at the specified position.
      Parameters:
      g - The graphics context to draw on
      x - The x-coordinate of the circle (top-left corner of bounding box)
      y - The y-coordinate of the circle (top-left corner of bounding box)
    • getBoundingBox

      public Rectangle getBoundingBox(int x, int y)
      Creates a bounding box rectangle for collision detection.
      Parameters:
      x - The x-coordinate of the circle
      y - The y-coordinate of the circle
      Returns:
      A Rectangle representing the bounding box