CanvasOperationMeasureText

Typestatement
DictionaryLCB
LibraryLiveCode Builder
Syntax
measure <mText> on <mCanvas>
Associationscom.livecode.canvas
Summary

Measure text when drawn to a canvas.

Parameters
NameTypeDescription
mText

An expression which evaluates to a string.

mCanvas

An expression which evaluates to a canvas.

Example
// Measure text drawn on the canvas
variable tBounds as Rectangle
measure "Sample text" on this canvas
put the result into tBounds
Values
NameTypeDescription
return

The bounding box of mText when drawn at point 0,0 with the current font of mCanvas. Returns the bounds as a rectangle in the result.

Description

Measure text when drawn to a canvas.

Tagscanvas