AcediaDocumentation

DrawingImmediate.FilledRectangle

Draws a filled rectangle 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.FilledRectangle(position: Vector2, size: Vector2, color: Color3, opacity: number): ()

Parameters

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

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

On this page