Drawing.new
type is one of "Line", "Text", "Circle", "Square", "Triangle", "Quad".
Syntax
Drawing.new(type: string) -> Drawing
Parameters
| Parameter | Type | Description |
|---|---|---|
type | string | The type value used by the call. |
Returns
| Type | Description |
|---|---|
Drawing | Drawing |
Description
Drawing.new is part of the Drawing API library. Drawing objects are managed by the external overlay renderer and persist until removed.
Each call creates or returns a fresh object or value that you can store and pass to other functions.
Example
local box = Drawing.new("Square")
box.Position = Vector2.new(100, 100)
box.Size = Vector2.new(160, 220)
box.Color = Color3.fromRGB(120, 130, 255)
box.Thickness = 2
box.Visible = true
Notes
- Drawing objects persist until removed or cleared.
- Triangle uses
PointA,PointB,PointC; Quad addsPointD. Both supportFilledand outlineThickness.