BoxStencil.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: BoxStencil</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: BoxStencil</h1>
  17. <section>
  18. <header>
  19. <h2><span class="attribs"><span class="type-signature"></span></span>BoxStencil<span class="signature">()</span><span class="type-signature"></span></h2>
  20. </header>
  21. <article>
  22. <div class="container-overview">
  23. <h4 class="name" id="BoxStencil"><span class="type-signature"></span>new BoxStencil<span class="signature">()</span><span class="type-signature"></span></h4>
  24. <div class="description">
  25. Box stencil can be used to clear a box mask region. It will limit the drwaing region to this box.
  26. </div>
  27. <dl class="details">
  28. <dt class="tag-source">Source:</dt>
  29. <dd class="tag-source"><ul class="dummy"><li>
  30. <a href="stencil_BoxStencil.js.html">stencil/BoxStencil.js</a>, <a href="stencil_BoxStencil.js.html#line15">line 15</a>
  31. </li></ul></dd>
  32. </dl>
  33. </div>
  34. <h3 class="subsection-title">Extends</h3>
  35. <ul>
  36. <li><a href="Stencil.html">Stencil</a></li>
  37. </ul>
  38. <h3 class="subsection-title">Members</h3>
  39. <h4 class="name" id="box"><span class="type-signature"></span>box<span class="type-signature"></span></h4>
  40. <div class="description">
  41. Box object containing the size of the object.
  42. </div>
  43. <dl class="details">
  44. <dt class="tag-source">Source:</dt>
  45. <dd class="tag-source"><ul class="dummy"><li>
  46. <a href="stencil_BoxStencil.js.html">stencil/BoxStencil.js</a>, <a href="stencil_BoxStencil.js.html#line22">line 22</a>
  47. </li></ul></dd>
  48. </dl>
  49. <h4 class="name" id="invert"><span class="type-signature"></span>invert<span class="type-signature"></span></h4>
  50. <div class="description">
  51. If inverted the stencil considers the outside of the box instead of the inside.
  52. </div>
  53. <dl class="details">
  54. <dt class="tag-source">Source:</dt>
  55. <dd class="tag-source"><ul class="dummy"><li>
  56. <a href="stencil_BoxStencil.js.html">stencil/BoxStencil.js</a>, <a href="stencil_BoxStencil.js.html#line27">line 27</a>
  57. </li></ul></dd>
  58. </dl>
  59. <h3 class="subsection-title">Methods</h3>
  60. <h4 class="name" id="clip"><span class="type-signature"></span>clip<span class="signature">(context, viewport, canvas)</span><span class="type-signature"></span></h4>
  61. <div class="description">
  62. Clip the canvas context, to ensure that next objects being drawn are cliped to the path stored here.
  63. </div>
  64. <h5>Parameters:</h5>
  65. <table class="params">
  66. <thead>
  67. <tr>
  68. <th>Name</th>
  69. <th>Type</th>
  70. <th class="last">Description</th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. <tr>
  75. <td class="name"><code>context</code></td>
  76. <td class="type">
  77. <span class="param-type">CanvasContext</span>
  78. </td>
  79. <td class="description last">Canvas 2d drawing context.</td>
  80. </tr>
  81. <tr>
  82. <td class="name"><code>viewport</code></td>
  83. <td class="type">
  84. <span class="param-type"><a href="Viewport.html">Viewport</a></span>
  85. </td>
  86. <td class="description last">Viewport applied to the canvas.</td>
  87. </tr>
  88. <tr>
  89. <td class="name"><code>canvas</code></td>
  90. <td class="type">
  91. <span class="param-type"><a href="DOM.html">DOM</a></span>
  92. </td>
  93. <td class="description last">DOM canvas element where the content is being drawn.</td>
  94. </tr>
  95. </tbody>
  96. </table>
  97. <dl class="details">
  98. <dt class="tag-overrides">Overrides:</dt>
  99. <dd class="tag-overrides"><ul class="dummy"><li>
  100. <a href="Stencil.html#clip">Stencil#clip</a>
  101. </li></ul></dd>
  102. <dt class="tag-source">Source:</dt>
  103. <dd class="tag-source"><ul class="dummy"><li>
  104. <a href="stencil_Stencil.js.html">stencil/Stencil.js</a>, <a href="stencil_Stencil.js.html#line32">line 32</a>
  105. </li></ul></dd>
  106. </dl>
  107. </article>
  108. </section>
  109. </div>
  110. <nav>
  111. <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Box.html">Box</a></li><li><a href="Box2.html">Box2</a></li><li><a href="BoxStencil.html">BoxStencil</a></li><li><a href="Circle.html">Circle</a></li><li><a href="DOM.html">DOM</a></li><li><a href="EventManager.html">EventManager</a></li><li><a href="Helpers.html">Helpers</a></li><li><a href="Image.html">Image</a></li><li><a href="Key.html">Key</a></li><li><a href="Line.html">Line</a></li><li><a href="Matrix.html">Matrix</a></li><li><a href="Object2D.html">Object2D</a></li><li><a href="Pattern.html">Pattern</a></li><li><a href="Pointer.html">Pointer</a></li><li><a href="Renderer.html">Renderer</a></li><li><a href="Stencil.html">Stencil</a></li><li><a href="Text.html">Text</a></li><li><a href="UUID.html">UUID</a></li><li><a href="Vector2.html">Vector2</a></li><li><a href="Viewport.html">Viewport</a></li></ul>
  112. </nav>
  113. <br class="clear">
  114. <footer>
  115. Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.2</a> on Thu Jun 06 2019 15:37:27 GMT+0100 (Western European Summer Time)
  116. </footer>
  117. <script> prettyPrint(); </script>
  118. <script src="scripts/linenumber.js"> </script>
  119. </body>
  120. </html>