drawGlyph

actual fun DrawScope.drawGlyph(atlasRect: Rect, destOffset: Offset, destSize: Size, color: Color, shadow: Shadow?)

Draws a glyph from the atlas to the canvas with optional shadow.

Parameters

atlasRect

Source rectangle in the atlas

destOffset

Destination position on canvas

destSize

Destination size for scaling

color

Text color

shadow

Optional shadow configuration

expect fun ERROR CLASS: Symbol not found for DrawScope.drawGlyph(atlasRect: ERROR CLASS: Symbol not found for Rect, destOffset: ERROR CLASS: Symbol not found for Offset, destSize: ERROR CLASS: Symbol not found for Size, color: ERROR CLASS: Symbol not found for Color, shadow: ERROR CLASS: Symbol not found for Shadow?? = null)

Draws a glyph from the atlas to the canvas. Uses SDF rendering for crisp text at any scale.

Parameters

scope

The DrawScope to draw into

atlasRect

The source rectangle in the atlas (x, y, width, height from NativeLayoutResult.atlas_rects)

destOffset

The destination position on canvas

destSize

The destination size (for scaling)

color

The text color to render

actual fun DrawScope.drawGlyph(atlasRect: Rect, destOffset: Offset, destSize: Size, color: Color, shadow: Shadow?)

Draws a glyph from the atlas to the canvas with optional shadow.

Parameters

atlasRect

Source rectangle in the atlas

destOffset

Destination position on canvas

destSize

Destination size for scaling

color

Text color

shadow

Optional shadow configuration