DrawingImmediate.FilledQuad Synchronous

Fill a four-sided shape enclosed by vertices a, b, c, and d in order. Use it for a filled four-corner panel or skewed shape. Supply vertices in perimeter order to avoid a self-crossing polygon.

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

Parameters

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

Returns

()

This function returns no values.

Usage notes

Immediate drawings last for one paint cycle. Call this function again from a GetPaint listener to keep the drawing visible; there is no object handle to update or remove.

Example

Example
Luau
local color = Color3.fromRGB(240, 150, 190)
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), color, 0.8)
end)
task.wait(3)
connection:Disconnect() -- stop drawing this example
Kawaii documentation