DrawingImmediate.Line
Draws a line.
Syntax
DrawingImmediate.Line(from: any, to: any, color: Color3, thickness?: number) -> nil
Parameters
| Parameter | Type | Description |
|---|---|---|
from | any | The from value used by the call. |
to | any | The to value used by the call. |
color | Color3 | The color value used by the call. |
thickness? | number | The thickness value used by the call. |
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
DrawingImmediate.Line is part of the DrawingImmediate library. Immediate drawing runs inside a paint callback registered with DrawingImmediate.GetPaint(); primitives are emitted for the current frame only.
The operation is performed immediately using the arguments supplied at the call site.
Example
-- inside a DrawingImmediate.GetPaint():Connect callback
DrawingImmediate.Line(Vector2.new(10, 10), Vector2.new(200, 10), Color3.new(1, 0, 0), 2)
Notes
- Draw calls must run inside a callback registered with DrawingImmediate.GetPaint().