Drawing
Create persistent drawing objects or submit transient primitives during paint events. Drawing.new lists the properties available for each object kind; font and shader methods handle custom resources.
21 functions
What the icons meanDrawFont:GetTextBoundsSynchronousEstimate the space needed for a string at a chosen size. It can help reserve a label area before drawing, but leave some margin around the result.
DrawFont.RegisterSynchronousRegister font-file bytes and receive a handle you can assign to the Font property of a Text drawing. Use it when built-in fonts do not fit the text you want to display.
Drawing.clearSynchronousRemove every active drawing object at once. This is useful when a script is tearing down an entire overlay or resetting its drawing state.
Drawing.newSynchronousCreate a drawing that stays on screen until you update or remove it. Use it for a label, shape, or image whose properties can change over time; it is separate from Roblox Instances and has no Parent.
DrawingImmediate.CircleSynchronousDraw an unfilled ring around a screen point. Use the radius for its size and thickness for the visible outline.
DrawingImmediate.FilledCircleSynchronousDraw a solid circular marker for the current frame. It works well for a point of interest or a status dot that changes position or color.
DrawingImmediate.FilledQuadSynchronousFill a four-corner shape with vertices a, b, c, and d. Use it for a slanted panel or another area whose corners cannot be described by one position and size.
DrawingImmediate.FilledRectangleSynchronousDraw a filled rectangle for one frame. It can provide a panel background, progress segment, or other solid area behind changing content.
DrawingImmediate.FilledTriangleSynchronousFill the area between three screen points. A filled triangle can serve as a compact arrowhead or another directional accent.
DrawingImmediate.GetPaintSynchronousGet the paint event used for immediate drawing. Connect a listener when shapes depend on current frame state, and disconnect it when the overlay should disappear.
DrawingImmediate.LineSynchronousDraw a straight segment between two screen points for the current frame. It is useful for a divider, underline, or connector whose endpoints move.
DrawingImmediate.OutlinedTextSynchronousSubmit text with a separately colored outline for one frame. A dark outline can help a light label remain readable over a changing background.
DrawingImmediate.QuadSynchronousDraw the border of a four-corner shape, joining a, b, c, and d in order. It is useful when a box is skewed or its edges are not axis aligned.
DrawingImmediate.RectangleSynchronousDraw a rectangle border from an upper-left position and dimensions. Use it for a panel edge or selection outline without covering what is inside.
DrawingImmediate.TextSynchronousSubmit a line of text for the current frame. Use it when a label’s text or position changes continuously and a persistent Text drawing would need frequent property updates.
DrawingImmediate.TriangleSynchronousDraw the three edges joining screen points a, b, and c. Use an outline when the interior should remain visible beneath a pointer or marker.
DrawingObject:RemoveSynchronousPermanently remove this one drawing. Call it when an overlay element closes or a temporary marker has served its purpose; the rest of your drawings remain.
getrenderpropertySynchronousRead a drawing property when its name comes from data rather than fixed code. This is useful for a settings inspector or a small editor that displays several kinds of drawings.
isrenderobjSynchronousCheck whether a value is a drawing handle that still refers to a live object. This is useful before updating a handle kept in a table after some objects may have been removed.
setrenderpropertySynchronousAssign a drawing property by name. Use it when a control or configuration record decides which property to change at runtime.
Shader:CreateSynchronousCompile the Vertex and Pixel source currently assigned to a Shader drawing. Call it after setting both strings; changing source text alone does not compile it.