AcediaDocumentation

DrawingImmediate.Rectangle

Draws a rectangle outline during the current paint callback.

Must run inside a GetPaint signal callback. This returns no retained object; redraw on every paint and disconnect the callback to stop drawing.

DrawingImmediate.Rectangle(position: Vector2, size: Vector2, color: Color3, opacity: number, thickness: number): ()

Parameters

ParameterTypeDescription
positionVector2Top-left corner.
sizeVector2Width and height.
colorColor3Stroke color.
opacitynumber0 is invisible; 1 is opaque. Values are clamped.
thicknessnumberStroke thickness.

Errors: Calling outside a paint callback or supplying incompatible argument types raises an error.

On this page