Drawing
Draw text, images, lines and geometric primitives.
Primitive properties
| Type | Properties | Description |
|---|---|---|
| Line | From, To: Vector2; Thickness: number | Line between two client-space points. |
| Square / Panel | Position, Size: Vector2; Filled: boolean; Thickness: number | Filled or outlined rectangle. |
| Circle | Position: Vector2; Radius, NumSides, Thickness: number; Filled: boolean | Circle with a configurable segment count. |
| Triangle | PointA, PointB, PointC: Vector2; Filled: boolean; Thickness: number | Three-point polygon. |
| Quad | PointA, PointB, PointC, PointD: Vector2; Filled: boolean; Thickness: number | Four-point polygon. |
| Text | Text: string; Position: Vector2; Size, Font: number | Also supports Center/Centered, Outline/Outlined, OutlineColor, OutlineOpacity and read-only TextBounds. |
| Image | Data, Uri: string; Position, Size: Vector2; Rounding: number | Read-only Loaded indicates image decoding. PNG, JPEG, BMP and the first GIF frame are supported. |
Drawing.Fonts
| Name | Value | Description |
|---|---|---|
| UI | 0 | Built-in UI font. |
| System | 1 | Tahoma, with a default-font fallback. |
| Plex | 2 | Arial, with a default-font fallback. |
| Monospace | 3 | Consolas, with a default-font fallback. |
| SourceSans | 4 | Bundled Source Sans Pro. |
Available functions
cleardrawcacheRemoves all native Drawing primitives.Drawing.beginframeBegins a batch of Drawing updates.Drawing.endframePublishes a batch of Drawing updates.Drawing.getassetLoads a bundled Drawing icon.Drawing.newCreates a Drawing object.Drawing.supportsblurChecks whether backdrop blur is supported.getrenderpropertyReads a Drawing property.isrenderobjChecks whether a Drawing primitive is still live.Object:RemoveRemoves a Drawing primitive.setrenderpropertyChanges a Drawing property.