FontOperationTextLayoutBoundsOnCanvas |
Type | operator |
Dictionary | LCB |
Library | LiveCode Builder |
Syntax | the [ layout ] bounds of text <mText> on <mCanvas>
|
Associations | com.livecode.canvas |
Summary | Measure text when drawn to a canvas.
|
Parameters | Name | Type | Description |
---|
mText | | An expression which evaluates to a string.
|
mCanvas | | An expression which evaluates to a canvas.
|
|
Example |
set the font of this canvas to font "Arial" at size 18
variable tBounds as Rectangle
put the bounds of text "Sample text" on this canvas into tBounds
|
Values | Name | Type | Description |
---|
return | | The bounding box of mText when drawn at point 0,0 with the current font of mCanvas. Returns the bounds as a rectangle.
|
|
Description | The layout bounds of the text, constructed from the ascent and descent values of the font, and the width of the text string.
Note: The layout bounds is used to position blocks of text relative to each other, so the text may overlap these bounds.
|
Tags | canvas |