getTextExtent

<point2> getTextExtent <string> removeUiScaling:<bool> useQtTextWidth:<bool>

Returns a Point2 value containing the size of the string in pixels if it was displayed in a command panel.

NEW in 3ds Max 2017: By default, any UI scaling performed when the display is DPI scaled above 100% is removed. Set removeUiScaling to false to get the size of the string when scaled.

If useQtTextWidth is true (the default), the text extent width is calculated by QtApplication->fontMetrics().width(text).

   

<Point2> getQtTextExtent <string> removeUIScaling:<true>

Returns a Point2 value containing the text extents (bounding box) in pixels if it was displayed in a command panel, as calculated by QtApplication->fontMetrics().boundingRect(string).

NEW in 3ds Max 2017: By default, any UI scaling performed when the display is DPI scaled above 100% is removed. Set removeUIScaling to false to get the size of the string when scaled.

   

<bool> PushQtTranslationFromFile <filename>
PopQtTranslationFromFile()

NEW in 3ds Max 2017: For internal use only. These translations can be pushed onto an internal stack. Qt searches this stack in reverse order for an appropriate translation entry.

Example:
PushQtTranslationFromFile "d:/core_de-DE.qm"

See Also