DrawingImmediate.FilledQuad Synchronous

Fill a four-corner shape with vertices a, b, c, and d. Use it for a slanted panel or another area whose corners cannot be described by one position and size.

Syntax
Luau
DrawingImmediate.FilledQuad(
    a: Vector2,
    b: Vector2,
    c: Vector2,
    d: Vector2,
    color: Color3,
    opacity: number
) -> ()

Parameters

Function parameters
ParameterTypeDescription
aVector2First perimeter vertex.
bVector2Second perimeter vertex.
cVector2Third perimeter vertex.
dVector2Fourth perimeter vertex.
colorColor3Color3 of the primitive or text.
opacitynumberOpacity from 0 (invisible) to 1 (opaque).

Returns

()

No values.

Usage notes

Immediate primitives last for one paint cycle. Submit the call again from a GetPaint listener to keep it visible; there is no object handle to update or remove.

Use perimeter order rather than a self-crossing vertex order.

Example

Example
Luau
local paint = DrawingImmediate.GetPaint()
local connection = paint:Connect(function()
    DrawingImmediate.FilledQuad(Vector2.new(60, 40), Vector2.new(200, 60), Vector2.new(180, 140), Vector2.new(40, 120), Color3.fromRGB(70, 110, 180), 0.8)
end)
task.delay(3, function() connection:Disconnect() end)
Kawaii documentation