libraries/EaselJS_docs/classes/Shadow.html (view raw)
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <link rel="stylesheet" href="../assets/css/yui-cssgrids-min.css">
6 <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
7 <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
8 <link rel="shortcut icon" type="image/x-icon" href="../assets/favicon.ico">
9 <script src="../assets/js/yui-source.js"></script>
10 <title>EaselJS v1.0.0 API Documentation : Shadow</title>
11</head>
12<body class="yui3-skin-sam">
13
14<div id="doc">
15 <div id="hd" class="yui3-g header">
16 <div class="yui3-u-3-4">
17
18 <h1><a href="http://www.createjs.com/easeljs"><img src="../assets/docs-icon-EaselJS.png" title="EaselJS"></a></h1>
19
20 </div>
21 <div class="version">
22 <em>API Documentation for: 1.0.0</em>
23 </div>
24 </div>
25 <div id="bd" class="yui3-g">
26
27 <div class="yui3-u-1-4">
28 <div id="docs-sidebar" class="sidebar apidocs">
29 <div id="api-list">
30 <h2 class="off-left">APIs</h2>
31 <div id="api-tabview" class="tabview">
32 <ul class="tabs">
33 <li><a href="#api-classes">Classes</a></li>
34 </ul>
35
36 <div id="api-tabview-filter">
37 <input type="search" id="api-filter" placeholder="Type to filter APIs">
38 </div>
39
40 <div id="api-tabview-panel">
41 <ul id="api-classes" class="apis classes">
42
43 <li><a href="../classes/AlphaMapFilter.html">AlphaMapFilter</a></li>
44
45 <li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
46
47 <li><a href="../classes/Bitmap.html">Bitmap</a></li>
48
49 <li><a href="../classes/BitmapCache.html">BitmapCache</a></li>
50
51 <li><a href="../classes/BitmapText.html">BitmapText</a></li>
52
53 <li><a href="../classes/BlurFilter.html">BlurFilter</a></li>
54
55 <li><a href="../classes/ButtonHelper.html">ButtonHelper</a></li>
56
57 <li><a href="../classes/ColorFilter.html">ColorFilter</a></li>
58
59 <li><a href="../classes/ColorMatrix.html">ColorMatrix</a></li>
60
61 <li><a href="../classes/ColorMatrixFilter.html">ColorMatrixFilter</a></li>
62
63 <li><a href="../classes/Container.html">Container</a></li>
64
65 <li><a href="../classes/DisplayObject.html">DisplayObject</a></li>
66
67 <li><a href="../classes/DisplayProps.html">DisplayProps</a></li>
68
69 <li><a href="../classes/DOMElement.html">DOMElement</a></li>
70
71 <li><a href="../classes/EaselJS.html">EaselJS</a></li>
72
73 <li><a href="../classes/Event.html">Event</a></li>
74
75 <li><a href="../classes/EventDispatcher.html">EventDispatcher</a></li>
76
77 <li><a href="../classes/Filter.html">Filter</a></li>
78
79 <li><a href="../classes/Graphics.html">Graphics</a></li>
80
81 <li><a href="../classes/Graphics.Arc.html">Graphics.Arc</a></li>
82
83 <li><a href="../classes/Graphics.ArcTo.html">Graphics.ArcTo</a></li>
84
85 <li><a href="../classes/Graphics.BeginPath.html">Graphics.BeginPath</a></li>
86
87 <li><a href="../classes/Graphics.BezierCurveTo.html">Graphics.BezierCurveTo</a></li>
88
89 <li><a href="../classes/Graphics.Circle.html">Graphics.Circle</a></li>
90
91 <li><a href="../classes/Graphics.ClosePath.html">Graphics.ClosePath</a></li>
92
93 <li><a href="../classes/Graphics.Ellipse.html">Graphics.Ellipse</a></li>
94
95 <li><a href="../classes/Graphics.Fill.html">Graphics.Fill</a></li>
96
97 <li><a href="../classes/Graphics.LineTo.html">Graphics.LineTo</a></li>
98
99 <li><a href="../classes/Graphics.MoveTo.html">Graphics.MoveTo</a></li>
100
101 <li><a href="../classes/Graphics.PolyStar.html">Graphics.PolyStar</a></li>
102
103 <li><a href="../classes/Graphics.QuadraticCurveTo.html">Graphics.QuadraticCurveTo</a></li>
104
105 <li><a href="../classes/Graphics.Rect.html">Graphics.Rect</a></li>
106
107 <li><a href="../classes/Graphics.RoundRect.html">Graphics.RoundRect</a></li>
108
109 <li><a href="../classes/Graphics.Stroke.html">Graphics.Stroke</a></li>
110
111 <li><a href="../classes/Graphics.StrokeDash.html">Graphics.StrokeDash</a></li>
112
113 <li><a href="../classes/Graphics.StrokeStyle.html">Graphics.StrokeStyle</a></li>
114
115 <li><a href="../classes/Matrix2D.html">Matrix2D</a></li>
116
117 <li><a href="../classes/MouseEvent.html">MouseEvent</a></li>
118
119 <li><a href="../classes/MovieClip.html">MovieClip</a></li>
120
121 <li><a href="../classes/MovieClipPlugin.html">MovieClipPlugin</a></li>
122
123 <li><a href="../classes/Point.html">Point</a></li>
124
125 <li><a href="../classes/Rectangle.html">Rectangle</a></li>
126
127 <li><a href="../classes/Shadow.html">Shadow</a></li>
128
129 <li><a href="../classes/Shape.html">Shape</a></li>
130
131 <li><a href="../classes/Sprite.html">Sprite</a></li>
132
133 <li><a href="../classes/SpriteSheet.html">SpriteSheet</a></li>
134
135 <li><a href="../classes/SpriteSheetBuilder.html">SpriteSheetBuilder</a></li>
136
137 <li><a href="../classes/SpriteSheetUtils.html">SpriteSheetUtils</a></li>
138
139 <li><a href="../classes/Stage.html">Stage</a></li>
140
141 <li><a href="../classes/StageGL.html">StageGL</a></li>
142
143 <li><a href="../classes/Text.html">Text</a></li>
144
145 <li><a href="../classes/Ticker.html">Ticker</a></li>
146
147 <li><a href="../classes/Touch.html">Touch</a></li>
148
149 <li><a href="../classes/UID.html">UID</a></li>
150
151 <li><a href="../classes/Utility Methods.html">Utility Methods</a></li>
152
153 <li><a href="../classes/VideoBuffer.html">VideoBuffer</a></li>
154
155 <li><a href="../classes/WebGLInspector.html">WebGLInspector</a></li>
156
157 </ul>
158
159 <ul id="api-modules" class="apis modules">
160
161 <li><a href="../modules/CreateJS.html">CreateJS</a></li>
162
163 <li><a href="../modules/EaselJS.html">EaselJS</a></li>
164
165 </ul>
166 </div>
167 </div>
168</div>
169
170 </div>
171 </div>
172 <div class="yui3-u-3-4">
173 <div id="api-options">
174 Show:
175 <label for="api-show-inherited">
176 <input type="checkbox" id="api-show-inherited" checked>
177 Inherited
178 </label>
179
180 <label for="api-show-protected">
181 <input type="checkbox" id="api-show-protected">
182 Protected
183 </label>
184
185 <label for="api-show-private">
186 <input type="checkbox" id="api-show-private">
187 Private
188 </label>
189 <label for="api-show-deprecated">
190 <input type="checkbox" id="api-show-deprecated">
191 Deprecated
192 </label>
193
194 </div>
195 <div class="apidocs">
196 <div id="docs-main">
197 <div class="content">
198 <h1>Shadow Class</h1>
199<div class="box meta">
200
201
202
203
204
205 <div class="foundat">
206 Defined in: <a href="../files/easeljs_display_Shadow.js.html#l41"><code>Shadow:41</code></a>
207 </div>
208
209
210
211
212 Module: <a href="../modules/EaselJS.html">EaselJS</a>
213
214
215
216
217</div>
218
219
220
221<div class="box intro">
222 <p>This class encapsulates the properties required to define a shadow to apply to a <a href="../classes/DisplayObject.html" class="crosslink">DisplayObject</a>
223via its <code>shadow</code> property.</p>
224<h4>Example</h4>
225
226<pre class="code prettyprint"><code> myImage.shadow = new createjs.Shadow("#000000", 5, 5, 10);</code></pre>
227
228</div>
229
230
231 <div class="constructor">
232 <h2>Constructor</h2>
233 <div id="method_Shadow" class="method item">
234 <h3 class="name"><code>Shadow</code></h3>
235
236
237 <div class="args">
238 <span class="paren">(</span><ul class="args-list inline commas">
239
240 <li class="arg">
241
242 <code>color</code>
243
244 </li>
245
246 <li class="arg">
247
248 <code>offsetX</code>
249
250 </li>
251
252 <li class="arg">
253
254 <code>offsetY</code>
255
256 </li>
257
258 <li class="arg">
259
260 <code>blur</code>
261
262 </li>
263
264 </ul><span class="paren">)</span>
265 </div>
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282 <div class="meta">
283
284
285
286 <p>
287
288 Defined in
289
290
291
292
293 <a href="../files/easeljs_display_Shadow.js.html#l41"><code>Shadow:41</code></a>
294
295 </p>
296
297
298
299
300
301 </div>
302
303 <div class="description">
304
305 </div>
306
307
308 <div class="params">
309 <h4>Parameters:</h4>
310
311 <ul class="params-list">
312
313 <li class="param">
314
315 <code class="param-name">color</code>
316 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
317
318
319
320
321 <div class="param-description">
322 <p>The color of the shadow. This can be any valid CSS color value.</p>
323
324 </div>
325
326
327 </li>
328
329 <li class="param">
330
331 <code class="param-name">offsetX</code>
332 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
333
334
335
336
337 <div class="param-description">
338 <p>The x offset of the shadow in pixels.</p>
339
340 </div>
341
342
343 </li>
344
345 <li class="param">
346
347 <code class="param-name">offsetY</code>
348 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
349
350
351
352
353 <div class="param-description">
354 <p>The y offset of the shadow in pixels.</p>
355
356 </div>
357
358
359 </li>
360
361 <li class="param">
362
363 <code class="param-name">blur</code>
364 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
365
366
367
368
369 <div class="param-description">
370 <p>The size of the blurring effect.</p>
371
372 </div>
373
374
375 </li>
376
377 </ul>
378 </div>
379
380
381
382
383
384</div>
385
386 </div>
387
388
389<div id="classdocs" class="tabview">
390 <ul class="api-class-tabs">
391 <li class="api-class-tab index"><a href="#index">Index</a></li>
392
393
394 <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
395
396
397 <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
398
399
400
401 </ul>
402
403 <div>
404 <div id="index" class="api-class-tabpanel index">
405 <h2 class="off-left">Item Index</h2>
406
407
408 <div class="index-section methods">
409 <h3>Methods</h3>
410
411 <ul class="index-list methods">
412
413 <li class="index-item method">
414 <a href="#method_clone">clone</a>
415
416
417
418 </li>
419
420 <li class="index-item method">
421 <a href="#method_toString">toString</a>
422
423
424
425 </li>
426
427 </ul>
428 </div>
429
430
431
432 <div class="index-section properties">
433 <h3>Properties</h3>
434
435 <ul class="index-list properties">
436
437 <li class="index-item property">
438 <a href="#property_blur">blur</a>
439
440
441
442 </li>
443
444 <li class="index-item property">
445 <a href="#property_color">color</a>
446
447
448
449 </li>
450
451 <li class="index-item property">
452 <a href="#property_identity">identity</a>
453
454
455 <span class="flag static">static</span>
456
457
458 </li>
459
460 <li class="index-item property">
461 <a href="#property_offsetX">offsetX</a>
462
463
464
465 </li>
466
467 <li class="index-item property">
468 <a href="#property_offsetY">offsetY</a>
469
470
471
472 </li>
473
474 </ul>
475 </div>
476
477
478
479
480
481 </div>
482
483
484 <div id="methods" class="api-class-tabpanel">
485 <h2 class="off-left">Methods</h2>
486
487
488 <div id="method_clone" class="method item">
489 <h3 class="name"><code>clone</code></h3>
490
491
492 <span class="paren">()</span>
493
494
495
496 <span class="returns-inline">
497 <span class="type"><a href="../classes/Shadow.html" class="crosslink">Shadow</a></span>
498 </span>
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513 <div class="meta">
514
515
516
517 <p>
518
519 Defined in
520
521
522
523
524 <a href="../files/easeljs_display_Shadow.js.html#l113"><code>clone:113</code></a>
525
526 </p>
527
528
529
530
531
532 </div>
533
534 <div class="description">
535 <p>Returns a clone of this Shadow instance.</p>
536
537 </div>
538
539
540
541
542 <div class="returns">
543 <h4>Returns:</h4>
544
545 <div class="returns-description">
546
547
548 <span class="type"><a href="../classes/Shadow.html" class="crosslink">Shadow</a></span>:
549
550 <p>A clone of the current Shadow instance.</p>
551
552
553 </div>
554 </div>
555
556
557
558</div>
559
560
561 <div id="method_toString" class="method item">
562 <h3 class="name"><code>toString</code></h3>
563
564
565 <span class="paren">()</span>
566
567
568
569 <span class="returns-inline">
570 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
571 </span>
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586 <div class="meta">
587
588
589
590 <p>
591
592 Defined in
593
594
595
596
597 <a href="../files/easeljs_display_Shadow.js.html#l104"><code>toString:104</code></a>
598
599 </p>
600
601
602
603
604
605 </div>
606
607 <div class="description">
608 <p>Returns a string representation of this object.</p>
609
610 </div>
611
612
613
614
615 <div class="returns">
616 <h4>Returns:</h4>
617
618 <div class="returns-description">
619
620
621 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
622
623 <p>a string representation of the instance.</p>
624
625
626 </div>
627 </div>
628
629
630
631</div>
632
633
634 </div>
635
636
637
638 <div id="properties" class="api-class-tabpanel">
639 <h2 class="off-left">Properties</h2>
640
641
642 <div id="property_blur" class="property item">
643 <h3 class="name"><code>blur</code></h3>
644 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
645
646
647
648
649
650
651
652
653
654
655
656 <div class="meta">
657
658
659
660 <p>
661
662 Defined in
663
664
665
666
667 <a href="../files/easeljs_display_Shadow.js.html#l82"><code>blur:82</code></a>
668
669 </p>
670
671
672
673
674 </div>
675
676 <div class="description">
677
678 </div>
679
680
681 <p><strong>Default:</strong> 0</p>
682
683
684
685
686
687</div>
688
689
690 <div id="property_color" class="property item">
691 <h3 class="name"><code>color</code></h3>
692 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
693
694
695
696
697
698
699
700
701
702
703
704 <div class="meta">
705
706
707
708 <p>
709
710 Defined in
711
712
713
714
715 <a href="../files/easeljs_display_Shadow.js.html#l60"><code>color:60</code></a>
716
717 </p>
718
719
720
721
722 </div>
723
724 <div class="description">
725 <p>The color of the shadow. This can be any valid CSS color value.</p>
726
727 </div>
728
729
730 <p><strong>Default:</strong> null</p>
731
732
733
734
735
736</div>
737
738
739 <div id="property_identity" class="property item">
740 <h3 class="name"><code>identity</code></h3>
741 <span class="type"><a href="../classes/Shadow.html" class="crosslink">Shadow</a></span>
742
743
744
745
746
747
748 <span class="flag final">final</span>
749
750
751
752 <span class="flag static">static</span>
753
754
755
756 <span class="flag readonly">readonly</span>
757
758
759 <div class="meta">
760
761
762
763 <p>
764
765 Defined in
766
767
768
769
770 <a href="../files/easeljs_display_Shadow.js.html#l92"><code>identity:92</code></a>
771
772 </p>
773
774
775
776
777 </div>
778
779 <div class="description">
780 <p>An identity shadow object (all properties are set to 0).</p>
781
782 </div>
783
784
785
786
787
788
789</div>
790
791
792 <div id="property_offsetX" class="property item">
793 <h3 class="name"><code>offsetX</code></h3>
794 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
795
796
797
798
799
800
801
802
803
804
805
806 <div class="meta">
807
808
809
810 <p>
811
812 Defined in
813
814
815
816
817 <a href="../files/easeljs_display_Shadow.js.html#l68"><code>offsetX:68</code></a>
818
819 </p>
820
821
822
823
824 </div>
825
826 <div class="description">
827
828 </div>
829
830
831 <p><strong>Default:</strong> 0</p>
832
833
834
835
836
837</div>
838
839
840 <div id="property_offsetY" class="property item">
841 <h3 class="name"><code>offsetY</code></h3>
842 <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
843
844
845
846
847
848
849
850
851
852
853
854 <div class="meta">
855
856
857
858 <p>
859
860 Defined in
861
862
863
864
865 <a href="../files/easeljs_display_Shadow.js.html#l75"><code>offsetY:75</code></a>
866
867 </p>
868
869
870
871
872 </div>
873
874 <div class="description">
875
876 </div>
877
878
879 <p><strong>Default:</strong> 0</p>
880
881
882
883
884
885</div>
886
887
888 </div>
889
890
891
892
893
894 </div>
895</div>
896
897 </div>
898 </div>
899 </div>
900 </div>
901 </div>
902</div>
903<script src="../assets/vendor/prettify/prettify-min.js"></script>
904<script>prettyPrint();</script>
905<script src="../assets/js/yui-prettify.js"></script>
906<script src="../assets/../api.js"></script>
907<script src="../assets/js/api-filter.js"></script>
908<script src="../assets/js/api-list.js"></script>
909<script src="../assets/js/api-search.js"></script>
910<script src="../assets/js/apidocs.js"></script>
911</body>
912</html>