<point2> getTextExtent <string> removeUiScaling:<boolean> useQtTextWidth:<boolean>
Returns a Point2 value containing the size of the string in pixels if it was displayed in a command panel.
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.Available in in 3ds Max 2017 and higher.
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)
.
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. Available in in 3ds Max 2017 and higher.