On this pageDrawingGetTextSize Gets the text size needed to fit inside a given width according to the current font. This function is memoized because <code>MainCanvas.measureText(Text)</code> is a major resource hog.@paramText to draw@paramWidth in which the text has to fit@returnsText to draw and its font sizeCallableDrawingGetTextSize(Text, Width): [text: string, size: number]ParametersText: stringWidth: numberReturns [text: string, size: number]Index MethodsclearCacheMethods clearCacheclearCache(): voidClears the cache of the memoized functionReturns void
Gets the text size needed to fit inside a given width according to the current font. This function is memoized because
Text to draw
Width in which the text has to fit