all repos — simplyrpg @ b7dad4e64551b9afaadd503db6389daa3362ccd3

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

libraries/EaselJS_docs/classes/BlurFilter.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 : BlurFilter</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>BlurFilter 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_BlurFilter.js.html#l43"><code>BlurFilter:43</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 box blur to DisplayObjects in context 2D and a Gaussian blur in webgl. Note that this filter is fairly
 227intensive, particularly if the quality is set higher than 1.</p>
 228<p><h4>Example</h4>
 229This example creates a red circle, and then applies a 5 pixel blur to it. It uses the <a href="../classes/Filter.html#method_getBounds" class="crosslink">getBounds</a>
 230method to account for the spread that the blur causes.</p>
 231<pre class="code prettyprint"><code> var shape = new createjs.Shape().set({x:100,y:100});
 232 shape.graphics.beginFill("#ff0000").drawCircle(0,0,50);
 233
 234 var blurFilter = new createjs.BlurFilter(5, 5, 1);
 235 shape.filters = [blurFilter];
 236 var bounds = blurFilter.getBounds();
 237
 238 shape.cache(-50+bounds.x, -50+bounds.y, 100+bounds.width, 100+bounds.height);</code></pre>
 239<p>See <a href="../classes/Filter.html" class="crosslink">Filter</a> for an more information on applying filters.</p>
 240
 241</div>
 242
 243
 244    <div class="constructor">
 245        <h2>Constructor</h2>
 246        <div id="method_BlurFilter" class="method item">
 247    <h3 class="name"><code>BlurFilter</code></h3>
 248
 249    
 250        <div class="args">
 251            <span class="paren">(</span><ul class="args-list inline commas">
 252            
 253                <li class="arg">
 254                    
 255                        <code class="optional">[blurX=0]</code>
 256                    
 257                </li>
 258            
 259                <li class="arg">
 260                    
 261                        <code class="optional">[blurY=0]</code>
 262                    
 263                </li>
 264            
 265                <li class="arg">
 266                    
 267                        <code class="optional">[quality=1]</code>
 268                    
 269                </li>
 270            
 271            </ul><span class="paren">)</span>
 272        </div>
 273    
 274
 275    
 276
 277    
 278
 279    
 280
 281    
 282
 283    
 284
 285    
 286
 287    
 288
 289    <div class="meta">
 290        
 291            
 292                
 293                <p>
 294                
 295                Defined in
 296                
 297            
 298        
 299        
 300        <a href="../files/easeljs_filters_BlurFilter.js.html#l43"><code>BlurFilter:43</code></a>
 301        
 302        </p>
 303
 304
 305        
 306
 307        
 308    </div>
 309
 310    <div class="description">
 311        
 312    </div>
 313
 314    
 315        <div class="params">
 316            <h4>Parameters:</h4>
 317
 318            <ul class="params-list">
 319            
 320                <li class="param">
 321                    
 322                        <code class="param-name optional">[blurX=0]</code>
 323                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 324                        <span class="flag optional" title="This parameter is optional.">optional</span>
 325                    
 326
 327                    
 328
 329                    <div class="param-description">
 330                        <p>The horizontal blur radius in pixels.</p>
 331
 332                    </div>
 333
 334                    
 335                </li>
 336            
 337                <li class="param">
 338                    
 339                        <code class="param-name optional">[blurY=0]</code>
 340                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 341                        <span class="flag optional" title="This parameter is optional.">optional</span>
 342                    
 343
 344                    
 345
 346                    <div class="param-description">
 347                        <p>The vertical blur radius in pixels.</p>
 348
 349                    </div>
 350
 351                    
 352                </li>
 353            
 354                <li class="param">
 355                    
 356                        <code class="param-name optional">[quality=1]</code>
 357                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 358                        <span class="flag optional" title="This parameter is optional.">optional</span>
 359                    
 360
 361                    
 362
 363                    <div class="param-description">
 364                        <p>The number of blur iterations.</p>
 365
 366                    </div>
 367
 368                    
 369                </li>
 370            
 371            </ul>
 372        </div>
 373    
 374
 375    
 376
 377    
 378</div>
 379
 380    </div>
 381
 382
 383<div id="classdocs" class="tabview">
 384    <ul class="api-class-tabs">
 385        <li class="api-class-tab index"><a href="#index">Index</a></li>
 386
 387        
 388            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
 389        
 390        
 391            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
 392        
 393        
 394        
 395    </ul>
 396
 397    <div>
 398        <div id="index" class="api-class-tabpanel index">
 399            <h2 class="off-left">Item Index</h2>
 400
 401            
 402                <div class="index-section methods">
 403                    <h3>Methods</h3>
 404
 405                    <ul class="index-list methods extends">
 406                        
 407                            <li class="index-item method inherited">
 408                                <a href="#method__applyFilter">_applyFilter</a>
 409
 410                                
 411                                
 412                            </li>
 413                        
 414                            <li class="index-item method">
 415                                <a href="#method__getTable">_getTable</a>
 416
 417                                
 418                                
 419                            </li>
 420                        
 421                            <li class="index-item method">
 422                                <a href="#method__updateShader">_updateShader</a>
 423
 424                                
 425                                
 426                            </li>
 427                        
 428                            <li class="index-item method inherited">
 429                                <a href="#method_applyFilter">applyFilter</a>
 430
 431                                
 432                                
 433                            </li>
 434                        
 435                            <li class="index-item method inherited">
 436                                <a href="#method_clone">clone</a>
 437
 438                                
 439                                
 440                            </li>
 441                        
 442                            <li class="index-item method inherited">
 443                                <a href="#method_getBounds">getBounds</a>
 444
 445                                
 446                                
 447                            </li>
 448                        
 449                            <li class="index-item method inherited">
 450                                <a href="#method_shaderParamSetup">shaderParamSetup</a>
 451
 452                                
 453                                
 454                            </li>
 455                        
 456                            <li class="index-item method inherited">
 457                                <a href="#method_toString">toString</a>
 458
 459                                
 460                                
 461                            </li>
 462                        
 463                    </ul>
 464                </div>
 465            
 466
 467            
 468                <div class="index-section properties">
 469                    <h3>Properties</h3>
 470
 471                    <ul class="index-list properties extends">
 472                        
 473                            <li class="index-item property private inherited">
 474                                <a href="#property__multiPass">_multiPass</a>
 475
 476                                
 477                                
 478                            </li>
 479                        
 480                            <li class="index-item property">
 481                                <a href="#property_blurX">blurX</a>
 482
 483                                
 484                                
 485                            </li>
 486                        
 487                            <li class="index-item property">
 488                                <a href="#property_blurY">blurY</a>
 489
 490                                
 491                                
 492                            </li>
 493                        
 494                            <li class="index-item property inherited">
 495                                <a href="#property_FRAG_SHADER">FRAG_SHADER</a>
 496
 497                                
 498                                
 499                            </li>
 500                        
 501                            <li class="index-item property protected">
 502                                <a href="#property_MUL_TABLE">MUL_TABLE</a>
 503
 504                                
 505                                    <span class="flag static">static</span>
 506                                
 507                                
 508                            </li>
 509                        
 510                            <li class="index-item property">
 511                                <a href="#property_quality">quality</a>
 512
 513                                
 514                                
 515                            </li>
 516                        
 517                            <li class="index-item property protected">
 518                                <a href="#property_SHG_TABLE">SHG_TABLE</a>
 519
 520                                
 521                                    <span class="flag static">static</span>
 522                                
 523                                
 524                            </li>
 525                        
 526                            <li class="index-item property inherited">
 527                                <a href="#property_usesContext">usesContext</a>
 528
 529                                
 530                                
 531                            </li>
 532                        
 533                            <li class="index-item property inherited">
 534                                <a href="#property_VTX_SHADER">VTX_SHADER</a>
 535
 536                                
 537                                
 538                            </li>
 539                        
 540                    </ul>
 541                </div>
 542            
 543
 544            
 545
 546            
 547        </div>
 548
 549        
 550            <div id="methods" class="api-class-tabpanel">
 551                <h2 class="off-left">Methods</h2>
 552
 553                
 554                    <div id="method__applyFilter" class="method item inherited">
 555    <h3 class="name"><code>_applyFilter</code></h3>
 556
 557    
 558        <div class="args">
 559            <span class="paren">(</span><ul class="args-list inline commas">
 560            
 561                <li class="arg">
 562                    
 563                        <code>imageData</code>
 564                    
 565                </li>
 566            
 567            </ul><span class="paren">)</span>
 568        </div>
 569    
 570
 571    
 572        <span class="returns-inline">
 573            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
 574        </span>
 575    
 576
 577    
 578
 579    
 580
 581    
 582
 583    
 584
 585    
 586
 587    
 588
 589    <div class="meta">
 590        
 591            
 592                <p>Inherited from
 593                <a href="../classes/Filter.html#method__applyFilter">Filter</a>:
 594            
 595        
 596        
 597        <a href="../files/easeljs_filters_Filter.js.html#l180"><code>_applyFilter:180</code></a>
 598        
 599        </p>
 600
 601
 602        
 603
 604        
 605    </div>
 606
 607    <div class="description">
 608        
 609    </div>
 610
 611    
 612        <div class="params">
 613            <h4>Parameters:</h4>
 614
 615            <ul class="params-list">
 616            
 617                <li class="param">
 618                    
 619                        <code class="param-name">imageData</code>
 620                        <span class="type">ImageData</span>
 621                    
 622
 623                    
 624
 625                    <div class="param-description">
 626                        <p>Target ImageData instance.</p>
 627
 628                    </div>
 629
 630                    
 631                </li>
 632            
 633            </ul>
 634        </div>
 635    
 636
 637    
 638        <div class="returns">
 639            <h4>Returns:</h4>
 640
 641            <div class="returns-description">
 642                
 643                    
 644                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
 645                    
 646                
 647            </div>
 648        </div>
 649    
 650
 651    
 652</div>
 653
 654                
 655                    <div id="method__getTable" class="method item">
 656    <h3 class="name"><code>_getTable</code></h3>
 657
 658    
 659        <div class="args">
 660            <span class="paren">(</span><ul class="args-list inline commas">
 661            
 662                <li class="arg">
 663                    
 664                        <code>spread</code>
 665                    
 666                </li>
 667            
 668            </ul><span class="paren">)</span>
 669        </div>
 670    
 671
 672    
 673        <span class="returns-inline">
 674            <span class="type">Array<Number></span>
 675        </span>
 676    
 677
 678    
 679
 680    
 681
 682    
 683
 684    
 685
 686    
 687
 688    
 689
 690    <div class="meta">
 691        
 692            
 693                
 694                <p>
 695                
 696                Defined in
 697                
 698            
 699        
 700        
 701        <a href="../files/easeljs_filters_BlurFilter.js.html#l177"><code>_getTable:177</code></a>
 702        
 703        </p>
 704
 705
 706        
 707
 708        
 709    </div>
 710
 711    <div class="description">
 712        <p>Internal lookup function to create gaussian distribution.</p>
 713
 714    </div>
 715
 716    
 717        <div class="params">
 718            <h4>Parameters:</h4>
 719
 720            <ul class="params-list">
 721            
 722                <li class="param">
 723                    
 724                        <code class="param-name">spread</code>
 725                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 726                    
 727
 728                    
 729
 730                    <div class="param-description">
 731                        <p>How many steps in the curve.</p>
 732
 733                    </div>
 734
 735                    
 736                </li>
 737            
 738            </ul>
 739        </div>
 740    
 741
 742    
 743        <div class="returns">
 744            <h4>Returns:</h4>
 745
 746            <div class="returns-description">
 747                
 748                    
 749                        <span class="type">Array<Number></span>:
 750                    
 751                    <p>An array with Math.ceil(spread*2) entries with appropriately distributed weights.</p>
 752
 753                
 754            </div>
 755        </div>
 756    
 757
 758    
 759</div>
 760
 761                
 762                    <div id="method__updateShader" class="method item">
 763    <h3 class="name"><code>_updateShader</code></h3>
 764
 765    
 766        <span class="paren">()</span>
 767    
 768
 769    
 770
 771    
 772
 773    
 774
 775    
 776
 777    
 778
 779    
 780
 781    
 782
 783    <div class="meta">
 784        
 785            
 786                
 787                <p>
 788                
 789                Defined in
 790                
 791            
 792        
 793        
 794        <a href="../files/easeljs_filters_BlurFilter.js.html#l199"><code>_updateShader:199</code></a>
 795        
 796        </p>
 797
 798
 799        
 800
 801        
 802    </div>
 803
 804    <div class="description">
 805        <p>Internal update function to create shader properties.</p>
 806
 807    </div>
 808
 809    
 810
 811    
 812
 813    
 814</div>
 815
 816                
 817                    <div id="method_applyFilter" class="method item inherited">
 818    <h3 class="name"><code>applyFilter</code></h3>
 819
 820    
 821        <div class="args">
 822            <span class="paren">(</span><ul class="args-list inline commas">
 823            
 824                <li class="arg">
 825                    
 826                        <code>ctx</code>
 827                    
 828                </li>
 829            
 830                <li class="arg">
 831                    
 832                        <code>x</code>
 833                    
 834                </li>
 835            
 836                <li class="arg">
 837                    
 838                        <code>y</code>
 839                    
 840                </li>
 841            
 842                <li class="arg">
 843                    
 844                        <code>width</code>
 845                    
 846                </li>
 847            
 848                <li class="arg">
 849                    
 850                        <code>height</code>
 851                    
 852                </li>
 853            
 854                <li class="arg">
 855                    
 856                        <code class="optional">[targetCtx]</code>
 857                    
 858                </li>
 859            
 860                <li class="arg">
 861                    
 862                        <code class="optional">[targetX]</code>
 863                    
 864                </li>
 865            
 866                <li class="arg">
 867                    
 868                        <code class="optional">[targetY]</code>
 869                    
 870                </li>
 871            
 872            </ul><span class="paren">)</span>
 873        </div>
 874    
 875
 876    
 877        <span class="returns-inline">
 878            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
 879        </span>
 880    
 881
 882    
 883
 884    
 885
 886    
 887
 888    
 889
 890    
 891
 892    
 893
 894    <div class="meta">
 895        
 896            
 897                <p>Inherited from
 898                <a href="../classes/Filter.html#method_applyFilter">Filter</a>:
 899            
 900        
 901        
 902        <a href="../files/easeljs_filters_Filter.js.html#l131"><code>applyFilter:131</code></a>
 903        
 904        </p>
 905
 906
 907        
 908
 909        
 910    </div>
 911
 912    <div class="description">
 913        <p>Applies the filter to the specified context.</p>
 914
 915    </div>
 916
 917    
 918        <div class="params">
 919            <h4>Parameters:</h4>
 920
 921            <ul class="params-list">
 922            
 923                <li class="param">
 924                    
 925                        <code class="param-name">ctx</code>
 926                        <span class="type">CanvasRenderingContext2D</span>
 927                    
 928
 929                    
 930
 931                    <div class="param-description">
 932                        <p>The 2D context to use as the source.</p>
 933
 934                    </div>
 935
 936                    
 937                </li>
 938            
 939                <li class="param">
 940                    
 941                        <code class="param-name">x</code>
 942                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 943                    
 944
 945                    
 946
 947                    <div class="param-description">
 948                        <p>The x position to use for the source rect.</p>
 949
 950                    </div>
 951
 952                    
 953                </li>
 954            
 955                <li class="param">
 956                    
 957                        <code class="param-name">y</code>
 958                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 959                    
 960
 961                    
 962
 963                    <div class="param-description">
 964                        <p>The y position to use for the source rect.</p>
 965
 966                    </div>
 967
 968                    
 969                </li>
 970            
 971                <li class="param">
 972                    
 973                        <code class="param-name">width</code>
 974                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 975                    
 976
 977                    
 978
 979                    <div class="param-description">
 980                        <p>The width to use for the source rect.</p>
 981
 982                    </div>
 983
 984                    
 985                </li>
 986            
 987                <li class="param">
 988                    
 989                        <code class="param-name">height</code>
 990                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
 991                    
 992
 993                    
 994
 995                    <div class="param-description">
 996                        <p>The height to use for the source rect.</p>
 997
 998                    </div>
 999
1000                    
1001                </li>
1002            
1003                <li class="param">
1004                    
1005                        <code class="param-name optional">[targetCtx]</code>
1006                        <span class="type">CanvasRenderingContext2D</span>
1007                        <span class="flag optional" title="This parameter is optional.">optional</span>
1008                    
1009
1010                    
1011
1012                    <div class="param-description">
1013                        <p>The 2D context to draw the result to. Defaults to the context passed to ctx.</p>
1014
1015                    </div>
1016
1017                    
1018                </li>
1019            
1020                <li class="param">
1021                    
1022                        <code class="param-name optional">[targetX]</code>
1023                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
1024                        <span class="flag optional" title="This parameter is optional.">optional</span>
1025                    
1026
1027                    
1028
1029                    <div class="param-description">
1030                        <p>The x position to draw the result to. Defaults to the value passed to x.</p>
1031
1032                    </div>
1033
1034                    
1035                </li>
1036            
1037                <li class="param">
1038                    
1039                        <code class="param-name optional">[targetY]</code>
1040                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
1041                        <span class="flag optional" title="This parameter is optional.">optional</span>
1042                    
1043
1044                    
1045
1046                    <div class="param-description">
1047                        <p>The y position to draw the result to. Defaults to the value passed to y.</p>
1048
1049                    </div>
1050
1051                    
1052                </li>
1053            
1054            </ul>
1055        </div>
1056    
1057
1058    
1059        <div class="returns">
1060            <h4>Returns:</h4>
1061
1062            <div class="returns-description">
1063                
1064                    
1065                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>:
1066                    
1067                    <p>If the filter was applied successfully.</p>
1068
1069                
1070            </div>
1071        </div>
1072    
1073
1074    
1075</div>
1076
1077                
1078                    <div id="method_clone" class="method item inherited">
1079    <h3 class="name"><code>clone</code></h3>
1080
1081    
1082        <span class="paren">()</span>
1083    
1084
1085    
1086        <span class="returns-inline">
1087            <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>
1088        </span>
1089    
1090
1091    
1092
1093    
1094
1095    
1096
1097    
1098
1099    
1100
1101    
1102
1103    <div class="meta">
1104        
1105            
1106                <p>Inherited from
1107                <a href="../classes/Filter.html#method_clone">Filter</a>:
1108            
1109        
1110        
1111        <a href="../files/easeljs_filters_Filter.js.html#l170"><code>clone:170</code></a>
1112        
1113        </p>
1114
1115
1116        
1117
1118        
1119    </div>
1120
1121    <div class="description">
1122        <p>Returns a clone of this Filter instance.</p>
1123
1124    </div>
1125
1126    
1127
1128    
1129        <div class="returns">
1130            <h4>Returns:</h4>
1131
1132            <div class="returns-description">
1133                
1134                    
1135                        <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>:
1136                    
1137                    <p>A clone of the current Filter instance.</p>
1138
1139                
1140            </div>
1141        </div>
1142    
1143
1144    
1145</div>
1146
1147                
1148                    <div id="method_getBounds" class="method item inherited">
1149    <h3 class="name"><code>getBounds</code></h3>
1150
1151    
1152        <div class="args">
1153            <span class="paren">(</span><ul class="args-list inline commas">
1154            
1155                <li class="arg">
1156                    
1157                        <code class="optional">[rect]</code>
1158                    
1159                </li>
1160            
1161            </ul><span class="paren">)</span>
1162        </div>
1163    
1164
1165    
1166        <span class="returns-inline">
1167            <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
1168        </span>
1169    
1170
1171    
1172
1173    
1174
1175    
1176
1177    
1178
1179    
1180
1181    
1182
1183    <div class="meta">
1184        
1185            
1186                <p>Inherited from
1187                <a href="../classes/Filter.html#method_getBounds">Filter</a>:
1188            
1189        
1190        
1191        <a href="../files/easeljs_filters_Filter.js.html#l111"><code>getBounds:111</code></a>
1192        
1193        </p>
1194
1195
1196        
1197
1198        
1199    </div>
1200
1201    <div class="description">
1202        <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>
1203
1204    </div>
1205
1206    
1207        <div class="params">
1208            <h4>Parameters:</h4>
1209
1210            <ul class="params-list">
1211            
1212                <li class="param">
1213                    
1214                        <code class="param-name optional">[rect]</code>
1215                        <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>
1216                        <span class="flag optional" title="This parameter is optional.">optional</span>
1217                    
1218
1219                    
1220
1221                    <div class="param-description">
1222                        <p>If specified, the provided Rectangle instance will be expanded by the padding amounts and returned.</p>
1223
1224                    </div>
1225
1226                    
1227                </li>
1228            
1229            </ul>
1230        </div>
1231    
1232
1233    
1234        <div class="returns">
1235            <h4>Returns:</h4>
1236
1237            <div class="returns-description">
1238                
1239                    
1240                        <span class="type"><a href="../classes/Rectangle.html" class="crosslink">Rectangle</a></span>:
1241                    
1242                    <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>
1243
1244                
1245            </div>
1246        </div>
1247    
1248
1249    
1250</div>
1251
1252                
1253                    <div id="method_shaderParamSetup" class="method item inherited">
1254    <h3 class="name"><code>shaderParamSetup</code></h3>
1255
1256    
1257        <div class="args">
1258            <span class="paren">(</span><ul class="args-list inline commas">
1259            
1260                <li class="arg">
1261                    
1262                        <code>gl</code>
1263                    
1264                </li>
1265            
1266                <li class="arg">
1267                    
1268                        <code>stage</code>
1269                    
1270                </li>
1271            
1272                <li class="arg">
1273                    
1274                        <code>shaderProgram</code>
1275                    
1276                </li>
1277            
1278            </ul><span class="paren">)</span>
1279        </div>
1280    
1281
1282    
1283
1284    
1285
1286    
1287
1288    
1289
1290    
1291
1292    
1293
1294    
1295
1296    <div class="meta">
1297        
1298            
1299                <p>Inherited from
1300                <a href="../classes/Filter.html#method_shaderParamSetup">Filter</a>:
1301            
1302        
1303        
1304        <a href="../files/easeljs_filters_Filter.js.html#l121"><code>shaderParamSetup:121</code></a>
1305        
1306        </p>
1307
1308
1309        
1310
1311        
1312    </div>
1313
1314    <div class="description">
1315        <p>Assign any unique uniforms or other setup functionality here.</p>
1316
1317    </div>
1318
1319    
1320        <div class="params">
1321            <h4>Parameters:</h4>
1322
1323            <ul class="params-list">
1324            
1325                <li class="param">
1326                    
1327                        <code class="param-name">gl</code>
1328                        <span class="type">WebGLContext</span>
1329                    
1330
1331                    
1332
1333                    <div class="param-description">
1334                        <p>The context associated with the stage performing the render.</p>
1335
1336                    </div>
1337
1338                    
1339                </li>
1340            
1341                <li class="param">
1342                    
1343                        <code class="param-name">stage</code>
1344                        <span class="type"><a href="../classes/StageGL.html" class="crosslink">StageGL</a></span>
1345                    
1346
1347                    
1348
1349                    <div class="param-description">
1350                        <p>The stage instance that will be rendering.</p>
1351
1352                    </div>
1353
1354                    
1355                </li>
1356            
1357                <li class="param">
1358                    
1359                        <code class="param-name">shaderProgram</code>
1360                        <span class="type">ShaderProgram</span>
1361                    
1362
1363                    
1364
1365                    <div class="param-description">
1366                        <p>The compiled shader that is going to be used to perform the render.</p>
1367
1368                    </div>
1369
1370                    
1371                </li>
1372            
1373            </ul>
1374        </div>
1375    
1376
1377    
1378
1379    
1380</div>
1381
1382                
1383                    <div id="method_toString" class="method item inherited">
1384    <h3 class="name"><code>toString</code></h3>
1385
1386    
1387        <span class="paren">()</span>
1388    
1389
1390    
1391        <span class="returns-inline">
1392            <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1393        </span>
1394    
1395
1396    
1397
1398    
1399
1400    
1401
1402    
1403
1404    
1405
1406    
1407
1408    <div class="meta">
1409        
1410            
1411                <p>Inherited from
1412                <a href="../classes/Filter.html#method_toString">Filter</a>:
1413            
1414        
1415        
1416        <a href="../files/easeljs_filters_Filter.js.html#l161"><code>toString:161</code></a>
1417        
1418        </p>
1419
1420
1421        
1422
1423        
1424    </div>
1425
1426    <div class="description">
1427        <p>Returns a string representation of this object.</p>
1428
1429    </div>
1430
1431    
1432
1433    
1434        <div class="returns">
1435            <h4>Returns:</h4>
1436
1437            <div class="returns-description">
1438                
1439                    
1440                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
1441                    
1442                    <p>a string representation of the instance.</p>
1443
1444                
1445            </div>
1446        </div>
1447    
1448
1449    
1450</div>
1451
1452                
1453            </div>
1454        
1455
1456        
1457            <div id="properties" class="api-class-tabpanel">
1458                <h2 class="off-left">Properties</h2>
1459
1460                
1461                    <div id="property__multiPass" class="property item private inherited">
1462    <h3 class="name"><code>_multiPass</code></h3>
1463    <span class="type"><a href="../classes/Filter.html" class="crosslink">Filter</a></span>
1464
1465    
1466
1467    
1468        <span class="flag private">private</span>
1469    
1470
1471    
1472
1473    
1474
1475    
1476
1477    <div class="meta">
1478        
1479            
1480                <p>Inherited from
1481                <a href="../classes/Filter.html#property__multiPass">Filter</a>:
1482            
1483        
1484        
1485        <a href="../files/easeljs_filters_Filter.js.html#l79"><code>_multiPass:79</code></a>
1486        
1487        </p>
1488
1489        
1490
1491        
1492    </div>
1493
1494    <div class="description">
1495        <p>Another filter that is required to act as part of this filter and created and managed under the hood.</p>
1496
1497    </div>
1498
1499    
1500        <p><strong>Default:</strong> null</p>
1501    
1502
1503    
1504
1505    
1506</div>
1507
1508                
1509                    <div id="property_blurX" class="property item">
1510    <h3 class="name"><code>blurX</code></h3>
1511    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
1512
1513    
1514
1515    
1516
1517    
1518
1519    
1520
1521    
1522
1523    <div class="meta">
1524        
1525            
1526                
1527                <p>
1528                
1529                Defined in
1530                
1531            
1532        
1533        
1534        <a href="../files/easeljs_filters_BlurFilter.js.html#l72"><code>blurX:72</code></a>
1535        
1536        </p>
1537
1538        
1539
1540        
1541    </div>
1542
1543    <div class="description">
1544        <p>Horizontal blur radius in pixels</p>
1545
1546    </div>
1547
1548    
1549        <p><strong>Default:</strong> 0</p>
1550    
1551
1552    
1553
1554    
1555</div>
1556
1557                
1558                    <div id="property_blurY" class="property item">
1559    <h3 class="name"><code>blurY</code></h3>
1560    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
1561
1562    
1563
1564    
1565
1566    
1567
1568    
1569
1570    
1571
1572    <div class="meta">
1573        
1574            
1575                
1576                <p>
1577                
1578                Defined in
1579                
1580            
1581        
1582        
1583        <a href="../files/easeljs_filters_BlurFilter.js.html#l82"><code>blurY:82</code></a>
1584        
1585        </p>
1586
1587        
1588
1589        
1590    </div>
1591
1592    <div class="description">
1593        <p>Vertical blur radius in pixels</p>
1594
1595    </div>
1596
1597    
1598        <p><strong>Default:</strong> 0</p>
1599    
1600
1601    
1602
1603    
1604</div>
1605
1606                
1607                    <div id="property_FRAG_SHADER" class="property item inherited">
1608    <h3 class="name"><code>FRAG_SHADER</code></h3>
1609    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1610
1611    
1612
1613    
1614
1615    
1616
1617    
1618
1619    
1620        <span class="flag readonly">readonly</span>
1621    
1622
1623    <div class="meta">
1624        
1625            
1626                <p>Inherited from
1627                <a href="../classes/Filter.html#property_FRAG_SHADER">Filter</a>:
1628            
1629        
1630        
1631        <a href="../files/easeljs_filters_Filter.js.html#l98"><code>FRAG_SHADER:98</code></a>
1632        
1633        </p>
1634
1635        
1636
1637        
1638    </div>
1639
1640    <div class="description">
1641        <p>Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.
1642This should be based upon StageGL.SHADER_FRAGMENT_BODY_REGULAR</p>
1643
1644    </div>
1645
1646    
1647
1648    
1649
1650    
1651</div>
1652
1653                
1654                    <div id="property_MUL_TABLE" class="property item protected">
1655    <h3 class="name"><code>MUL_TABLE</code></h3>
1656    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
1657
1658    
1659
1660    
1661        <span class="flag protected">protected</span>
1662    
1663
1664    
1665
1666    
1667        <span class="flag static">static</span>
1668    
1669
1670    
1671
1672    <div class="meta">
1673        
1674            
1675                
1676                <p>
1677                
1678                Defined in
1679                
1680            
1681        
1682        
1683        <a href="../files/easeljs_filters_BlurFilter.js.html#l231"><code>MUL_TABLE:231</code></a>
1684        
1685        </p>
1686
1687        
1688
1689        
1690    </div>
1691
1692    <div class="description">
1693        <p>Array of multiply values for blur calculations.</p>
1694
1695    </div>
1696
1697    
1698
1699    
1700
1701    
1702</div>
1703
1704                
1705                    <div id="property_quality" class="property item">
1706    <h3 class="name"><code>quality</code></h3>
1707    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Number" class="crosslink external" target="_blank">Number</a></span>
1708
1709    
1710
1711    
1712
1713    
1714
1715    
1716
1717    
1718
1719    <div class="meta">
1720        
1721            
1722                
1723                <p>
1724                
1725                Defined in
1726                
1727            
1728        
1729        
1730        <a href="../files/easeljs_filters_BlurFilter.js.html#l92"><code>quality:92</code></a>
1731        
1732        </p>
1733
1734        
1735
1736        
1737    </div>
1738
1739    <div class="description">
1740        <p>Number of blur iterations. For example, a value of 1 will produce a rough blur. A value of 2 will produce a
1741smoother blur, but take twice as long to run.</p>
1742
1743    </div>
1744
1745    
1746        <p><strong>Default:</strong> 1</p>
1747    
1748
1749    
1750
1751    
1752</div>
1753
1754                
1755                    <div id="property_SHG_TABLE" class="property item protected">
1756    <h3 class="name"><code>SHG_TABLE</code></h3>
1757    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
1758
1759    
1760
1761    
1762        <span class="flag protected">protected</span>
1763    
1764
1765    
1766
1767    
1768        <span class="flag static">static</span>
1769    
1770
1771    
1772
1773    <div class="meta">
1774        
1775            
1776                
1777                <p>
1778                
1779                Defined in
1780                
1781            
1782        
1783        
1784        <a href="../files/easeljs_filters_BlurFilter.js.html#l240"><code>SHG_TABLE:240</code></a>
1785        
1786        </p>
1787
1788        
1789
1790        
1791    </div>
1792
1793    <div class="description">
1794        <p>Array of shift values for blur calculations.</p>
1795
1796    </div>
1797
1798    
1799
1800    
1801
1802    
1803</div>
1804
1805                
1806                    <div id="property_usesContext" class="property item inherited">
1807    <h3 class="name"><code>usesContext</code></h3>
1808    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Boolean" class="crosslink external" target="_blank">Boolean</a></span>
1809
1810    
1811
1812    
1813
1814    
1815
1816    
1817
1818    
1819
1820    <div class="meta">
1821        
1822            
1823                <p>Inherited from
1824                <a href="../classes/Filter.html#property_usesContext">Filter</a>:
1825            
1826        
1827        
1828        <a href="../files/easeljs_filters_Filter.js.html#l71"><code>usesContext:71</code></a>
1829        
1830        </p>
1831
1832        
1833
1834        
1835    </div>
1836
1837    <div class="description">
1838        <p>A flag stating that this filter uses a context draw mode and cannot be batched into imageData processing.</p>
1839
1840    </div>
1841
1842    
1843        <p><strong>Default:</strong> false</p>
1844    
1845
1846    
1847
1848    
1849</div>
1850
1851                
1852                    <div id="property_VTX_SHADER" class="property item inherited">
1853    <h3 class="name"><code>VTX_SHADER</code></h3>
1854    <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
1855
1856    
1857
1858    
1859
1860    
1861
1862    
1863
1864    
1865        <span class="flag readonly">readonly</span>
1866    
1867
1868    <div class="meta">
1869        
1870            
1871                <p>Inherited from
1872                <a href="../classes/Filter.html#property_VTX_SHADER">Filter</a>:
1873            
1874        
1875        
1876        <a href="../files/easeljs_filters_Filter.js.html#l88"><code>VTX_SHADER:88</code></a>
1877        
1878        </p>
1879
1880        
1881
1882        
1883    </div>
1884
1885    <div class="description">
1886        <p>Pre-processed template shader code. It will be parsed before being fed in into the shader compiler.
1887This should be based upon StageGL.SHADER_VERTEX_BODY_REGULAR</p>
1888
1889    </div>
1890
1891    
1892
1893    
1894
1895    
1896</div>
1897
1898                
1899            </div>
1900        
1901
1902        
1903
1904        
1905    </div>
1906</div>
1907
1908                    </div>
1909                </div>
1910            </div>
1911        </div>
1912    </div>
1913</div>
1914<script src="../assets/vendor/prettify/prettify-min.js"></script>
1915<script>prettyPrint();</script>
1916<script src="../assets/js/yui-prettify.js"></script>
1917<script src="../assets/../api.js"></script>
1918<script src="../assets/js/api-filter.js"></script>
1919<script src="../assets/js/api-list.js"></script>
1920<script src="../assets/js/api-search.js"></script>
1921<script src="../assets/js/apidocs.js"></script>
1922</body>
1923</html>