AAtlas
Open navigation
Matcha/Reference/Drawing

Drawing

The following snippet will display a red square on the user's screen for 5 seconds.

lua
local square = Drawing.new("Square")
square.Filled = true
square.Color = Color3.fromRGB(255, 0, 0)
square.Position = Vector2.new(20, 20)
square.Size = Vector2.new(200, 200)
square.Visible = true
square.Corner = 20
wait(5)
square:Remove()

Drawing.new

lua
Drawing.new(drawingType: string): DrawingObject

The documented rendering types are:

  • Square
  • Line
  • Circle
  • Text
  • Triangle
  • Image
  • Quad

Matcha 1.0.0 does not validate drawingType at construction time: even Drawing.new("__MatchaInvalidType") returned a removable proxy. Successful construction alone does not prove that a type renders.

DrawingObject

Methods

Remove

lua
function DrawingObject:Remove(): nil

Base properties

Shared set of properties across all DrawingObject types

Color

lua
DrawingObject.Color: Color3

Color writes succeeded on every tested Drawing object, but reading Color returned nil. Treat it as write-only unless your target build proves otherwise.

Transparency

lua
DrawingObject.Transparency: number

Visible

lua
DrawingObject.Visible: bool

Position

lua
DrawingObject.Position: Vector2

ZIndex

lua
DrawingObject.ZIndex: int

Square properties

Size

lua
DrawingObject.Size: Vector2

Filled

lua
DrawingObject.Filled: bool

Thickness

lua
DrawingObject.Thickness: number

Controls the square outline width when Filled is false.

Corner

lua
DrawingObject.Corner: number

Rounds the square's corners. Larger values produce more rounding.

Line properties

From

lua
DrawingObject.From: Vector2

To

lua
DrawingObject.To: Vector2

Thickness

lua
DrawingObject.Thickness: int

Circle properties

Radius

lua
DrawingObject.Radius: float

NumSides

lua
DrawingObject.NumSides: int

Thickness

lua
DrawingObject.Thickness: int

Filled

lua
DrawingObject.Filled: bool

Controls whether the circle is filled or rendered as an outline.

Text properties

Text

lua
DrawingObject.Text: string

Outline

lua
DrawingObject.Outline: bool

Center

lua
DrawingObject.Center: bool

Font

lua
DrawingObject.Font: Font

Size

lua
DrawingObject.Size: number

Matcha 1.0.0 uses Size for text size. Writing FontSize raised Unknown property FontSize.

TextBounds

lua
DrawingObject.TextBounds: Vector2

Readable computed text bounds. With Text = "Matcha Audit" and Size = 16, the audit returned Vector2(84, 13).

Triangle properties

PointA

lua
DrawingObject.PointA: Vector2

PointB

lua
DrawingObject.PointB: Vector2

PointC

lua
DrawingObject.PointC: Vector2

Thickness

lua
DrawingObject.Thickness: number

Filled

lua
DrawingObject.Filled: bool

Image properties

Data

lua
DrawingObject.Data: string

The raw binary string of the image data (e.g. loaded via game:HttpGet).

Image Size

lua
DrawingObject.Size: Vector2

The width and height of the image (defaults to 50x50).

Rounding

lua
DrawingObject.Rounding: number

The rounding radius of the image corners (defaults to 0).

lua
local image = Drawing.new("Image")
image.Data = game:HttpGet("https://example.com/image.png")
image.Size = Vector2.new(120, 120)
image.Rounding = 18
image.Visible = true

Corner

lua
DrawingObject.Corner: number

Accepted as an alternate image-corner value. Prefer Rounding in new code because it clearly describes the image behavior.

Radius

lua
DrawingObject.Radius: number

Accepted as another image-corner radius value. Prefer Rounding for readability.

Quad

Drawing.new("Quad") is visually verified in Matcha. Its four independently movable points can form any four-sided ESP shape.

Properties

lua
Quad.PointA: Vector2
Quad.PointB: Vector2
Quad.PointC: Vector2
Quad.PointD: Vector2
Quad.Thickness: number
Quad.Filled: boolean
lua
local quad = Drawing.new("Quad")
quad.PointA = Vector2.new(100, 100)
quad.PointB = Vector2.new(220, 90)
quad.PointC = Vector2.new(240, 210)
quad.PointD = Vector2.new(90, 220)
quad.Filled = false
quad.Thickness = 2
quad.Color = Color3.fromRGB(255, 255, 255)
quad.Visible = true

Candidate Polygon surface

Drawing.new("Polygon") returned a proxy whose properties could be assigned and read back, but Polygon rendering has not been visually tested. The constructor also accepts invalid type names, so proxy creation alone is not rendering proof.

lua
Polygon.PointA: Vector2
Polygon.PointB: Vector2
Polygon.PointC: Vector2
Polygon.PointD: Vector2
Polygon.NumSides: number
Polygon.Thickness: number
Polygon.Filled: boolean

Polygon.Points, Polygon.Vertices, and Polygon.Sides were rejected in the tested build.

Fonts

lua
Drawing.Fonts.UI = 0               -- ProggyClean
Drawing.Fonts.System = 1           -- San Francisco
Drawing.Fonts.SystemBold = 2       -- SF Bold
Drawing.Fonts.Minecraft = 4        -- Minecraft
Drawing.Fonts.Monospace = 5        -- JetBrains
Drawing.Fonts.Pixel = 7            -- Pixel
Drawing.Fonts.Fortnite = 8         -- Fortnite
Drawing.Fonts.ProximaSoftBold = 11 -- Proxima Soft Bold