Yuari
Documentation
Docs/DrawingImmediate/DrawingImmediate.Text

DrawingImmediate.Text

Draws text.

Syntax

DrawingImmediate.Text(pos: Vector2, text: string, color: Color3, size?: any, font?: any) -> nil

Parameters

ParameterTypeDescription
posVector2The pos value used by the call.
textstringThe text value to process.
colorColor3The color value used by the call.
size?anyThe size of the object or buffer.
font?anyThe font value used by the call.

Returns

TypeDescription
nilThis function does not return a value.

Description

DrawingImmediate.Text is part of the DrawingImmediate library. Immediate drawing runs inside a paint callback registered with DrawingImmediate.GetPaint(); primitives are emitted for the current frame only.

The operation is performed immediately using the arguments supplied at the call site.

The aliases OutlinedText(pos, text, color, outlineColor?, size?) resolve to the same implementation.

Example

-- inside a DrawingImmediate.GetPaint():Connect callback
DrawingImmediate.Text(Vector2.new(20, 40), "Yuari", Color3.new(1, 1, 1), 18)
DrawingImmediate.OutlinedText(Vector2.new(20, 70), "Yuari", Color3.new(1, 1, 1), Color3.new(0, 0, 0), 18)

Notes

  • Aliases: OutlinedText(pos, text, color, outlineColor?, size?).
  • Draw calls must run inside a callback registered with DrawingImmediate.GetPaint().