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.
Luau
DrawingImmediate.FilledQuad(
a: Vector2,
b: Vector2,
c: Vector2,
d: Vector2,
color: Color3,
opacity: number
) -> ()Parameters
| Parameter | Type | Description |
|---|---|---|
a | Vector2 | First perimeter vertex. |
b | Vector2 | Second perimeter vertex. |
c | Vector2 | Third perimeter vertex. |
d | Vector2 | Fourth perimeter vertex. |
color | Color3 | Color3 of the primitive or text. |
opacity | number | Opacity 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
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)