Drawing
Persistent drawing objects, fonts and render properties.
Creates a Line, Text, Circle, Square, Triangle, Quad or Image object.
local box = Drawing.new("Square")
box.Size = Vector2.new(120, 80)
box.Position = Vector2.new(100, 100)
box.Color = Color3.new(1, 1, 1)
box.Visible = true
Font constants: UI, System, Plex, Monospace.
local label = Drawing.new("Text")
label.Text = "Yuari"
label.Font = Drawing.Fonts.Monospace
label.Visible = true
Removes a drawing object.
local box = Drawing.new("Square")
box:Remove()
local line = Drawing.new("Line")
line:Destroy()
Reads or writes drawing render properties and checks render objects.
local line = Drawing.new("Line")
print(isrenderobj(line))
print(getrenderproperty(line, "Visible"))
setrenderproperty(line, "Visible", true)
Common properties
| Property | Applies to | Description |
|---|---|---|
| Visible | All | Visibility. |
| Transparency | All | 0-1 alpha. |
| ZIndex | All | Draw order. |
| Thickness | Line, Circle, Triangle, Quad, Rectangle | Stroke width. |
| Color | All | Color3 value. |
| From / To | Line | Endpoints. |
| Text / Size / Center / Outline / OutlineColor / Font / TextBounds | Text | Text styling and bounds. |
| Position | Text, Circle, Square, Image | Position. |
| Radius / NumSides / Filled | Circle | Circle geometry. |
| Size / Filled | Square | Rectangle geometry. |
| PointA ... PointD / Filled | Triangle, Quad | Vertices. |
| Rounding / Rotation / Data / Uri / Url | Image | Image geometry and source. |