X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/api/Ext.util.TextMetrics.html diff --git a/docs/api/Ext.util.TextMetrics.html b/docs/api/Ext.util.TextMetrics.html new file mode 100644 index 00000000..93252833 --- /dev/null +++ b/docs/api/Ext.util.TextMetrics.html @@ -0,0 +1,112 @@ +
+Provides precise pixel measurements for blocks of text so that you can determine exactly how high and +wide, in pixels, a given block of text will be. Note that when measuring text, it should be plain text and +should not contain any HTML, otherwise it may not be measured correctly.
+ + + + +The measurement works by copying the relevant CSS styles that can affect the font related display, +then checking the size of an element that is auto-sized. Note that if the text is multi-lined, you must +provide a fixed width when doing the measurement.
+ + + + ++If multiple measurements are being done on the same element, you create a new instance to initialize +to avoid the overhead of copying the styles to the element repeatedly. +
+ +
The element to bind to.
+A fixed width to apply to the measuring element.
+Binds this TextMetrics instance to a new element
+Binds this TextMetrics instance to a new element
+The element
+Returns the measured height of the specified text
+Returns the measured height of the specified text
+The text to measure
+height The height in pixels
+Only available on the instance returned from createInstance, not on the singleton.
+ + +Returns the size of the specified text based on the internal element's style and width properties
+The text to measure
+An object containing the text's size {width: (width), height: (height)}
+Returns the measured width of the specified text
+Returns the measured width of the specified text
+The text to measure
+width The width in pixels
+Measures the size of the specified text
+Measures the size of the specified text
+The element, dom node or id from which to copy existing CSS styles +that can affect the size of the rendered text
+The text to measure
+(optional) If the text will be multiline, you have to set a fixed width +in order to accurately measure the text height
+An object containing the text's size {width: (width), height: (height)}
+Sets a fixed width on the internal measurement element. If the text will be multiline, you have +to set a fixed width in order to accurately measure the text height.
+The width to set on the element
+