Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / output / Ext.draw.Sprite.js
1 Ext.data.JsonP.Ext_draw_Sprite({
2   "allMixins": [
3
4   ],
5   "deprecated": null,
6   "docauthor": null,
7   "members": {
8     "cfg": [
9       {
10         "type": "String",
11         "deprecated": null,
12         "alias": null,
13         "protected": false,
14         "tagname": "cfg",
15         "href": "Sprite2.html#Ext-draw-Sprite-cfg-fill",
16         "static": false,
17         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
18         "private": false,
19         "name": "fill",
20         "owner": "Ext.draw.Sprite",
21         "doc": "<p>The fill color</p>\n",
22         "linenr": 165,
23         "html_filename": "Sprite2.html"
24       },
25       {
26         "type": "String",
27         "deprecated": null,
28         "alias": null,
29         "protected": false,
30         "tagname": "cfg",
31         "href": "Sprite2.html#Ext-draw-Sprite-cfg-font",
32         "shortDoc": "Used with text type sprites. ...",
33         "static": false,
34         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
35         "private": false,
36         "name": "font",
37         "owner": "Ext.draw.Sprite",
38         "doc": "<p>Used with text type sprites. The full font description. Uses the same syntax as the CSS font parameter</p>\n",
39         "linenr": 177,
40         "html_filename": "Sprite2.html"
41       },
42       {
43         "type": "String/Array",
44         "deprecated": null,
45         "alias": null,
46         "protected": false,
47         "tagname": "cfg",
48         "href": "Sprite2.html#Ext-draw-Sprite-cfg-group",
49         "shortDoc": "The group that this sprite belongs to, or an array of groups. ...",
50         "static": false,
51         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
52         "private": false,
53         "name": "group",
54         "owner": "Ext.draw.Sprite",
55         "doc": "<p>The group that this sprite belongs to, or an array of groups. Only relevant when added to a\n<a href=\"#/api/Ext.draw.Surface\" rel=\"Ext.draw.Surface\" class=\"docClass\">Ext.draw.Surface</a></p>\n",
56         "linenr": 185,
57         "html_filename": "Sprite2.html"
58       },
59       {
60         "type": "Number",
61         "deprecated": null,
62         "alias": null,
63         "protected": false,
64         "tagname": "cfg",
65         "href": "Sprite2.html#Ext-draw-Sprite-cfg-height",
66         "static": false,
67         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
68         "private": false,
69         "name": "height",
70         "owner": "Ext.draw.Sprite",
71         "doc": "<p>Used in rectangle sprites, the height of the rectangle</p>\n",
72         "linenr": 137,
73         "html_filename": "Sprite2.html"
74       },
75       {
76         "type": "Number",
77         "deprecated": null,
78         "alias": null,
79         "protected": false,
80         "tagname": "cfg",
81         "href": "Sprite2.html#Ext-draw-Sprite-cfg-opacity",
82         "static": false,
83         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
84         "private": false,
85         "name": "opacity",
86         "owner": "Ext.draw.Sprite",
87         "doc": "<p>The opacity of the sprite</p>\n",
88         "linenr": 161,
89         "html_filename": "Sprite2.html"
90       },
91       {
92         "type": "Array",
93         "deprecated": null,
94         "alias": null,
95         "protected": false,
96         "tagname": "cfg",
97         "href": "Sprite2.html#Ext-draw-Sprite-cfg-path",
98         "static": false,
99         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
100         "private": false,
101         "name": "path",
102         "owner": "Ext.draw.Sprite",
103         "doc": "<p>Used in path sprites, the path of the sprite written in SVG-like path syntax</p>\n",
104         "linenr": 157,
105         "html_filename": "Sprite2.html"
106       },
107       {
108         "type": "Number",
109         "deprecated": null,
110         "alias": null,
111         "protected": false,
112         "tagname": "cfg",
113         "href": "Sprite2.html#Ext-draw-Sprite-cfg-radius",
114         "static": false,
115         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
116         "private": false,
117         "name": "radius",
118         "owner": "Ext.draw.Sprite",
119         "doc": "<p>Used in circle sprites, the radius of the circle</p>\n",
120         "linenr": 145,
121         "html_filename": "Sprite2.html"
122       },
123       {
124         "type": "Number",
125         "deprecated": null,
126         "alias": null,
127         "protected": false,
128         "tagname": "cfg",
129         "href": "Sprite2.html#Ext-draw-Sprite-cfg-size",
130         "static": false,
131         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
132         "private": false,
133         "name": "size",
134         "owner": "Ext.draw.Sprite",
135         "doc": "<p>Used in square sprites, the dimension of the square</p>\n",
136         "linenr": 141,
137         "html_filename": "Sprite2.html"
138       },
139       {
140         "type": "Number",
141         "deprecated": null,
142         "alias": null,
143         "protected": false,
144         "tagname": "cfg",
145         "href": "Sprite2.html#Ext-draw-Sprite-cfg-stroke",
146         "static": false,
147         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
148         "private": false,
149         "name": "stroke",
150         "owner": "Ext.draw.Sprite",
151         "doc": "<p>-width The width of the stroke</p>\n",
152         "linenr": 173,
153         "html_filename": "Sprite2.html"
154       },
155       {
156         "type": "String",
157         "deprecated": null,
158         "alias": null,
159         "protected": false,
160         "tagname": "cfg",
161         "href": "Sprite2.html#Ext-draw-Sprite-cfg-text",
162         "shortDoc": "Used with text type sprites. ...",
163         "static": false,
164         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
165         "private": false,
166         "name": "text",
167         "owner": "Ext.draw.Sprite",
168         "doc": "<p>Used with text type sprites. The text itself</p>\n",
169         "linenr": 181,
170         "html_filename": "Sprite2.html"
171       },
172       {
173         "type": "String",
174         "deprecated": null,
175         "alias": null,
176         "protected": false,
177         "tagname": "cfg",
178         "href": "Sprite2.html#Ext-draw-Sprite-cfg-type",
179         "shortDoc": "The type of the sprite. ...",
180         "static": false,
181         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
182         "private": false,
183         "name": "type",
184         "owner": "Ext.draw.Sprite",
185         "doc": "<p>The type of the sprite. Possible options are 'circle', 'path', 'rect', 'text', 'square', 'image'</p>\n",
186         "linenr": 129,
187         "html_filename": "Sprite2.html"
188       },
189       {
190         "type": "Number",
191         "deprecated": null,
192         "alias": null,
193         "protected": false,
194         "tagname": "cfg",
195         "href": "Sprite2.html#Ext-draw-Sprite-cfg-width",
196         "static": false,
197         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
198         "private": false,
199         "name": "width",
200         "owner": "Ext.draw.Sprite",
201         "doc": "<p>Used in rectangle sprites, the width of the rectangle</p>\n",
202         "linenr": 133,
203         "html_filename": "Sprite2.html"
204       },
205       {
206         "type": "Number",
207         "deprecated": null,
208         "alias": null,
209         "protected": false,
210         "tagname": "cfg",
211         "href": "Sprite2.html#Ext-draw-Sprite-cfg-x",
212         "static": false,
213         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
214         "private": false,
215         "name": "x",
216         "owner": "Ext.draw.Sprite",
217         "doc": "<p>The position along the x-axis</p>\n",
218         "linenr": 149,
219         "html_filename": "Sprite2.html"
220       },
221       {
222         "type": "Number",
223         "deprecated": null,
224         "alias": null,
225         "protected": false,
226         "tagname": "cfg",
227         "href": "Sprite2.html#Ext-draw-Sprite-cfg-y",
228         "static": false,
229         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
230         "private": false,
231         "name": "y",
232         "owner": "Ext.draw.Sprite",
233         "doc": "<p>The position along the y-axis</p>\n",
234         "linenr": 153,
235         "html_filename": "Sprite2.html"
236       }
237     ],
238     "method": [
239       {
240         "deprecated": null,
241         "alias": null,
242         "protected": false,
243         "tagname": "method",
244         "href": "Sprite2.html#Ext-draw-Sprite-method-addCls",
245         "shortDoc": "Adds one or more CSS classes to the element. ...",
246         "static": false,
247         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
248         "private": false,
249         "params": [
250           {
251             "type": "String/Array",
252             "optional": false,
253             "doc": "<p>The CSS class to add, or an array of classes</p>\n",
254             "name": "className"
255           }
256         ],
257         "name": "addCls",
258         "owner": "Ext.draw.Sprite",
259         "doc": "<p>Adds one or more CSS classes to the element. Duplicate classes are automatically filtered out.  Note this method\nis severly limited in VML.</p>\n",
260         "linenr": 478,
261         "return": {
262           "type": "Ext.draw.Sprite",
263           "doc": "<p>this</p>\n"
264         },
265         "html_filename": "Sprite2.html"
266       },
267       {
268         "deprecated": null,
269         "alias": null,
270         "protected": false,
271         "tagname": "method",
272         "href": "Sprite2.html#Ext-draw-Sprite-method-destroy",
273         "shortDoc": "Removes the sprite and clears all listeners. ...",
274         "static": false,
275         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
276         "private": false,
277         "params": [
278
279         ],
280         "name": "destroy",
281         "owner": "Ext.draw.Sprite",
282         "doc": "<p>Removes the sprite and clears all listeners.</p>\n",
283         "linenr": 445,
284         "return": {
285           "type": "void",
286           "doc": "\n"
287         },
288         "html_filename": "Sprite2.html"
289       },
290       {
291         "deprecated": null,
292         "alias": null,
293         "protected": false,
294         "tagname": "method",
295         "href": "Sprite2.html#Ext-draw-Sprite-method-getBBox",
296         "shortDoc": "Retrieve the bounding box of the sprite. ...",
297         "static": false,
298         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
299         "private": false,
300         "params": [
301
302         ],
303         "name": "getBBox",
304         "owner": "Ext.draw.Sprite",
305         "doc": "<p>Retrieve the bounding box of the sprite. This will be returned as an object with x, y, width, and height properties.</p>\n",
306         "linenr": 394,
307         "return": {
308           "type": "Object",
309           "doc": "<p>bbox</p>\n"
310         },
311         "html_filename": "Sprite2.html"
312       },
313       {
314         "deprecated": null,
315         "alias": null,
316         "protected": false,
317         "tagname": "method",
318         "href": "Sprite2.html#Ext-draw-Sprite-method-hide",
319         "shortDoc": "Hide the sprite. ...",
320         "static": false,
321         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
322         "private": false,
323         "params": [
324           {
325             "type": "Boolean",
326             "optional": false,
327             "doc": "<p>Flag to immediatly draw the change.</p>\n",
328             "name": "redraw"
329           }
330         ],
331         "name": "hide",
332         "owner": "Ext.draw.Sprite",
333         "doc": "<p>Hide the sprite.</p>\n",
334         "linenr": 406,
335         "return": {
336           "type": "Ext.draw.Sprite",
337           "doc": "<p>this</p>\n"
338         },
339         "html_filename": "Sprite2.html"
340       },
341       {
342         "deprecated": null,
343         "alias": null,
344         "protected": false,
345         "tagname": "method",
346         "href": "Sprite2.html#Ext-draw-Sprite-method-redraw",
347         "shortDoc": "Redraw the sprite. ...",
348         "static": false,
349         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
350         "private": false,
351         "params": [
352
353         ],
354         "name": "redraw",
355         "owner": "Ext.draw.Sprite",
356         "doc": "<p>Redraw the sprite.</p>\n",
357         "linenr": 458,
358         "return": {
359           "type": "Ext.draw.Sprite",
360           "doc": "<p>this</p>\n"
361         },
362         "html_filename": "Sprite2.html"
363       },
364       {
365         "deprecated": null,
366         "alias": null,
367         "protected": false,
368         "tagname": "method",
369         "href": "Sprite2.html#Ext-draw-Sprite-method-remove",
370         "shortDoc": "Remove the sprite. ...",
371         "static": false,
372         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
373         "private": false,
374         "params": [
375
376         ],
377         "name": "remove",
378         "owner": "Ext.draw.Sprite",
379         "doc": "<p>Remove the sprite.</p>\n",
380         "linenr": 430,
381         "return": {
382           "type": "void",
383           "doc": "\n"
384         },
385         "html_filename": "Sprite2.html"
386       },
387       {
388         "deprecated": null,
389         "alias": null,
390         "protected": false,
391         "tagname": "method",
392         "href": "Sprite2.html#Ext-draw-Sprite-method-removeCls",
393         "shortDoc": "Removes one or more CSS classes from the element. ...",
394         "static": false,
395         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
396         "private": false,
397         "params": [
398           {
399             "type": "String/Array",
400             "optional": false,
401             "doc": "<p>The CSS class to remove, or an array of classes.  Note this method\nis severly limited in VML.</p>\n",
402             "name": "className"
403           }
404         ],
405         "name": "removeCls",
406         "owner": "Ext.draw.Sprite",
407         "doc": "<p>Removes one or more CSS classes from the element.</p>\n",
408         "linenr": 489,
409         "return": {
410           "type": "Ext.draw.Sprite",
411           "doc": "<p>this</p>\n"
412         },
413         "html_filename": "Sprite2.html"
414       },
415       {
416         "deprecated": null,
417         "alias": null,
418         "protected": false,
419         "tagname": "method",
420         "href": "Sprite2.html#Ext-draw-Sprite-method-setAttributes",
421         "shortDoc": "Change the attributes of the sprite. ...",
422         "static": false,
423         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
424         "private": false,
425         "params": [
426           {
427             "type": "Object",
428             "optional": false,
429             "doc": "<p>attributes to be changed on the sprite.</p>\n",
430             "name": "attrs"
431           },
432           {
433             "type": "Boolean",
434             "optional": false,
435             "doc": "<p>Flag to immediatly draw the change.</p>\n",
436             "name": "redraw"
437           }
438         ],
439         "name": "setAttributes",
440         "owner": "Ext.draw.Sprite",
441         "doc": "<p>Change the attributes of the sprite.</p>\n",
442         "linenr": 297,
443         "return": {
444           "type": "Ext.draw.Sprite",
445           "doc": "<p>this</p>\n"
446         },
447         "html_filename": "Sprite2.html"
448       },
449       {
450         "deprecated": null,
451         "alias": null,
452         "protected": false,
453         "tagname": "method",
454         "href": "Sprite2.html#Ext-draw-Sprite-method-setStyle",
455         "shortDoc": "Wrapper for setting style properties, also takes single object parameter of multiple styles. ...",
456         "static": false,
457         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
458         "private": false,
459         "params": [
460           {
461             "type": "String/Object",
462             "optional": false,
463             "doc": "<p>The style property to be set, or an object of multiple styles.</p>\n",
464             "name": "property"
465           },
466           {
467             "type": "String",
468             "optional": true,
469             "doc": "<p>(optional) The value to apply to the given property, or null if an object was passed.</p>\n",
470             "name": "value"
471           }
472         ],
473         "name": "setStyle",
474         "owner": "Ext.draw.Sprite",
475         "doc": "<p>Wrapper for setting style properties, also takes single object parameter of multiple styles.</p>\n",
476         "linenr": 467,
477         "return": {
478           "type": "Ext.draw.Sprite",
479           "doc": "<p>this</p>\n"
480         },
481         "html_filename": "Sprite2.html"
482       },
483       {
484         "deprecated": null,
485         "alias": null,
486         "protected": false,
487         "tagname": "method",
488         "href": "Sprite2.html#Ext-draw-Sprite-method-show",
489         "shortDoc": "Show the sprite. ...",
490         "static": false,
491         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
492         "private": false,
493         "params": [
494           {
495             "type": "Boolean",
496             "optional": false,
497             "doc": "<p>Flag to immediatly draw the change.</p>\n",
498             "name": "redraw"
499           }
500         ],
501         "name": "show",
502         "owner": "Ext.draw.Sprite",
503         "doc": "<p>Show the sprite.</p>\n",
504         "linenr": 418,
505         "return": {
506           "type": "Ext.draw.Sprite",
507           "doc": "<p>this</p>\n"
508         },
509         "html_filename": "Sprite2.html"
510       }
511     ],
512     "property": [
513       {
514         "type": "Ext.dd.DragSource.",
515         "deprecated": null,
516         "alias": null,
517         "protected": false,
518         "tagname": "property",
519         "href": "Sprite2.html#Ext-draw-Sprite-property-dd",
520         "shortDoc": "If this Sprite is configured draggable, this property will contain\nan instance of Ext.dd.DragSource which handles dra...",
521         "static": false,
522         "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
523         "private": false,
524         "name": "dd",
525         "owner": "Ext.draw.Sprite",
526         "doc": "<p>If this Sprite is configured draggable, this property will contain\nan instance of <a href=\"#/api/Ext.dd.DragSource\" rel=\"Ext.dd.DragSource\" class=\"docClass\">Ext.dd.DragSource</a> which handles dragging the Sprite.</p>\n\n\n<p>The developer must provide implementations of the abstract methods of <a href=\"#/api/Ext.dd.DragSource\" rel=\"Ext.dd.DragSource\" class=\"docClass\">Ext.dd.DragSource</a>\nin order to supply behaviour for each stage of the drag/drop process. See draggable.</p>\n",
527         "linenr": 278,
528         "html_filename": "Sprite2.html"
529       }
530     ],
531     "cssVar": [
532
533     ],
534     "cssMixin": [
535
536     ],
537     "event": [
538
539     ]
540   },
541   "singleton": false,
542   "alias": null,
543   "superclasses": [
544
545   ],
546   "protected": false,
547   "tagname": "class",
548   "mixins": [
549
550   ],
551   "href": "Sprite2.html#Ext-draw-Sprite",
552   "subclasses": [
553
554   ],
555   "static": false,
556   "author": null,
557   "component": false,
558   "filename": "/mnt/ebs/nightly/git/SDK/platform/src/draw/Sprite.js",
559   "private": false,
560   "alternateClassNames": [
561
562   ],
563   "name": "Ext.draw.Sprite",
564   "doc": "<p>A Sprite is an object rendered in a Drawing surface. There are different options and types of sprites.\nThe configuration of a Sprite is an object with the following properties:</p>\n\n<ul>\n<li><strong>type</strong> - (String) The type of the sprite. Possible options are 'circle', 'path', 'rect', 'text', 'square', 'image'.</li>\n<li><strong>group</strong> - (String/Array) The group that this sprite belongs to, or an array of groups. Only relevant when added to a <a href=\"#/api/Ext.draw.Surface\" rel=\"Ext.draw.Surface\" class=\"docClass\">Ext.draw.Surface</a>.</li>\n<li><strong>width</strong> - (Number) Used in rectangle sprites, the width of the rectangle.</li>\n<li><strong>height</strong> - (Number) Used in rectangle sprites, the height of the rectangle.</li>\n<li><strong>size</strong> - (Number) Used in square sprites, the dimension of the square.</li>\n<li><strong>radius</strong> - (Number) Used in circle sprites, the radius of the circle.</li>\n<li><strong>x</strong> - (Number) The position along the x-axis.</li>\n<li><strong>y</strong> - (Number) The position along the y-axis.</li>\n<li><strong>path</strong> - (Array) Used in path sprites, the path of the sprite written in SVG-like path syntax.</li>\n<li><strong>opacity</strong> - (Number) The opacity of the sprite.</li>\n<li><strong>fill</strong> - (String) The fill color.</li>\n<li><strong>stroke</strong> - (String) The stroke color.</li>\n<li><strong>stroke-width</strong> - (Number) The width of the stroke.</li>\n<li><strong>font</strong> - (String) Used with text type sprites. The full font description. Uses the same syntax as the CSS <code>font</code> parameter.</li>\n<li><strong>text</strong> - (String) Used with text type sprites. The text itself.</li>\n<li><strong>translate</strong> - (Object) Defines a translation for the Sprite. There's more information on this property below.</li>\n<li><strong>rotate</strong> - (Object) Defines a rotation for the Sprite. There's more information on this property below.</li>\n<li><strong>scale</strong> - (Object) Defines a scaling for the Sprite. There's more information on this property below.</li>\n</ul>\n\n\n<h2>Translation</h2>\n\n<p>For translate, the configuration object contains x and y attributes that indicate where to\ntranslate the object. For example:</p>\n\n<pre><code>sprite.setAttributes({\n  translate: {\n   x: 10,\n   y: 10\n  }\n}, true);\n</code></pre>\n\n<h2>Rotation</h2>\n\n<p>For rotation, the configuration object contains x and y attributes for the center of the rotation (which are optional),\nand a <code>degrees</code> attribute that specifies the rotation in degrees. For example:</p>\n\n<pre><code>sprite.setAttributes({\n  rotate: {\n   degrees: 90\n  }\n}, true);\n</code></pre>\n\n<p>That example will create a 90 degrees rotation using the centroid of the Sprite as center of rotation, whereas:</p>\n\n<pre><code>sprite.setAttributes({\n  rotate: {\n   x: 0,\n   y: 0,\n   degrees: 90\n  }\n}, true);\n</code></pre>\n\n<p>will create a rotation around the <code>(0, 0)</code> axis.</p>\n\n<h2>Scaling</h2>\n\n<p>For scaling, the configuration object contains x and y attributes for the x-axis and y-axis scaling. For example:</p>\n\n<pre><code>sprite.setAttributes({\n  scale: {\n   x: 10,\n   y: 3\n  }\n}, true);\n</code></pre>\n\n<p>You can also specify the center of scaling by adding <code>cx</code> and <code>cy</code> as properties:</p>\n\n<pre><code>sprite.setAttributes({\n  scale: {\n   cx: 0,\n   cy: 0,\n   x: 10,\n   y: 3\n  }\n}, true);\n</code></pre>\n\n<p>That last example will scale a sprite taking as centers of scaling the <code>(0, 0)</code> coordinate.</p>\n\n<h2>Creating and adding a Sprite to a Surface</h2>\n\n<p>Sprites can be created with a reference to a <a href=\"#/api/Ext.draw.Surface\" rel=\"Ext.draw.Surface\" class=\"docClass\">Ext.draw.Surface</a></p>\n\n<pre><code> var drawComponent = Ext.create('Ext.draw.Component', options here...);\n\n var sprite = Ext.create('Ext.draw.Sprite', {\n     type: 'circle',\n     fill: '#ff0',\n     surface: drawComponent.surface,\n     radius: 5\n });\n</code></pre>\n\n<p>Sprites can also be added to the surface as a configuration object:</p>\n\n<pre><code> var sprite = drawComponent.surface.add({\n     type: 'circle',\n     fill: '#ff0',\n     radius: 5\n });\n</code></pre>\n\n<p>In order to properly apply properties and render the sprite we have to\n<code>show</code> the sprite setting the option <code>redraw</code> to <code>true</code>:</p>\n\n<pre><code> sprite.show(true);\n</code></pre>\n\n<p>The constructor configuration object of the Sprite can also be used and passed into the <a href=\"#/api/Ext.draw.Surface\" rel=\"Ext.draw.Surface\" class=\"docClass\">Ext.draw.Surface</a>\nadd method to append a new sprite to the canvas. For example:</p>\n\n<pre><code>drawComponent.surface.add({\n    type: 'circle',\n    fill: '#ffc',\n    radius: 100,\n    x: 100,\n    y: 100\n});\n</code></pre>\n",
565   "mixedInto": [
566
567   ],
568   "linenr": 1,
569   "xtypes": [
570
571   ],
572   "html_filename": "Sprite2.html",
573   "extends": "Object"
574 });