Skip to main content

FontOperationTextImageBoundsOnCanvas

Type

operator

Summary

Measure text precisely when drawn to a canvas.

Syntax

the image bounds of text <mText> on <mCanvas>

Description

The exact bounds of the text, which will fully enclose each character.

note

This can be more time-consuming to compute than the layout bounds.

Parameters

NameTypeDescription

mText

An expression which evaluates to a string.

mCanvas

An expression which evaluates to a canvas.

Examples

// Set the canvas font
set the font of this canvas to font "Arial" at size 18

variable tBounds as Rectangle
put the image bounds of text "Sample text" on this canvas into tBounds
Thank you for your feedback!

Was this page helpful?