all repos — simplyrpg @ 12669c61e2eec0d84ef981688888e4986778c0b8

Fork of https://github.com/harperd1/simplyRPG — multi-map VTT, token visibility, dark theme, stream HUD

libraries/EaselJS_docs/classes/AlphaMapFilter.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 : AlphaMapFilter</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>AlphaMapFilter Class</h1>
 199<div class="box meta">
 200    
 201
 202    
 203        <div class="extends">
 204            Extends <a href="../classes/Filter.html" class="crosslink">Filter</a>
 205        </div>
 206    
 207
 208    
 209        <div class="foundat">
 210            Defined in: <a href="../files/easeljs_filters_AlphaMapFilter.js.html#l41"><code>AlphaMapFilter:41</code></a>
 211        </div>
 212    
 213
 214    
 215        
 216            Module: <a href="../modules/EaselJS.html">EaselJS</a>
 217        
 218    
 219
 220    
 221</div>
 222
 223
 224
 225<div class="box intro">
 226    <p>Applies a greyscale alpha map image (or canvas) to the target, such that the alpha channel of the result will
 227be copied from the red channel of the map, and the RGB channels will be copied from the target.</p>
 228<p>Generally, it is recommended that you use <a href="../classes/AlphaMaskFilter.html" class="crosslink">AlphaMaskFilter</a>, because it has much
 229better performance.</p>
 230<p><h4>Example</h4>
 231This example draws a red-&gt;blue box, caches it, and then uses the cache canvas as an alpha map on a 100x100 image.</p>
 232<pre class="code prettyprint"><code>  var box = new createjs.Shape();
 233  box.graphics.beginLinearGradientFill(["#ff0000", "#0000ff"], [0, 1], 0, 0, 0, 100)
 234  box.graphics.drawRect(0, 0, 100, 100);
 235  box.cache(0, 0, 100, 100);
 236
 237  var bmp = new createjs.Bitmap("path/to/image.jpg");
 238  bmp.filters = [
 239      new createjs.AlphaMapFilter(box.cacheCanvas)
 240  ];
 241  bmp.cache(0, 0, 100, 100);
 242  stage.addChild(bmp);</code></pre>
 243<p>See <a href="../classes/Filter.html" class="crosslink">Filter</a> for more information on applying filters.</p>
 244
 245</div>
 246
 247
 248    <div class="constructor">
 249        <h2>Constructor</h2>
 250        <div id="method_AlphaMapFilter" class="method item">
 251    <h3 class="name"><code>AlphaMapFilter</code></h3>
 252
 253    
 254        <div class="args">
 255            <span class="paren">(</span><ul class="args-list inline commas">
 256            
 257                <li class="arg">
 258                    
 259                        <code>alphaMap</code>
 260                    
 261                </li>
 262            
 263            </ul><span class="paren">)</span>
 264        </div>
 265    
 266
 267    
 268
 269    
 270
 271    
 272
 273    
 274
 275    
 276
 277    
 278
 279    
 280
 281    <div class="meta">
 282        
 283            
 284                
 285                <p>
 286                
 287                Defined in
 288                
 289            
 290        
 291        
 292        <a href="../files/easeljs_filters_AlphaMapFilter.js.html#l41"><code>AlphaMapFilter:41</code></a>
 293        
 294        </p>
 295
 296
 297        
 298
 299        
 300    </div>
 301
 302    <div class="description">
 303        
 304    </div>
 305
 306    
 307        <div class="params">
 308            <h4>Parameters:</h4>
 309
 310            <ul class="params-list">
 311            
 312                <li class="param">
 313                    
 314                        <code class="param-name">alphaMap</code>
 315                        <span class="type">HTMLImageElement | HTMLCanvasElement</span>
 316                    
 317
 318                    
 319
 320                    <div class="param-description">
 321                        <p>The greyscale image (or canvas) to use as the alpha value for the
 322result. This should be exactly the same dimensions as the target.</p>
 323
 324                    </div>
 325
 326                    
 327                </li>
 328            
 329            </ul>
 330        </div>
 331    
 332
 333    
 334
 335    
 336</div>
 337
 338    </div>
 339
 340
 341<div id="classdocs" class="tabview">
 342    <ul class="api-class-tabs">
 343        <li class="api-class-tab index"><a href="#index">Index</a></li>
 344
 345        
 346            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
 347        
 348        
 349            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
 350        
 351        
 352        
 353    </ul>
 354
 355    <div>
 356        <div id="index" class="api-class-tabpanel index">
 357            <h2 class="off-left">Item Index</h2>
 358
 359            
 360                <div class="index-section methods">
 361                    <h3>Methods</h3>
 362
 363                    <ul class="index-list methods extends">
 364                        
 365                            <li class="index-item method inherited">
 366                                <a href="#method__applyFilter">_applyFilter</a>
 367
 368                                
 369                                
 370                            </li>
 371                        
 372                            <li class="index-item method protected">
 373                                <a href="#method__prepAlphaMap">_prepAlphaMap</a>
 374
 375                                
 376                                
 377                            </li>
 378                        
 379                            <li class="index-item method inherited">
 380                                <a href="#method_applyFilter">applyFilter</a>
 381
 382                                
 383                                
 384                            </li>
 385                        
 386                            <li class="index-item method inherited">
 387                                <a href="#method_clone">clone</a>
 388
 389                                
 390                                
 391                            </li>
 392                        
 393                            <li class="index-item method inherited">
 394                                <a href="#method_getBounds">getBounds</a>
 395
 396                                
 397                                
 398                            </li>
 399                        
 400                            <li class="index-item method inherited">
 401                                <a href="#method_shaderParamSetup">shaderParamSetup</a>
 402
 403                                
 404                                
 405                            </li>
 406                        
 407                            <li class="index-item method inherited">
 408                                <a href="#method_toString">toString</a>
 409
 410                                
 411                                
 412                            </li>
 413                        
 414                    </ul>
 415                </div>
 416            
 417
 418            
 419                <div class="index-section properties">
 420                    <h3>Properties</h3>
 421
 422                    <ul class="index-list properties extends">
 423                        
 424                            <li class="index-item property protected">
 425                                <a href="#property__alphaMap">_alphaMap</a>
 426
 427                                
 428                                
 429                            </li>
 430                        
 431                            <li class="index-item property protected">
 432                                <a href="#property__mapData">_mapData</a>
 433
 434                                
 435                                
 436                            </li>
 437                        
 438                            <li class="index-item property private inherited">
 439                                <a href="#property__multiPass">_multiPass</a>
 440
 441                                
 442                                
 443                            </li>
 444                        
 445                            <li class="index-item property">
 446                                <a href="#property_alphaMap">alphaMap</a>
 447
 448                                
 449                                
 450                            </li>
 451                        
 452                            <li class="index-item property inherited">
 453                                <a href="#property_FRAG_SHADER">FRAG_SHADER</a>
 454
 455                                
 456                                
 457                            </li>
 458                        
 459                            <li class="index-item property inherited">
 460                                <a href="#property_usesContext">usesContext</a>
 461
 462                                
 463                                
 464                            </li>
 465                        
 466                            <li class="index-item property inherited">
 467                                <a href="#property_VTX_SHADER">VTX_SHADER</a>
 468
 469                                
 470                                
 471                            </li>
 472                        
 473                    </ul>
 474                </div>
 475            
 476
 477            
 478
 479            
 480        </div>
 481
 482        
 483            <div id="methods" class="api-class-tabpanel">
 484                <h2 class="off-left">Methods</h2>
 485
 486                
 487                    <div id="method__applyFilter" class="method item inherited">
 488    <h3 class="name"><code>_applyFilter</code></h3>
 489
 490    
 491        <div class="args">
 492            <span class="paren">(</span><ul class="args-list inline commas">
 493            
 494                <li class="arg">
 495                    
 496                        <code>imageData</code>
 497                    
 498                </li>
 499            
 500            </ul><span class="paren">)</span>
 501        </div>
 502    
 503
 504    
 505        <span class="returns-inline">
 506            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
 507        </span>
 508    
 509
 510    
 511
 512    
 513
 514    
 515
 516    
 517
 518    
 519
 520    
 521
 522    <div class="meta">
 523        
 524            
 525                <p>Inherited from
 526                <a href="../classes/Filter.html#method__applyFilter">Filter</a>:
 527            
 528        
 529        
 530        <a href="../files/easeljs_filters_Filter.js.html#l180"><code>_applyFilter:180</code></a>
 531        
 532        </p>
 533
 534
 535        
 536
 537        
 538    </div>
 539
 540    <div class="description">
 541        
 542    </div>
 543
 544    
 545        <div class="params">
 546            <h4>Parameters:</h4>
 547
 548            <ul class="params-list">
 549            
 550                <li class="param">
 551                    
 552                        <code class="param-name">imageData</code>
 553                        <span class="type">ImageData</span>
 554                    
 555
 556                    
 557
 558                    <div class="param-description">
 559                        <p>Target ImageData instance.</p>
 560
 561                    </div>
 562
 563                    
 564                </li>
 565            
 566            </ul>
 567        </div>
 568    
 569
 570    
 571        <div class="returns">
 572            <h4>Returns:</h4>
 573
 574            <div class="returns-description">
 575                
 576                    
 577                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
 578                    
 579                
 580            </div>
 581        </div>
 582    
 583
 584    
 585</div>
 586
 587                
 588                    <div id="method__prepAlphaMap" class="method item protected">
 589    <h3 class="name"><code>_prepAlphaMap</code></h3>
 590
 591    
 592        <span class="paren">()</span>
 593    
 594
 595    
 596
 597    
 598
 599    
 600        <span class="flag protected">protected</span>
 601    
 602
 603    
 604
 605    
 606
 607    
 608
 609    
 610
 611    <div class="meta">
 612        
 613            
 614                
 615                <p>
 616                
 617                Defined in
 618                
 619            
 620        
 621        
 622        <a href="../files/easeljs_filters_AlphaMapFilter.js.html#l161"><code>_prepAlphaMap:161</code></a>
 623        
 624        </p>
 625
 626
 627        
 628
 629        
 630    </div>
 631
 632    <div class="description">
 633        
 634    </div>
 635
 636    
 637
 638    
 639
 640    
 641</div>
 642
 643                
 644                    <div id="method_applyFilter" class="method item inherited">
 645    <h3 class="name"><code>applyFilter</code></h3>
 646
 647    
 648        <div class="args">
 649            <span class="paren">(</span><ul class="args-list inline commas">
 650            
 651                <li class="arg">
 652                    
 653                        <code>ctx</code>
 654                    
 655                </li>
 656            
 657                <li class="arg">
 658                    
 659                        <code>x</code>
 660                    
 661                </li>
 662            
 663                <li class="arg">
 664                    
 665                        <code>y</code>
 666                    
 667                </li>
 668            
 669                <li class="arg">
 670                    
 671                        <code>width</code>
 672                    
 673                </li>
 674            
 675                <li class="arg">
 676                    
 677                        <code>height</code>
 678                    
 679                </li>
 680            
 681                <li class="arg">
 682                    
 683                        <code class="optional">[targetCtx]</code>
 684                    
 685                </li>
 686            
 687                <li class="arg">
 688                    
 689                        <code class="optional">[targetX]</code>
 690                    
 691                </li>
 692            
 693                <li class="arg">
 694                    
 695                        <code class="optional">[targetY]</code>
 696                    
 697                </li>
 698            
 699            </ul><span class="paren">)</span>
 700        </div>
 701    
 702
 703    
 704        <span class="returns-inline">
 705            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
 706        </span>
 707    
 708
 709    
 710
 711    
 712
 713    
 714
 715    
 716
 717    
 718
 719    
 720
 721    <div class="meta">
 722        
 723            
 724                <p>Inherited from
 725                <a href="../classes/Filter.html#method_applyFilter">Filter</a>:
 726            
 727        
 728        
 729        <a href="../files/easeljs_filters_Filter.js.html#l131"><code>applyFilter:131</code></a>
 730        
 731        </p>
 732
 733
 734        
 735
 736        
 737    </div>
 738
 739    <div class="description">
 740        <p>Applies the filter to the specified context.</p>
 741
 742    </div>
 743
 744    
 745        <div class="params">
 746            <h4>Parameters:</h4>
 747
 748            <ul class="params-list">
 749            
 750                <li class="param">
 751                    
 752                        <code class="param-name">ctx</code>
 753                        <span class="type">CanvasRenderingContext2D</span>
 754                    
 755
 756                    
 757
 758                    <div class="param-description">
 759                        <p>The 2D context to use as the source.</p>
 760
 761                    </div>
 762
 763                    
 764                </li>
 765            
 766                <li class="param">
 767                    
 768                        <code class="param-name">x</code>
 769                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 770                    
 771
 772                    
 773
 774                    <div class="param-description">
 775                        <p>The x position to use for the source rect.</p>
 776
 777                    </div>
 778
 779                    
 780                </li>
 781            
 782                <li class="param">
 783                    
 784                        <code class="param-name">y</code>
 785                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 786                    
 787
 788                    
 789
 790                    <div class="param-description">
 791                        <p>The y position to use for the source rect.</p>
 792
 793                    </div>
 794
 795                    
 796                </li>
 797            
 798                <li class="param">
 799                    
 800                        <code class="param-name">width</code>
 801                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 802                    
 803
 804                    
 805
 806                    <div class="param-description">
 807                        <p>The width to use for the source rect.</p>
 808
 809                    </div>
 810
 811                    
 812                </li>
 813            
 814                <li class="param">
 815                    
 816                        <code class="param-name">height</code>
 817                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 818                    
 819
 820                    
 821
 822                    <div class="param-description">
 823                        <p>The height to use for the source rect.</p>
 824
 825                    </div>
 826
 827                    
 828                </li>
 829            
 830                <li class="param">
 831                    
 832                        <code class="param-name optional">[targetCtx]</code>
 833                        <span class="type">CanvasRenderingContext2D</span>
 834                        <span class="flag optional" title="This parameter is optional.">optional</span>
 835                    
 836
 837                    
 838
 839                    <div class="param-description">
 840                        <p>The 2D context to draw the result to. Defaults to the context passed to ctx.</p>
 841
 842                    </div>
 843
 844                    
 845                </li>
 846            
 847                <li class="param">
 848                    
 849                        <code class="param-name optional">[targetX]</code>
 850                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 851                        <span class="flag optional" title="This parameter is optional.">optional</span>
 852                    
 853
 854                    
 855
 856                    <div class="param-description">
 857                        <p>The x position to draw the result to. Defaults to the value passed to x.</p>
 858
 859                    </div>
 860
 861                    
 862                </li>
 863            
 864                <li class="param">
 865                    
 866                        <code class="param-name optional">[targetY]</code>
 867                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 868                        <span class="flag optional" title="This parameter is optional.">optional</span>
 869                    
 870
 871                    
 872
 873                    <div class="param-description">
 874                        <p>The y position to draw the result to. Defaults to the value passed to y.</p>
 875
 876                    </div>
 877
 878                    
 879                </li>
 880            
 881            </ul>
 882        </div>
 883    
 884
 885    
 886        <div class="returns">
 887            <h4>Returns:</h4>
 888
 889            <div class="returns-description">
 890                
 891                    
 892                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
 893                    
 894                    <p>If the filter was applied successfully.</p>
 895
 896                
 897            </div>
 898        </div>
 899    
 900
 901    
 902</div>
 903
 904                
 905                    <div id="method_clone" class="method item inherited">
 906    <h3 class="name"><code>clone</code></h3>
 907
 908    
 909        <span class="paren">()</span>
 910    
 911
 912    
 913        <span class="returns-inline">
 914            <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>
 915        </span>
 916    
 917
 918    
 919
 920    
 921
 922    
 923
 924    
 925
 926    
 927
 928    
 929
 930    <div class="meta">
 931        
 932            
 933                <p>Inherited from
 934                <a href="../classes/Filter.html#method_clone">Filter</a>:
 935            
 936        
 937        
 938        <a href="../files/easeljs_filters_Filter.js.html#l170"><code>clone:170</code></a>
 939        
 940        </p>
 941
 942
 943        
 944
 945        
 946    </div>
 947
 948    <div class="description">
 949        <p>Returns a clone of this Filter instance.</p>
 950
 951    </div>
 952
 953    
 954
 955    
 956        <div class="returns">
 957            <h4>Returns:</h4>
 958
 959            <div class="returns-description">
 960                
 961                    
 962                        <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>:
 963                    
 964                    <p>A clone of the current Filter instance.</p>
 965
 966                
 967            </div>
 968        </div>
 969    
 970
 971    
 972</div>
 973
 974                
 975                    <div id="method_getBounds" class="method item inherited">
 976    <h3 class="name"><code>getBounds</code></h3>
 977
 978    
 979        <div class="args">
 980            <span class="paren">(</span><ul class="args-list inline commas">
 981            
 982                <li class="arg">
 983                    
 984                        <code class="optional">[rect]</code>
 985                    
 986                </li>
 987            
 988            </ul><span class="paren">)</span>
 989        </div>
 990    
 991
 992    
 993        <span class="returns-inline">
 994            <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
 995        </span>
 996    
 997
 998    
 999
1000    
1001
1002    
1003
1004    
1005
1006    
1007
1008    
1009
1010    <div class="meta">
1011        
1012            
1013                <p>Inherited from
1014                <a href="../classes/Filter.html#method_getBounds">Filter</a>:
1015            
1016        
1017        
1018        <a href="../files/easeljs_filters_Filter.js.html#l111"><code>getBounds:111</code></a>
1019        
1020        </p>
1021
1022
1023        
1024
1025        
1026    </div>
1027
1028    <div class="description">
1029        <p>Provides padding values for this filter. That is, how much the filter will extend the visual bounds of an object it is applied to.</p>
1030
1031    </div>
1032
1033    
1034        <div class="params">
1035            <h4>Parameters:</h4>
1036
1037            <ul class="params-list">
1038            
1039                <li class="param">
1040                    
1041                        <code class="param-name optional">[rect]</code>
1042                        <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
1043                        <span class="flag optional" title="This parameter is optional.">optional</span>
1044                    
1045
1046                    
1047
1048                    <div class="param-description">
1049                        <p>If specified, the provided Rectangle instance will be expanded by the padding amounts and returned.</p>
1050
1051                    </div>
1052
1053                    
1054                </li>
1055            
1056            </ul>
1057        </div>
1058    
1059
1060    
1061        <div class="returns">
1062            <h4>Returns:</h4>
1063
1064            <div class="returns-description">
1065                
1066                    
1067                        <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>:
1068                    
1069                    <p>If a <code>rect</code> param was provided, it is returned. If not, either a new rectangle with the padding values, or null if no padding is required for this filter.</p>
1070
1071                
1072            </div>
1073        </div>
1074    
1075
1076    
1077</div>
1078
1079                
1080                    <div id="method_shaderParamSetup" class="method item inherited">
1081    <h3 class="name"><code>shaderParamSetup</code></h3>
1082
1083    
1084        <div class="args">
1085            <span class="paren">(</span><ul class="args-list inline commas">
1086            
1087                <li class="arg">
1088                    
1089                        <code>gl</code>
1090                    
1091                </li>
1092            
1093                <li class="arg">
1094                    
1095                        <code>stage</code>
1096                    
1097                </li>
1098            
1099                <li class="arg">
1100                    
1101                        <code>shaderProgram</code>
1102                    
1103                </li>
1104            
1105            </ul><span class="paren">)</span>
1106        </div>
1107    
1108
1109    
1110
1111    
1112
1113    
1114
1115    
1116
1117    
1118
1119    
1120
1121    
1122
1123    <div class="meta">
1124        
1125            
1126                <p>Inherited from
1127                <a href="../classes/Filter.html#method_shaderParamSetup">Filter</a>:
1128            
1129        
1130        
1131        <a href="../files/easeljs_filters_Filter.js.html#l121"><code>shaderParamSetup:121</code></a>
1132        
1133        </p>
1134
1135
1136        
1137
1138        
1139    </div>
1140
1141    <div class="description">
1142        <p>Assign any unique uniforms or other setup functionality here.</p>
1143
1144    </div>
1145
1146    
1147        <div class="params">
1148            <h4>Parameters:</h4>
1149
1150            <ul class="params-list">
1151            
1152                <li class="param">
1153                    
1154                        <code class="param-name">gl</code>
1155                        <span class="type">WebGLContext</span>
1156                    
1157
1158                    
1159
1160                    <div class="param-description">
1161                        <p>The context associated with the stage performing the render.</p>
1162
1163                    </div>
1164
1165                    
1166                </li>
1167            
1168                <li class="param">
1169                    
1170                        <code class="param-name">stage</code>
1171                        <span class="type"><a href="../classes/StageGL.html" class="crosslink">StageGL</a></span>
1172                    
1173
1174                    
1175
1176                    <div class="param-description">
1177                        <p>The stage instance that will be rendering.</p>
1178
1179                    </div>
1180
1181                    
1182                </li>
1183            
1184                <li class="param">
1185                    
1186                        <code class="param-name">shaderProgram</code>
1187                        <span class="type">ShaderProgram</span>
1188                    
1189
1190                    
1191
1192                    <div class="param-description">
1193                        <p>The compiled shader that is going to be used to perform the render.</p>
1194
1195                    </div>
1196
1197                    
1198                </li>
1199            
1200            </ul>
1201        </div>
1202    
1203
1204    
1205
1206    
1207</div>
1208
1209                
1210                    <div id="method_toString" class="method item inherited">
1211    <h3 class="name"><code>toString</code></h3>
1212
1213    
1214        <span class="paren">()</span>
1215    
1216
1217    
1218        <span class="returns-inline">
1219            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1220        </span>
1221    
1222
1223    
1224
1225    
1226
1227    
1228
1229    
1230
1231    
1232
1233    
1234
1235    <div class="meta">
1236        
1237            
1238                <p>Inherited from
1239                <a href="../classes/Filter.html#method_toString">Filter</a>:
1240            
1241        
1242        
1243        <a href="../files/easeljs_filters_Filter.js.html#l161"><code>toString:161</code></a>
1244        
1245        </p>
1246
1247
1248        
1249
1250        
1251    </div>
1252
1253    <div class="description">
1254        <p>Returns a string representation of this object.</p>
1255
1256    </div>
1257
1258    
1259
1260    
1261        <div class="returns">
1262            <h4>Returns:</h4>
1263
1264            <div class="returns-description">
1265                
1266                    
1267                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
1268                    
1269                    <p>a string representation of the instance.</p>
1270
1271                
1272            </div>
1273        </div>
1274    
1275
1276    
1277</div>
1278
1279                
1280            </div>
1281        
1282
1283        
1284            <div id="properties" class="api-class-tabpanel">
1285                <h2 class="off-left">Properties</h2>
1286
1287                
1288                    <div id="property__alphaMap" class="property item protected">
1289    <h3 class="name"><code>_alphaMap</code></h3>
1290    <span class="type">HTMLImageElement | HTMLCanvasElement</span>
1291
1292    
1293
1294    
1295        <span class="flag protected">protected</span>
1296    
1297
1298    
1299
1300    
1301
1302    
1303
1304    <div class="meta">
1305        
1306            
1307                
1308                <p>
1309                
1310                Defined in
1311                
1312            
1313        
1314        
1315        <a href="../files/easeljs_filters_AlphaMapFilter.js.html#l84"><code>_alphaMap:84</code></a>
1316        
1317        </p>
1318
1319        
1320
1321        
1322    </div>
1323
1324    <div class="description">
1325        
1326    </div>
1327
1328    
1329
1330    
1331
1332    
1333</div>
1334
1335                
1336                    <div id="property__mapData" class="property item protected">
1337    <h3 class="name"><code>_mapData</code></h3>
1338    <span class="type">Uint8ClampedArray</span>
1339
1340    
1341
1342    
1343        <span class="flag protected">protected</span>
1344    
1345
1346    
1347
1348    
1349
1350    
1351
1352    <div class="meta">
1353        
1354            
1355                
1356                <p>
1357                
1358                Defined in
1359                
1360            
1361        
1362        
1363        <a href="../files/easeljs_filters_AlphaMapFilter.js.html#l91"><code>_mapData:91</code></a>
1364        
1365        </p>
1366
1367        
1368
1369        
1370    </div>
1371
1372    <div class="description">
1373        
1374    </div>
1375
1376    
1377
1378    
1379
1380    
1381</div>
1382
1383                
1384                    <div id="property__multiPass" class="property item private inherited">
1385    <h3 class="name"><code>_multiPass</code></h3>
1386    <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>
1387
1388    
1389
1390    
1391        <span class="flag private">private</span>
1392    
1393
1394    
1395
1396    
1397
1398    
1399
1400    <div class="meta">
1401        
1402            
1403                <p>Inherited from
1404                <a href="../classes/Filter.html#property__multiPass">Filter</a>:
1405            
1406        
1407        
1408        <a href="../files/easeljs_filters_Filter.js.html#l79"><code>_multiPass:79</code></a>
1409        
1410        </p>
1411
1412        
1413
1414        
1415    </div>
1416
1417    <div class="description">
1418        <p>Another filter that is required to act as part of this filter and created and managed under the hood.</p>
1419
1420    </div>
1421
1422    
1423        <p><strong>Default:</strong> null</p>
1424    
1425
1426    
1427
1428    
1429</div>
1430
1431                
1432                    <div id="property_alphaMap" class="property item">
1433    <h3 class="name"><code>alphaMap</code></h3>
1434    <span class="type">HTMLImageElement | HTMLCanvasElement</span>
1435
1436    
1437
1438    
1439
1440    
1441
1442    
1443
1444    
1445
1446    <div class="meta">
1447        
1448            
1449                
1450                <p>
1451                
1452                Defined in
1453                
1454            
1455        
1456        
1457        <a href="../files/easeljs_filters_AlphaMapFilter.js.html#l74"><code>alphaMap:74</code></a>
1458        
1459        </p>
1460
1461        
1462
1463        
1464    </div>
1465
1466    <div class="description">
1467        <p>The greyscale image (or canvas) to use as the alpha value for the result. This should be exactly the same
1468dimensions as the target.</p>
1469
1470    </div>
1471
1472    
1473
1474    
1475
1476    
1477</div>
1478
1479                
1480                    <div id="property_FRAG_SHADER" class="property item inherited">
1481    <h3 class="name"><code>FRAG_SHADER</code></h3>
1482    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1483
1484    
1485
1486    
1487
1488    
1489
1490    
1491
1492    
1493        <span class="flag readonly">readonly</span>
1494    
1495
1496    <div class="meta">
1497        
1498            
1499                <p>Inherited from
1500                <a href="../classes/Filter.html#property_FRAG_SHADER">Filter</a>:
1501            
1502        
1503        
1504        <a href="../files/easeljs_filters_Filter.js.html#l98"><code>FRAG_SHADER:98</code></a>
1505        
1506        </p>
1507
1508        
1509
1510        
1511    </div>
1512
1513    <div class="description">
1514        <p>Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.
1515This should be based upon StageGL.SHADER_FRAGMENT_BODY_REGULAR</p>
1516
1517    </div>
1518
1519    
1520
1521    
1522
1523    
1524</div>
1525
1526                
1527                    <div id="property_usesContext" class="property item inherited">
1528    <h3 class="name"><code>usesContext</code></h3>
1529    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
1530
1531    
1532
1533    
1534
1535    
1536
1537    
1538
1539    
1540
1541    <div class="meta">
1542        
1543            
1544                <p>Inherited from
1545                <a href="../classes/Filter.html#property_usesContext">Filter</a>:
1546            
1547        
1548        
1549        <a href="../files/easeljs_filters_Filter.js.html#l71"><code>usesContext:71</code></a>
1550        
1551        </p>
1552
1553        
1554
1555        
1556    </div>
1557
1558    <div class="description">
1559        <p>A flag stating that this filter uses a context draw mode and cannot be batched into imageData processing.</p>
1560
1561    </div>
1562
1563    
1564        <p><strong>Default:</strong> false</p>
1565    
1566
1567    
1568
1569    
1570</div>
1571
1572                
1573                    <div id="property_VTX_SHADER" class="property item inherited">
1574    <h3 class="name"><code>VTX_SHADER</code></h3>
1575    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1576
1577    
1578
1579    
1580
1581    
1582
1583    
1584
1585    
1586        <span class="flag readonly">readonly</span>
1587    
1588
1589    <div class="meta">
1590        
1591            
1592                <p>Inherited from
1593                <a href="../classes/Filter.html#property_VTX_SHADER">Filter</a>:
1594            
1595        
1596        
1597        <a href="../files/easeljs_filters_Filter.js.html#l88"><code>VTX_SHADER:88</code></a>
1598        
1599        </p>
1600
1601        
1602
1603        
1604    </div>
1605
1606    <div class="description">
1607        <p>Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.
1608This should be based upon StageGL.SHADER_VERTEX_BODY_REGULAR</p>
1609
1610    </div>
1611
1612    
1613
1614    
1615
1616    
1617</div>
1618
1619                
1620            </div>
1621        
1622
1623        
1624
1625        
1626    </div>
1627</div>
1628
1629                    </div>
1630                </div>
1631            </div>
1632        </div>
1633    </div>
1634</div>
1635<script src="../assets/vendor/prettify/prettify-min.js"></script>
1636<script>prettyPrint();</script>
1637<script src="../assets/js/yui-prettify.js"></script>
1638<script src="../assets/../api.js"></script>
1639<script src="../assets/js/api-filter.js"></script>
1640<script src="../assets/js/api-list.js"></script>
1641<script src="../assets/js/api-search.js"></script>
1642<script src="../assets/js/apidocs.js"></script>
1643</body>
1644</html>