Dabo.ui.fontMetricFromDrawObject

From Dabo Wiki
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.