Drawing.beginframe
Begins a batch of Drawing updates.
Syntax
Signature
Drawing.beginframe() -> userdataAliases
This function has no aliases.
Parameters
This function takes no parameters.
Returns
| Type | Description |
|---|---|
userdata | Batch token for the current coroutine. |
Notes
Changed objects are published together by endframe. Only one batch can be active on a coroutine at a time. Keep the returned token until the batch is closed.
Example
Luau
local Token = Drawing.beginframe()
local Line = Drawing.new("Line")
Line.From = Vector2.new(10, 10)
Line.To = Vector2.new(100, 100)
Line.Visible = true
Drawing.endframe(Token)