Drawing

Draw text, images, lines and geometric primitives.

Shared properties

PropertyTypeDescription
VisiblebooleanWhether the primitive is drawn; defaults to false.
ZIndexnumberDraw order from -10000 to 10000; higher values draw later.
ColorColor3Primitive color.
TransparencynumberOpacity: 0 is invisible and 1 is opaque.
ClippingbooleanClip drawing to ClipPosition and ClipSize.
ClipPosition / ClipSizeVector2Client-space clipping rectangle.
__OBJECT_EXISTSbooleanRead-only lifetime flag.
_idnumberRead-only primitive identifier.

Primitive properties

TypePropertiesDescription
LineFrom, To: Vector2; Thickness: numberLine between two client-space points.
Square / PanelPosition, Size: Vector2; Filled: boolean; Thickness: numberFilled or outlined rectangle.
CirclePosition: Vector2; Radius, NumSides, Thickness: number; Filled: booleanCircle with a configurable segment count.
TrianglePointA, PointB, PointC: Vector2; Filled: boolean; Thickness: numberThree-point polygon.
QuadPointA, PointB, PointC, PointD: Vector2; Filled: boolean; Thickness: numberFour-point polygon.
TextText: string; Position: Vector2; Size, Font: numberAlso supports Center/Centered, Outline/Outlined, OutlineColor, OutlineOpacity and read-only TextBounds.
ImageData, Uri: string; Position, Size: Vector2; Rounding: numberRead-only Loaded indicates image decoding. PNG, JPEG, BMP and the first GIF frame are supported.

Drawing.Fonts

NameValueDescription
UI0Built-in UI font.
System1Tahoma, with a default-font fallback.
Plex2Arial, with a default-font fallback.
Monospace3Consolas, with a default-font fallback.
SourceSans4Bundled Source Sans Pro.

Available functions