Dabo.ui.fontMetricFromDrawObject

From Dabo Wiki
Revision as of 16:05, 14 May 2020 by Ed (talk | contribs) (Created page with "== Signature: == <syntaxhighlight lang="python"> dabo.ui.fontMetricFromDrawObject(obj) </syntaxhighlight> == Description: == Given a drawn text object, returns the width and...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Signature:

dabo.ui.fontMetricFromDrawObject(obj)

Description:

Given a drawn text object, returns the width and height of the text. See the section on DrawObjects for information on the drawText() function.

Returns:

A 2-tuple containing the (width, height) of the specified drawn object.

Comments:

If you're using the drawing primitives to create text, this method will take the drawn object and return the size of the text as it will be drawn.