all repos — simplyrpg @ 99d2f828009feee73ba45ef124cbaa02ff1d61dd

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

libraries/EaselJS_docs/classes/Filter.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 : Filter</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>Filter Class</h1>
 199<div class="box meta">
 200    
 201
 202    
 203
 204    
 205        <div class="foundat">
 206            Defined in: <a href="../files/easeljs_filters_Filter.js.html#l41"><code>Filter: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>Base class that all filters should inherit from. Filters need to be applied to objects that have been cached using
 223the <a href="../classes/DisplayObject.html#method_cache" class="crosslink">cache</a> method. If an object changes, please cache it again, or use
 224<a href="../classes/DisplayObject.html#method_updateCache" class="crosslink">updateCache</a>. Note that the filters must be applied before caching.</p>
 225<h4>Example</h4>
 226
 227<pre class="code prettyprint"><code> myInstance.filters = [
 228     new createjs.ColorFilter(0, 0, 0, 1, 255, 0, 0),
 229     new createjs.BlurFilter(5, 5, 10)
 230 ];
 231 myInstance.cache(0,0, 100, 100);</code></pre>
 232<p>Note that each filter can implement a <a href="../classes/Filter.html#method_getBounds" class="crosslink">getBounds</a> method, which returns the
 233margins that need to be applied in order to fully display the filter. For example, the <a href="../classes/BlurFilter.html" class="crosslink">BlurFilter</a>
 234will cause an object to feather outwards, resulting in a margin around the shape.</p>
 235<p><h4>EaselJS Filters</h4>
 236EaselJS comes with a number of pre-built filters:</p>
 237<ul><li><a href="../classes/AlphaMapFilter.html" class="crosslink">AlphaMapFilter</a> : Map a greyscale image to the alpha channel of a display object</li>
 238     <li><a href="../classes/AlphaMaskFilter.html" class="crosslink">AlphaMaskFilter</a>: Map an image&#39;s alpha channel to the alpha channel of a display object</li>
 239     <li><a href="../classes/BlurFilter.html" class="crosslink">BlurFilter</a>: Apply vertical and horizontal blur to a display object</li>
 240     <li><a href="../classes/ColorFilter.html" class="crosslink">ColorFilter</a>: Color transform a display object</li>
 241     <li><a href="../classes/ColorMatrixFilter.html" class="crosslink">ColorMatrixFilter</a>: Transform an image using a <a href="../classes/ColorMatrix.html" class="crosslink">ColorMatrix</a></li>
 242</ul>
 243</div>
 244
 245
 246    <div class="constructor">
 247        <h2>Constructor</h2>
 248        <div id="method_Filter" class="method item">
 249    <h3 class="name"><code>Filter</code></h3>
 250
 251    
 252        <span class="paren">()</span>
 253    
 254
 255    
 256
 257    
 258
 259    
 260
 261    
 262
 263    
 264
 265    
 266
 267    
 268
 269    <div class="meta">
 270        
 271            
 272                
 273                <p>
 274                
 275                Defined in
 276                
 277            
 278        
 279        
 280        <a href="../files/easeljs_filters_Filter.js.html#l41"><code>Filter:41</code></a>
 281        
 282        </p>
 283
 284
 285        
 286
 287        
 288    </div>
 289
 290    <div class="description">
 291        
 292    </div>
 293
 294    
 295
 296    
 297
 298    
 299</div>
 300
 301    </div>
 302
 303
 304<div id="classdocs" class="tabview">
 305    <ul class="api-class-tabs">
 306        <li class="api-class-tab index"><a href="#index">Index</a></li>
 307
 308        
 309            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
 310        
 311        
 312            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
 313        
 314        
 315        
 316    </ul>
 317
 318    <div>
 319        <div id="index" class="api-class-tabpanel index">
 320            <h2 class="off-left">Item Index</h2>
 321
 322            
 323                <div class="index-section methods">
 324                    <h3>Methods</h3>
 325
 326                    <ul class="index-list methods">
 327                        
 328                            <li class="index-item method">
 329                                <a href="#method__applyFilter">_applyFilter</a>
 330
 331                                
 332                                
 333                            </li>
 334                        
 335                            <li class="index-item method">
 336                                <a href="#method_applyFilter">applyFilter</a>
 337
 338                                
 339                                
 340                            </li>
 341                        
 342                            <li class="index-item method">
 343                                <a href="#method_clone">clone</a>
 344
 345                                
 346                                
 347                            </li>
 348                        
 349                            <li class="index-item method">
 350                                <a href="#method_getBounds">getBounds</a>
 351
 352                                
 353                                
 354                            </li>
 355                        
 356                            <li class="index-item method">
 357                                <a href="#method_shaderParamSetup">shaderParamSetup</a>
 358
 359                                
 360                                
 361                            </li>
 362                        
 363                            <li class="index-item method">
 364                                <a href="#method_toString">toString</a>
 365
 366                                
 367                                
 368                            </li>
 369                        
 370                    </ul>
 371                </div>
 372            
 373
 374            
 375                <div class="index-section properties">
 376                    <h3>Properties</h3>
 377
 378                    <ul class="index-list properties">
 379                        
 380                            <li class="index-item property private">
 381                                <a href="#property__multiPass">_multiPass</a>
 382
 383                                
 384                                
 385                            </li>
 386                        
 387                            <li class="index-item property">
 388                                <a href="#property_FRAG_SHADER">FRAG_SHADER</a>
 389
 390                                
 391                                
 392                            </li>
 393                        
 394                            <li class="index-item property">
 395                                <a href="#property_usesContext">usesContext</a>
 396
 397                                
 398                                
 399                            </li>
 400                        
 401                            <li class="index-item property">
 402                                <a href="#property_VTX_SHADER">VTX_SHADER</a>
 403
 404                                
 405                                
 406                            </li>
 407                        
 408                    </ul>
 409                </div>
 410            
 411
 412            
 413
 414            
 415        </div>
 416
 417        
 418            <div id="methods" class="api-class-tabpanel">
 419                <h2 class="off-left">Methods</h2>
 420
 421                
 422                    <div id="method__applyFilter" class="method item">
 423    <h3 class="name"><code>_applyFilter</code></h3>
 424
 425    
 426        <div class="args">
 427            <span class="paren">(</span><ul class="args-list inline commas">
 428            
 429                <li class="arg">
 430                    
 431                        <code>imageData</code>
 432                    
 433                </li>
 434            
 435            </ul><span class="paren">)</span>
 436        </div>
 437    
 438
 439    
 440        <span class="returns-inline">
 441            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
 442        </span>
 443    
 444
 445    
 446
 447    
 448
 449    
 450
 451    
 452
 453    
 454
 455    
 456
 457    <div class="meta">
 458        
 459            
 460                
 461                <p>
 462                
 463                Defined in
 464                
 465            
 466        
 467        
 468        <a href="../files/easeljs_filters_Filter.js.html#l180"><code>_applyFilter:180</code></a>
 469        
 470        </p>
 471
 472
 473        
 474
 475        
 476    </div>
 477
 478    <div class="description">
 479        
 480    </div>
 481
 482    
 483        <div class="params">
 484            <h4>Parameters:</h4>
 485
 486            <ul class="params-list">
 487            
 488                <li class="param">
 489                    
 490                        <code class="param-name">imageData</code>
 491                        <span class="type">ImageData</span>
 492                    
 493
 494                    
 495
 496                    <div class="param-description">
 497                        <p>Target ImageData instance.</p>
 498
 499                    </div>
 500
 501                    
 502                </li>
 503            
 504            </ul>
 505        </div>
 506    
 507
 508    
 509        <div class="returns">
 510            <h4>Returns:</h4>
 511
 512            <div class="returns-description">
 513                
 514                    
 515                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
 516                    
 517                
 518            </div>
 519        </div>
 520    
 521
 522    
 523</div>
 524
 525                
 526                    <div id="method_applyFilter" class="method item">
 527    <h3 class="name"><code>applyFilter</code></h3>
 528
 529    
 530        <div class="args">
 531            <span class="paren">(</span><ul class="args-list inline commas">
 532            
 533                <li class="arg">
 534                    
 535                        <code>ctx</code>
 536                    
 537                </li>
 538            
 539                <li class="arg">
 540                    
 541                        <code>x</code>
 542                    
 543                </li>
 544            
 545                <li class="arg">
 546                    
 547                        <code>y</code>
 548                    
 549                </li>
 550            
 551                <li class="arg">
 552                    
 553                        <code>width</code>
 554                    
 555                </li>
 556            
 557                <li class="arg">
 558                    
 559                        <code>height</code>
 560                    
 561                </li>
 562            
 563                <li class="arg">
 564                    
 565                        <code class="optional">[targetCtx]</code>
 566                    
 567                </li>
 568            
 569                <li class="arg">
 570                    
 571                        <code class="optional">[targetX]</code>
 572                    
 573                </li>
 574            
 575                <li class="arg">
 576                    
 577                        <code class="optional">[targetY]</code>
 578                    
 579                </li>
 580            
 581            </ul><span class="paren">)</span>
 582        </div>
 583    
 584
 585    
 586        <span class="returns-inline">
 587            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
 588        </span>
 589    
 590
 591    
 592
 593    
 594
 595    
 596
 597    
 598
 599    
 600
 601    
 602
 603    <div class="meta">
 604        
 605            
 606                
 607                <p>
 608                
 609                Defined in
 610                
 611            
 612        
 613        
 614        <a href="../files/easeljs_filters_Filter.js.html#l131"><code>applyFilter:131</code></a>
 615        
 616        </p>
 617
 618
 619        
 620
 621        
 622    </div>
 623
 624    <div class="description">
 625        <p>Applies the filter to the specified context.</p>
 626
 627    </div>
 628
 629    
 630        <div class="params">
 631            <h4>Parameters:</h4>
 632
 633            <ul class="params-list">
 634            
 635                <li class="param">
 636                    
 637                        <code class="param-name">ctx</code>
 638                        <span class="type">CanvasRenderingContext2D</span>
 639                    
 640
 641                    
 642
 643                    <div class="param-description">
 644                        <p>The 2D context to use as the source.</p>
 645
 646                    </div>
 647
 648                    
 649                </li>
 650            
 651                <li class="param">
 652                    
 653                        <code class="param-name">x</code>
 654                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 655                    
 656
 657                    
 658
 659                    <div class="param-description">
 660                        <p>The x position to use for the source rect.</p>
 661
 662                    </div>
 663
 664                    
 665                </li>
 666            
 667                <li class="param">
 668                    
 669                        <code class="param-name">y</code>
 670                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 671                    
 672
 673                    
 674
 675                    <div class="param-description">
 676                        <p>The y position to use for the source rect.</p>
 677
 678                    </div>
 679
 680                    
 681                </li>
 682            
 683                <li class="param">
 684                    
 685                        <code class="param-name">width</code>
 686                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 687                    
 688
 689                    
 690
 691                    <div class="param-description">
 692                        <p>The width to use for the source rect.</p>
 693
 694                    </div>
 695
 696                    
 697                </li>
 698            
 699                <li class="param">
 700                    
 701                        <code class="param-name">height</code>
 702                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 703                    
 704
 705                    
 706
 707                    <div class="param-description">
 708                        <p>The height to use for the source rect.</p>
 709
 710                    </div>
 711
 712                    
 713                </li>
 714            
 715                <li class="param">
 716                    
 717                        <code class="param-name optional">[targetCtx]</code>
 718                        <span class="type">CanvasRenderingContext2D</span>
 719                        <span class="flag optional" title="This parameter is optional.">optional</span>
 720                    
 721
 722                    
 723
 724                    <div class="param-description">
 725                        <p>The 2D context to draw the result to. Defaults to the context passed to ctx.</p>
 726
 727                    </div>
 728
 729                    
 730                </li>
 731            
 732                <li class="param">
 733                    
 734                        <code class="param-name optional">[targetX]</code>
 735                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 736                        <span class="flag optional" title="This parameter is optional.">optional</span>
 737                    
 738
 739                    
 740
 741                    <div class="param-description">
 742                        <p>The x position to draw the result to. Defaults to the value passed to x.</p>
 743
 744                    </div>
 745
 746                    
 747                </li>
 748            
 749                <li class="param">
 750                    
 751                        <code class="param-name optional">[targetY]</code>
 752                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 753                        <span class="flag optional" title="This parameter is optional.">optional</span>
 754                    
 755
 756                    
 757
 758                    <div class="param-description">
 759                        <p>The y position to draw the result to. Defaults to the value passed to y.</p>
 760
 761                    </div>
 762
 763                    
 764                </li>
 765            
 766            </ul>
 767        </div>
 768    
 769
 770    
 771        <div class="returns">
 772            <h4>Returns:</h4>
 773
 774            <div class="returns-description">
 775                
 776                    
 777                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
 778                    
 779                    <p>If the filter was applied successfully.</p>
 780
 781                
 782            </div>
 783        </div>
 784    
 785
 786    
 787</div>
 788
 789                
 790                    <div id="method_clone" class="method item">
 791    <h3 class="name"><code>clone</code></h3>
 792
 793    
 794        <span class="paren">()</span>
 795    
 796
 797    
 798        <span class="returns-inline">
 799            <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>
 800        </span>
 801    
 802
 803    
 804
 805    
 806
 807    
 808
 809    
 810
 811    
 812
 813    
 814
 815    <div class="meta">
 816        
 817            
 818                
 819                <p>
 820                
 821                Defined in
 822                
 823            
 824        
 825        
 826        <a href="../files/easeljs_filters_Filter.js.html#l170"><code>clone:170</code></a>
 827        
 828        </p>
 829
 830
 831        
 832
 833        
 834    </div>
 835
 836    <div class="description">
 837        <p>Returns a clone of this Filter instance.</p>
 838
 839    </div>
 840
 841    
 842
 843    
 844        <div class="returns">
 845            <h4>Returns:</h4>
 846
 847            <div class="returns-description">
 848                
 849                    
 850                        <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>:
 851                    
 852                    <p>A clone of the current Filter instance.</p>
 853
 854                
 855            </div>
 856        </div>
 857    
 858
 859    
 860</div>
 861
 862                
 863                    <div id="method_getBounds" class="method item">
 864    <h3 class="name"><code>getBounds</code></h3>
 865
 866    
 867        <div class="args">
 868            <span class="paren">(</span><ul class="args-list inline commas">
 869            
 870                <li class="arg">
 871                    
 872                        <code class="optional">[rect]</code>
 873                    
 874                </li>
 875            
 876            </ul><span class="paren">)</span>
 877        </div>
 878    
 879
 880    
 881        <span class="returns-inline">
 882            <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
 883        </span>
 884    
 885
 886    
 887
 888    
 889
 890    
 891
 892    
 893
 894    
 895
 896    
 897
 898    <div class="meta">
 899        
 900            
 901                
 902                <p>
 903                
 904                Defined in
 905                
 906            
 907        
 908        
 909        <a href="../files/easeljs_filters_Filter.js.html#l111"><code>getBounds:111</code></a>
 910        
 911        </p>
 912
 913
 914        
 915
 916        
 917    </div>
 918
 919    <div class="description">
 920        <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>
 921
 922    </div>
 923
 924    
 925        <div class="params">
 926            <h4>Parameters:</h4>
 927
 928            <ul class="params-list">
 929            
 930                <li class="param">
 931                    
 932                        <code class="param-name optional">[rect]</code>
 933                        <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
 934                        <span class="flag optional" title="This parameter is optional.">optional</span>
 935                    
 936
 937                    
 938
 939                    <div class="param-description">
 940                        <p>If specified, the provided Rectangle instance will be expanded by the padding amounts and returned.</p>
 941
 942                    </div>
 943
 944                    
 945                </li>
 946            
 947            </ul>
 948        </div>
 949    
 950
 951    
 952        <div class="returns">
 953            <h4>Returns:</h4>
 954
 955            <div class="returns-description">
 956                
 957                    
 958                        <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>:
 959                    
 960                    <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>
 961
 962                
 963            </div>
 964        </div>
 965    
 966
 967    
 968</div>
 969
 970                
 971                    <div id="method_shaderParamSetup" class="method item">
 972    <h3 class="name"><code>shaderParamSetup</code></h3>
 973
 974    
 975        <div class="args">
 976            <span class="paren">(</span><ul class="args-list inline commas">
 977            
 978                <li class="arg">
 979                    
 980                        <code>gl</code>
 981                    
 982                </li>
 983            
 984                <li class="arg">
 985                    
 986                        <code>stage</code>
 987                    
 988                </li>
 989            
 990                <li class="arg">
 991                    
 992                        <code>shaderProgram</code>
 993                    
 994                </li>
 995            
 996            </ul><span class="paren">)</span>
 997        </div>
 998    
 999
1000    
1001
1002    
1003
1004    
1005
1006    
1007
1008    
1009
1010    
1011
1012    
1013
1014    <div class="meta">
1015        
1016            
1017                
1018                <p>
1019                
1020                Defined in
1021                
1022            
1023        
1024        
1025        <a href="../files/easeljs_filters_Filter.js.html#l121"><code>shaderParamSetup:121</code></a>
1026        
1027        </p>
1028
1029
1030        
1031
1032        
1033    </div>
1034
1035    <div class="description">
1036        <p>Assign any unique uniforms or other setup functionality here.</p>
1037
1038    </div>
1039
1040    
1041        <div class="params">
1042            <h4>Parameters:</h4>
1043
1044            <ul class="params-list">
1045            
1046                <li class="param">
1047                    
1048                        <code class="param-name">gl</code>
1049                        <span class="type">WebGLContext</span>
1050                    
1051
1052                    
1053
1054                    <div class="param-description">
1055                        <p>The context associated with the stage performing the render.</p>
1056
1057                    </div>
1058
1059                    
1060                </li>
1061            
1062                <li class="param">
1063                    
1064                        <code class="param-name">stage</code>
1065                        <span class="type"><a href="../classes/StageGL.html" class="crosslink">StageGL</a></span>
1066                    
1067
1068                    
1069
1070                    <div class="param-description">
1071                        <p>The stage instance that will be rendering.</p>
1072
1073                    </div>
1074
1075                    
1076                </li>
1077            
1078                <li class="param">
1079                    
1080                        <code class="param-name">shaderProgram</code>
1081                        <span class="type">ShaderProgram</span>
1082                    
1083
1084                    
1085
1086                    <div class="param-description">
1087                        <p>The compiled shader that is going to be used to perform the render.</p>
1088
1089                    </div>
1090
1091                    
1092                </li>
1093            
1094            </ul>
1095        </div>
1096    
1097
1098    
1099
1100    
1101</div>
1102
1103                
1104                    <div id="method_toString" class="method item">
1105    <h3 class="name"><code>toString</code></h3>
1106
1107    
1108        <span class="paren">()</span>
1109    
1110
1111    
1112        <span class="returns-inline">
1113            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1114        </span>
1115    
1116
1117    
1118
1119    
1120
1121    
1122
1123    
1124
1125    
1126
1127    
1128
1129    <div class="meta">
1130        
1131            
1132                
1133                <p>
1134                
1135                Defined in
1136                
1137            
1138        
1139        
1140        <a href="../files/easeljs_filters_Filter.js.html#l161"><code>toString:161</code></a>
1141        
1142        </p>
1143
1144
1145        
1146
1147        
1148    </div>
1149
1150    <div class="description">
1151        <p>Returns a string representation of this object.</p>
1152
1153    </div>
1154
1155    
1156
1157    
1158        <div class="returns">
1159            <h4>Returns:</h4>
1160
1161            <div class="returns-description">
1162                
1163                    
1164                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
1165                    
1166                    <p>a string representation of the instance.</p>
1167
1168                
1169            </div>
1170        </div>
1171    
1172
1173    
1174</div>
1175
1176                
1177            </div>
1178        
1179
1180        
1181            <div id="properties" class="api-class-tabpanel">
1182                <h2 class="off-left">Properties</h2>
1183
1184                
1185                    <div id="property__multiPass" class="property item private">
1186    <h3 class="name"><code>_multiPass</code></h3>
1187    <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>
1188
1189    
1190
1191    
1192        <span class="flag private">private</span>
1193    
1194
1195    
1196
1197    
1198
1199    
1200
1201    <div class="meta">
1202        
1203            
1204                
1205                <p>
1206                
1207                Defined in
1208                
1209            
1210        
1211        
1212        <a href="../files/easeljs_filters_Filter.js.html#l79"><code>_multiPass:79</code></a>
1213        
1214        </p>
1215
1216        
1217
1218        
1219    </div>
1220
1221    <div class="description">
1222        <p>Another filter that is required to act as part of this filter and created and managed under the hood.</p>
1223
1224    </div>
1225
1226    
1227        <p><strong>Default:</strong> null</p>
1228    
1229
1230    
1231
1232    
1233</div>
1234
1235                
1236                    <div id="property_FRAG_SHADER" class="property item">
1237    <h3 class="name"><code>FRAG_SHADER</code></h3>
1238    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1239
1240    
1241
1242    
1243
1244    
1245
1246    
1247
1248    
1249        <span class="flag readonly">readonly</span>
1250    
1251
1252    <div class="meta">
1253        
1254            
1255                
1256                <p>
1257                
1258                Defined in
1259                
1260            
1261        
1262        
1263        <a href="../files/easeljs_filters_Filter.js.html#l98"><code>FRAG_SHADER:98</code></a>
1264        
1265        </p>
1266
1267        
1268
1269        
1270    </div>
1271
1272    <div class="description">
1273        <p>Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.
1274This should be based upon StageGL.SHADER_FRAGMENT_BODY_REGULAR</p>
1275
1276    </div>
1277
1278    
1279
1280    
1281
1282    
1283</div>
1284
1285                
1286                    <div id="property_usesContext" class="property item">
1287    <h3 class="name"><code>usesContext</code></h3>
1288    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
1289
1290    
1291
1292    
1293
1294    
1295
1296    
1297
1298    
1299
1300    <div class="meta">
1301        
1302            
1303                
1304                <p>
1305                
1306                Defined in
1307                
1308            
1309        
1310        
1311        <a href="../files/easeljs_filters_Filter.js.html#l71"><code>usesContext:71</code></a>
1312        
1313        </p>
1314
1315        
1316
1317        
1318    </div>
1319
1320    <div class="description">
1321        <p>A flag stating that this filter uses a context draw mode and cannot be batched into imageData processing.</p>
1322
1323    </div>
1324
1325    
1326        <p><strong>Default:</strong> false</p>
1327    
1328
1329    
1330
1331    
1332</div>
1333
1334                
1335                    <div id="property_VTX_SHADER" class="property item">
1336    <h3 class="name"><code>VTX_SHADER</code></h3>
1337    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1338
1339    
1340
1341    
1342
1343    
1344
1345    
1346
1347    
1348        <span class="flag readonly">readonly</span>
1349    
1350
1351    <div class="meta">
1352        
1353            
1354                
1355                <p>
1356                
1357                Defined in
1358                
1359            
1360        
1361        
1362        <a href="../files/easeljs_filters_Filter.js.html#l88"><code>VTX_SHADER:88</code></a>
1363        
1364        </p>
1365
1366        
1367
1368        
1369    </div>
1370
1371    <div class="description">
1372        <p>Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.
1373This should be based upon StageGL.SHADER_VERTEX_BODY_REGULAR</p>
1374
1375    </div>
1376
1377    
1378
1379    
1380
1381    
1382</div>
1383
1384                
1385            </div>
1386        
1387
1388        
1389
1390        
1391    </div>
1392</div>
1393
1394                    </div>
1395                </div>
1396            </div>
1397        </div>
1398    </div>
1399</div>
1400<script src="../assets/vendor/prettify/prettify-min.js"></script>
1401<script>prettyPrint();</script>
1402<script src="../assets/js/yui-prettify.js"></script>
1403<script src="../assets/../api.js"></script>
1404<script src="../assets/js/api-filter.js"></script>
1405<script src="../assets/js/api-list.js"></script>
1406<script src="../assets/js/api-search.js"></script>
1407<script src="../assets/js/apidocs.js"></script>
1408</body>
1409</html>