# HudShape > A solid drawn on the HUD (rectangle, circle, triangle, star) filled or outlined, at any opacity. `gg.lode.lecternapi.api.ui.HudShape` --- ## Signature ```java public class HudShape ``` --- ## Notes Shapes are ordinary HUD elements, so everything the HUD already does applies to them: they group by reference prefix, fade and scale with their group, glide with a move, and layer against text and textures. A panel behind a component is a rectangle at low opacity; a divider is a thin one; a marker is a rotated triangle. ```java api.getHUDManager().renderShape(player, new HudShape("panel:bg", Kind.RECTANGLE) .at(0, 0).size(320, 90) .color(0xFF101018).opacity(0.75f) .align(HorizontalAlignment.CENTER, VerticalAlignment.CENTER)); ``` --- ## Variants | Type | Description | |---|---| | `Kind` | The solids the client can draw. Unknown names fall back to a rectangle. Values: `RECTANGLE`, `DIAMOND` | --- ## Methods ### at ```java public HudShape at(float x, float y) ``` Position in the 1920x1080 reference space, relative to the alignment corner. | Parameter | Type | |---|---| | `x` | `float` | | `y` | `float` | --- ### size ```java public HudShape size(float width, float height) ``` | Parameter | Type | |---|---| | `width` | `float` | | `height` | `float` | --- ### layer ```java public HudShape layer(int layer) ``` | Parameter | Type | |---|---| | `layer` | `int` | --- ### color ```java public HudShape color(int argb) ``` ARGB fill or outline colour. | Parameter | Type | |---|---| | `argb` | `int` | --- ### opacity ```java public HudShape opacity(float opacity) ``` 0..1, multiplied into the colour's own alpha, so a shape can be dimmed without its colour being rewritten, and an element, its group and its animation all compose. | Parameter | Type | |---|---| | `opacity` | `float` | --- ### outline ```java public HudShape outline(float thickness) ``` Outline thickness in reference pixels; 0 or less fills the shape. | Parameter | Type | |---|---| | `thickness` | `float` | --- ### rotate ```java public HudShape rotate(float degrees) ``` Degrees clockwise about the shape's own centre. | Parameter | Type | |---|---| | `degrees` | `float` | --- ### align ```java public HudShape align(String horizontal, String vertical) ``` | Parameter | Type | |---|---| | `horizontal` | `String` | | `vertical` | `String` | --- ### getReference ```java public String getReference() ``` --- ### getKind ```java public Kind getKind() ``` --- ### getX ```java public float getX() ``` --- ### getY ```java public float getY() ``` --- ### getLayer ```java public int getLayer() ``` --- ### getWidth ```java public float getWidth() ``` --- ### getHeight ```java public float getHeight() ``` --- ### getColor ```java public int getColor() ``` --- ### getOpacity ```java public float getOpacity() ``` --- ### getThickness ```java public float getThickness() ``` --- ### getRotation ```java public float getRotation() ``` --- ### getHorizontalAlignment ```java public String getHorizontalAlignment() ``` --- ### getVerticalAlignment ```java public String getVerticalAlignment() ``` ---