Yuari
Documentation
Docs/Drawing API/Drawing.new

Drawing.new

type is one of "Line", "Text", "Circle", "Square", "Triangle", "Quad".

Syntax

Drawing.new(type: string) -> Drawing

Parameters

ParameterTypeDescription
typestringThe type value used by the call.

Returns

TypeDescription
DrawingDrawing

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 adds PointD. Both support Filled and outline Thickness.