sync
[roojs1] / docs / symbols / Roo.util.TextMetrics.json
1 {
2   "name" : "Roo.util.TextMetrics",
3   "augments" : [],
4   "childClasses" : {  },
5   "tree_children" : [],
6   "tree_parent" : [],
7   "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.",
8   "isSingleton" : true,
9   "isStatic" : true,
10   "isBuiltin" : false,
11   "isAbstract" : false,
12   "isBuilderTop" : false,
13   "memberOf" : "TextMetrics",
14   "example" : "",
15   "deprecated" : "",
16   "since" : "",
17   "see" : "",
18   "params" : [],
19   "returns" : [],
20   "throws" : "",
21   "requires" : "",
22   "config" : [],
23   "methods" : [
24     {
25       "name" : "createInstance",
26       "type" : "function",
27       "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.",
28       "sig" : "(el, fixedWidth)",
29       "static" : false,
30       "memberOf" : "",
31       "isStatic" : false,
32       "isConstructor" : false,
33       "isPrivate" : false,
34       "example" : "",
35       "deprecated" : "",
36       "since" : "",
37       "see" : "",
38       "exceptions" : "",
39       "requires" : "",
40       "params" : [
41         {
42           "name" : "el",
43           "type" : "String/HTMLElement",
44           "desc" : "The element, dom node or id that the instance will be bound to",
45           "isOptional" : false
46         },
47         {
48           "name" : "fixedWidth",
49           "type" : "Number",
50           "desc" : "(optional) If the text will be multiline, you have to set a fixed width\nin order to accurately measure the text height",
51           "isOptional" : false
52         }
53       ],
54       "returns" : [
55         {
56           "name" : "",
57           "type" : "Roo.util.TextMetrics.Instance",
58           "desc" : "instance The new instance"
59         }
60       ]
61     },
62     {
63       "name" : "measure",
64       "type" : "function",
65       "desc" : "Measures the size of the specified text",
66       "sig" : "(el, text, fixedWidth)",
67       "static" : false,
68       "memberOf" : "",
69       "isStatic" : false,
70       "isConstructor" : false,
71       "isPrivate" : false,
72       "example" : "",
73       "deprecated" : "",
74       "since" : "",
75       "see" : "",
76       "exceptions" : "",
77       "requires" : "",
78       "params" : [
79         {
80           "name" : "el",
81           "type" : "String/HTMLElement",
82           "desc" : "The element, dom node or id from which to copy existing CSS styles\nthat can affect the size of the rendered text",
83           "isOptional" : false
84         },
85         {
86           "name" : "text",
87           "type" : "String",
88           "desc" : "The text to measure",
89           "isOptional" : false
90         },
91         {
92           "name" : "fixedWidth",
93           "type" : "Number",
94           "desc" : "(optional) If the text will be multiline, you have to set a fixed width\nin order to accurately measure the text height",
95           "isOptional" : false
96         }
97       ],
98       "returns" : [
99         {
100           "name" : "",
101           "type" : "Object",
102           "desc" : "An object containing the text's size {width: (width), height: (height)}"
103         }
104       ]
105     }
106   ],
107   "events" : []
108 }