f108d73e83f95337b84294b7d24cfe0daef5a845
[roojs1] / docs / symbols / Roo.util.TextMetrics.json
1 {
2   "name" : "Roo.util.TextMetrics",
3   "augments" : [
4   ],
5   "desc" : "Provides precise pixel measurements for blocks of text so that you can determine exactly how high and\nwide, in pixels, a given block of text will be.",
6   "isSingleton" : true,
7   "isStatic" : false,
8   "isBuiltin" : false,
9   "memberOf" : "TextMetrics",
10   "example" : "",
11   "deprecated" : "",
12   "since" : "",
13   "see" : "",
14   "params" : [
15   ],
16   "returns" : [
17   ],
18   "config" : [
19   ],
20   "methods" : [
21     {
22       "name" : "createInstance",
23       "desc" : "Return a unique TextMetrics instance that can be bound directly to an element and reused.  This reduces\nthe overhead of multiple calls to initialize the style properties on each measurement.",
24       "isStatic" : false,
25       "isConstructor" : false,
26       "isPrivate" : false,
27       "memberOf" : "Roo.util.TextMetrics",
28       "example" : "",
29       "deprecated" : "",
30       "since" : "",
31       "see" : "",
32       "params" : [
33         {
34           "name" : "el",
35           "type" : "String/HTMLElement",
36           "desc" : "The element, dom node or id that the instance will be bound to",
37           "isOptional" : false
38         },
39         {
40           "name" : "fixedWidth",
41           "type" : "Number",
42           "desc" : "(optional) If the text will be multiline, you have to set a fixed width\nin order to accurately measure the text height",
43           "isOptional" : false
44         }
45       ],
46       "returns" : [
47         {
48           "name" : "",
49           "type" : "Roo.util.TextMetrics.Instance",
50           "desc" : "instance The new instance"
51         }
52       ]
53     },
54     {
55       "name" : "measure",
56       "desc" : "Measures the size of the specified text",
57       "isStatic" : false,
58       "isConstructor" : false,
59       "isPrivate" : false,
60       "memberOf" : "Roo.util.TextMetrics",
61       "example" : "",
62       "deprecated" : "",
63       "since" : "",
64       "see" : "",
65       "params" : [
66         {
67           "name" : "el",
68           "type" : "String/HTMLElement",
69           "desc" : "The element, dom node or id from which to copy existing CSS styles\nthat can affect the size of the rendered text",
70           "isOptional" : false
71         },
72         {
73           "name" : "text",
74           "type" : "String",
75           "desc" : "The text to measure",
76           "isOptional" : false
77         },
78         {
79           "name" : "fixedWidth",
80           "type" : "Number",
81           "desc" : "(optional) If the text will be multiline, you have to set a fixed width\nin order to accurately measure the text height",
82           "isOptional" : false
83         }
84       ],
85       "returns" : [
86         {
87           "name" : "",
88           "type" : "Object",
89           "desc" : "An object containing the text's size {width: (width), height: (height)}"
90         }
91       ]
92     }
93   ],
94   "events" : [
95   ]
96 }