<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Phaser Class: BitmapData</title> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> <link type="text/css" rel="stylesheet" href="styles/site.cerulean.css"> </head> <body> <div class="container-fluid"> <div class="navbar navbar-fixed-top navbar-inverse"> <div class="navbar-inner"> <a class="brand" href="index.html">Phaser</a> <ul class="nav"> <li class="dropdown"> <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a> <ul class="dropdown-menu "> <li> <a href="Phaser.html">Phaser</a> </li> </ul> </li> <li class="dropdown"> <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a> <ul class="dropdown-menu "> <li> <a href="Phaser.Animation.html">Animation</a> </li> <li> <a href="Phaser.AnimationManager.html">AnimationManager</a> </li> <li> <a href="Phaser.AnimationParser.html">AnimationParser</a> </li> <li> <a href="Phaser.BitmapData.html">BitmapData</a> </li> <li> <a href="Phaser.BitmapText.html">BitmapText</a> </li> <li> <a href="Phaser.Button.html">Button</a> </li> <li> <a href="Phaser.Cache.html">Cache</a> </li> <li> <a href="Phaser.Camera.html">Camera</a> </li> <li> <a href="Phaser.Canvas.html">Canvas</a> </li> <li> <a href="Phaser.Circle.html">Circle</a> </li> <li> <a href="Phaser.Color.html">Color</a> </li> <li> <a href="Phaser.Device.html">Device</a> </li> <li> <a href="Phaser.DOMSprite.html">DOMSprite</a> </li> <li> <a href="Phaser.Easing.html">Easing</a> </li> <li> <a href="Phaser.Easing.Back.html">Back</a> </li> <li> <a href="Phaser.Easing.Bounce.html">Bounce</a> </li> <li> <a href="Phaser.Easing.Circular.html">Circular</a> </li> <li> <a href="Phaser.Easing.Cubic.html">Cubic</a> </li> <li> <a href="Phaser.Easing.Elastic.html">Elastic</a> </li> <li> <a href="Phaser.Easing.Exponential.html">Exponential</a> </li> <li> <a href="Phaser.Easing.Linear.html">Linear</a> </li> <li> <a href="Phaser.Easing.Quadratic.html">Quadratic</a> </li> <li> <a href="Phaser.Easing.Quartic.html">Quartic</a> </li> <li> <a href="Phaser.Easing.Quintic.html">Quintic</a> </li> <li> <a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a> </li> <li> <a href="Phaser.Events.html">Events</a> </li> <li> <a href="Phaser.Filter.html">Filter</a> </li> <li> <a href="Phaser.Frame.html">Frame</a> </li> <li> <a href="Phaser.FrameData.html">FrameData</a> </li> <li> <a href="Phaser.Game.html">Game</a> </li> <li> <a href="Phaser.GameObjectFactory.html">GameObjectFactory</a> </li> <li> <a href="Phaser.Gamepad.html">Gamepad</a> </li> <li> <a href="Phaser.GamepadButton.html">GamepadButton</a> </li> <li> <a href="Phaser.Graphics.html">Graphics</a> </li> <li> <a href="Phaser.Group.html">Group</a> </li> <li> <a href="Phaser.Image.html">Image</a> </li> <li> <a href="Phaser.Input.html">Input</a> </li> <li> <a href="Phaser.InputHandler.html">InputHandler</a> </li> <li> <a href="Phaser.Key.html">Key</a> </li> <li> <a href="Phaser.Keyboard.html">Keyboard</a> </li> <li> <a href="Phaser.Line.html">Line</a> </li> <li> <a href="Phaser.LinkedList.html">LinkedList</a> </li> <li> <a href="Phaser.Loader.html">Loader</a> </li> <li> <a href="Phaser.LoaderParser.html">LoaderParser</a> </li> <li> <a href="Phaser.Math.html">Math</a> </li> <li> <a href="Phaser.Mouse.html">Mouse</a> </li> <li> <a href="Phaser.MSPointer.html">MSPointer</a> </li> <li> <a href="Phaser.Net.html">Net</a> </li> <li> <a href="Phaser.Particles.html">Particles</a> </li> <li> <a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a> </li> <li> <a href="Phaser.Physics.html">Physics</a> </li> <li> <a href="Phaser.Physics.Arcade.html">Arcade</a> </li> <li> <a href="Phaser.Physics.Arcade.Body.html">Body</a> </li> <li> <a href="Phaser.Plugin.html">Plugin</a> </li> <li> <a href="Phaser.PluginManager.html">PluginManager</a> </li> <li> <a href="Phaser.Point.html">Point</a> </li> <li> <a href="Phaser.Pointer.html">Pointer</a> </li> <li> <a href="Phaser.Polygon.html">Polygon</a> </li> <li> <a href="Phaser.QuadTree.html">QuadTree</a> </li> <li> <a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a> </li> <li> <a href="Phaser.Rectangle.html">Rectangle</a> </li> <li> <a href="Phaser.RenderTexture.html">RenderTexture</a> </li> <li> <a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a> </li> <li> <a href="Phaser.Signal.html">Signal</a> </li> <li> <a href="Phaser.SinglePad.html">SinglePad</a> </li> <li> <a href="Phaser.Sound.html">Sound</a> </li> <li> <a href="Phaser.SoundManager.html">SoundManager</a> </li> <li> <a href="Phaser.Sprite.html">Sprite</a> </li> <li> <a href="Phaser.Stage.html">Stage</a> </li> <li> <a href="Phaser.StageScaleMode.html">StageScaleMode</a> </li> <li> <a href="Phaser.State.html">State</a> </li> <li> <a href="Phaser.StateManager.html">StateManager</a> </li> <li> <a href="Phaser.Text.html">Text</a> </li> <li> <a href="Phaser.Tile.html">Tile</a> </li> <li> <a href="Phaser.Tilemap.html">Tilemap</a> </li> <li> <a href="Phaser.TilemapLayer.html">TilemapLayer</a> </li> <li> <a href="Phaser.TilemapParser.html">TilemapParser</a> </li> <li> <a href="Phaser.Tileset.html">Tileset</a> </li> <li> <a href="Phaser.TileSprite.html">TileSprite</a> </li> <li> <a href="Phaser.Time.html">Time</a> </li> <li> <a href="Phaser.Timer.html">Timer</a> </li> <li> <a href="Phaser.TimerEvent.html">TimerEvent</a> </li> <li> <a href="Phaser.Touch.html">Touch</a> </li> <li> <a href="Phaser.Tween.html">Tween</a> </li> <li> <a href="Phaser.TweenManager.html">TweenManager</a> </li> <li> <a href="Phaser.Utils.html">Utils</a> </li> <li> <a href="Phaser.Utils.Debug.html">Debug</a> </li> <li> <a href="Phaser.World.html">World</a> </li> <li> <a href="SignalBinding.html">SignalBinding</a> </li> </ul> </li> <li class="dropdown"> <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a> <ul class="dropdown-menu "> <li> <a href="global.html#canUseNewCanvasBlendModes">canUseNewCanvasBlendModes</a> </li> <li> <a href="global.html#getNextPowerOfTwo">getNextPowerOfTwo</a> </li> <li> <a href="global.html#hex2rgb">hex2rgb</a> </li> <li> <a href="global.html#hitTest">hitTest</a> </li> <li> <a href="global.html#rgb2hex">rgb2hex</a> </li> </ul> </li> </ul> </div> </div> <div class="row-fluid"> <div class="span8"> <div id="main"> <h1 class="page-title">Class: BitmapData</h1> <section> <header> <h2> <span class="ancestors"><a href="Phaser.html">Phaser</a>.</span> BitmapData </h2> <div class="class-description"><p>Note: This object is still experimental and likely to change.</p> <p>A BitmapData object can be thought of as a blank canvas onto which you can perform graphics operations as you would on a normal canvas, such as drawing lines, circles, arcs, fills and copying and setting blocks of pixel data. A single BitmapData can be used as the texture for multiple Sprites. So if you need to dynamically create a Sprite texture then they are a good choice. It supports the EaselJS Tiny API.</p></div> </header> <article> <div class="container-overview"> <dt> <h4 class="name" id="BitmapData"><span class="type-signature"></span>new BitmapData<span class="signature">(game, key, <span class="optional">width</span>, <span class="optional">height</span>)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Creates a new BitmapData object.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>game</code></td> <td class="type"> <span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>A reference to the currently running game.</p></td> </tr> <tr> <td class="name"><code>key</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>Internal Phaser reference key for the render texture.</p></td> </tr> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 100 </td> <td class="description last"><p>The width of the BitmapData in pixels.</p></td> </tr> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 100 </td> <td class="description last"><p>The height of the BitmapData in pixels.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-24">line 24</a> </li></ul></dd> </dl> </dd> </div> <h3 class="subsection-title">Members</h3> <dl> <dt> <h4 class="name" id="baseTexture"><span class="type-signature"></span>baseTexture<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>baseTexture</code></td> <td class="type"> <span class="param-type">PIXI.BaseTexture</span> </td> <td class="description last"><p>The PIXI.BaseTexture.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-82">line 82</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="canvas"><span class="type-signature"></span>canvas<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>canvas</code></td> <td class="type"> <span class="param-type">HTMLCanvasElement</span> </td> <td class="description last"><p>The canvas to which this BitmapData draws.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-53">line 53</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="context"><span class="type-signature"></span>context<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>context</code></td> <td class="type"> <span class="param-type">CanvasRenderingContext2D</span> </td> <td class="description last"><p>The 2d context of the canvas.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-59">line 59</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="game"><span class="type-signature"></span>game<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>game</code></td> <td class="type"> <span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span> </td> <td class="description last"><p>A reference to the currently running game.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-32">line 32</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="height"><span class="type-signature"></span>height<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The height of the BitmapData in pixels.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-47">line 47</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="imageData"><span class="type-signature"></span>imageData<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>imageData</code></td> <td class="type"> <span class="param-type">array</span> </td> <td class="description last"><p>The canvas image data.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-64">line 64</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="key"><span class="type-signature"></span>key<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>key</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The key of the BitmapData in the Cache, if stored there.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-37">line 37</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="pixels"><span class="type-signature"></span>pixels<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>pixels</code></td> <td class="type"> <span class="param-type">UInt8Clamped</span> </td> <td class="description last"><p>A reference to the context imageData buffer.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-71">line 71</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="texture"><span class="type-signature"></span>texture<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>texture</code></td> <td class="type"> <span class="param-type">PIXI.Texture</span> </td> <td class="description last"><p>The PIXI.Texture.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-88">line 88</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="textureFrame"><span class="type-signature"></span>textureFrame<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>textureFrame</code></td> <td class="type"> <span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span> </td> <td class="description last"><p>The Frame this BitmapData uses for rendering.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-94">line 94</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The const type of this object.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-100">line 100</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="width"><span class="type-signature"></span>width<span class="type-signature"></span></h4> </dt> <dd> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The width of the BitmapData in pixels.</p></td> </tr> </tbody> </table> </dl> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-42">line 42</a> </li></ul></dd> </dl> </dd> </dl> <h3 class="subsection-title">Methods</h3> <dl> <dt> <h4 class="name" id="a"><span class="type-signature"></span>a<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to arc.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-997">line 997</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(sprite)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Updates the given Sprite so that it uses this BitmapData as its texture.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>sprite</code></td> <td class="type"> <span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span> </td> <td class="description last"><p>The sprite to apply this texture to.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-108">line 108</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="addTo"><span class="type-signature"></span>addTo<span class="signature">(sprites)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Given an array of Sprites it will update each of them so that their Textures reference this BitmapData.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>sprites</code></td> <td class="type"> <span class="param-type">Phaser.Sprite[]</span> </td> <td class="description last"><p>An array of Sprites to apply this texture to.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-119">line 119</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="arc"><span class="type-signature"></span>arc<span class="signature">(x, y, radius, startAngle, endAngle, <span class="optional">anticlockwise</span>)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The x axis of the coordinate for the arc's center</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The y axis of the coordinate for the arc's center</p></td> </tr> <tr> <td class="name"><code>radius</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The arc's radius</p></td> </tr> <tr> <td class="name"><code>startAngle</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The starting point, measured from the x axis, from which it will be drawn, expressed in radians.</p></td> </tr> <tr> <td class="name"><code>endAngle</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The end arc's angle to which it will be drawn, expressed in radians.</p></td> </tr> <tr> <td class="name"><code>anticlockwise</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> true </td> <td class="description last"><p>true draws the arc anticlockwise, otherwise in a clockwise direction.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-250">line 250</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="arcTo"><span class="type-signature"></span>arcTo<span class="signature">(x1, y1, x2, y2, radius)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Adds an arc with the given control points and radius, connected to the previous point by a straight line.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>y1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>x2</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>y2</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>radius</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-272">line 272</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="at"><span class="type-signature"></span>at<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to arcTo.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-979">line 979</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="beginFill"><span class="type-signature"></span>beginFill<span class="signature">(color)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Begins a fill with the specified color. This ends the current sub-path.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>color</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>A CSS compatible color value (ex. "red", "#FF0000", or "rgba(255,0,0,0.5)"). Setting to null will result in no fill.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-290">line 290</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="beginLinearGradientFill"><span class="type-signature"></span>beginLinearGradientFill<span class="signature">(colors, ratios, x0, y0, x1, y1)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Begins a linear gradient fill defined by the line (x0, y0) to (x1, y1). This ends the current sub-path. For example, the following code defines a black to white vertical gradient ranging from 20px to 120px, and draws a square to display it:</p> <pre><code> ```myGraphics.beginLinearGradientFill(["#000","#FFF"], [0, 1], 0, 20, 0, 120).rect(20, 20, 120, 120);```</code></pre> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>colors</code></td> <td class="type"> <span class="param-type"><a href="Array.html">Array</a></span> </td> <td class="description last"><p>An array of CSS compatible color values. For example, ["#F00","#00F"] would define a gradient drawing from red to blue.</p></td> </tr> <tr> <td class="name"><code>ratios</code></td> <td class="type"> <span class="param-type"><a href="Array.html">Array</a></span> </td> <td class="description last"><p>An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw the first color to 10% then interpolating to the second color at 90%.</p></td> </tr> <tr> <td class="name"><code>x0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The position of the first point defining the line that defines the gradient direction and size.</p></td> </tr> <tr> <td class="name"><code>y0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The position of the first point defining the line that defines the gradient direction and size.</p></td> </tr> <tr> <td class="name"><code>x1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The position of the second point defining the line that defines the gradient direction and size.</p></td> </tr> <tr> <td class="name"><code>y1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The position of the second point defining the line that defines the gradient direction and size.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-304">line 304</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="beginLinearGradientStroke"><span class="type-signature"></span>beginLinearGradientStroke<span class="signature">(colors, ratios, x0, y0, x1, y1)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Begins a linear gradient stroke defined by the line (x0, y0) to (x1, y1). This ends the current sub-path. For example, the following code defines a black to white vertical gradient ranging from 20px to 120px, and draws a square to display it:</p> <pre><code> ```myGraphics.setStrokeStyle(10).beginLinearGradientStroke(["#000","#FFF"], [0, 1], 0, 20, 0, 120).drawRect(20, 20, 120, 120);```</code></pre> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>colors</code></td> <td class="type"> <span class="param-type"><a href="Array.html">Array</a></span> </td> <td class="description last"><p>An array of CSS compatible color values. For example, ["#F00","#00F"] would define a gradient drawing from red to blue.</p></td> </tr> <tr> <td class="name"><code>ratios</code></td> <td class="type"> <span class="param-type"><a href="Array.html">Array</a></span> </td> <td class="description last"><p>An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw the first color to 10% then interpolating to the second color at 90%.</p></td> </tr> <tr> <td class="name"><code>x0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The position of the first point defining the line that defines the gradient direction and size.</p></td> </tr> <tr> <td class="name"><code>y0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The position of the first point defining the line that defines the gradient direction and size.</p></td> </tr> <tr> <td class="name"><code>x1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The position of the second point defining the line that defines the gradient direction and size.</p></td> </tr> <tr> <td class="name"><code>y1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The position of the second point defining the line that defines the gradient direction and size.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-334">line 334</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="beginPath"><span class="type-signature"></span>beginPath<span class="signature">()</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Starts a new path by resetting the list of sub-paths. Call this method when you want to create a new path.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-399">line 399</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="beginRadialGradientStroke"><span class="type-signature"></span>beginRadialGradientStroke<span class="signature">(colors, ratios, x0, y0, r0, x1, y1, r1)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Begins a radial gradient stroke. This ends the current sub-path. For example, the following code defines a red to blue radial gradient centered at (100, 100), with a radius of 50, and draws a rectangle to display it:</p> <pre><code> myGraphics.setStrokeStyle(10) .beginRadialGradientStroke(["#F00","#00F"], [0, 1], 100, 100, 0, 100, 100, 50) .drawRect(50, 90, 150, 110);</code></pre> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>colors</code></td> <td class="type"> <span class="param-type"><a href="Array.html">Array</a></span> </td> <td class="description last"><p>An array of CSS compatible color values. For example, ["#F00","#00F"] would define a gradient drawing from red to blue.</p></td> </tr> <tr> <td class="name"><code>ratios</code></td> <td class="type"> <span class="param-type"><a href="Array.html">Array</a></span> </td> <td class="description last"><p>An array of gradient positions which correspond to the colors. For example, [0.1, 0.9] would draw the first color to 10% then interpolating to the second color at 90%.</p></td> </tr> <tr> <td class="name"><code>x0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Center position of the inner circle that defines the gradient.</p></td> </tr> <tr> <td class="name"><code>y0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Center position of the inner circle that defines the gradient.</p></td> </tr> <tr> <td class="name"><code>r0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Radius of the inner circle that defines the gradient.</p></td> </tr> <tr> <td class="name"><code>x1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Center position of the outer circle that defines the gradient.</p></td> </tr> <tr> <td class="name"><code>y1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Center position of the outer circle that defines the gradient.</p></td> </tr> <tr> <td class="name"><code>r1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Radius of the outer circle that defines the gradient.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-365">line 365</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="beginStroke"><span class="type-signature"></span>beginStroke<span class="signature">(color)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Begins a stroke with the specified color. This ends the current sub-path.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>color</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last"><p>A CSS compatible color value (ex. "#FF0000", "red", or "rgba(255,0,0,0.5)"). Setting to null will result in no stroke.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-411">line 411</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="bezierCurveTo"><span class="type-signature"></span>bezierCurveTo<span class="signature">(cp1x, cp1y, cp2x, cp2y, x, y)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Adds a bezier curve from the current context point to (x, y) using the control points (cp1x, cp1y) and (cp2x, cp2y).</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>cp1x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis of control point 1.</p></td> </tr> <tr> <td class="name"><code>cp1y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis of control point 1.</p></td> </tr> <tr> <td class="name"><code>cp2x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis of control point 2.</p></td> </tr> <tr> <td class="name"><code>cp2y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis of control point 2.</p></td> </tr> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis of the ending point.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis of the ending point.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-424">line 424</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="bf"><span class="type-signature"></span>bf<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to beginBitmapFill.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1039">line 1039</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="bs"><span class="type-signature"></span>bs<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to beginBitmapStroke.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1075">line 1075</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="bt"><span class="type-signature"></span>bt<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to bezierCurveTo.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-985">line 985</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="c"><span class="type-signature"></span>c<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to clear.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1015">line 1015</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="circle"><span class="type-signature"></span>circle<span class="signature">(x, y, radius)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Draws a circle with the specified radius at (x, y).</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>x coordinate center point of circle.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>y coordinate center point of circle.</p></td> </tr> <tr> <td class="name"><code>radius</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Radius of circle in radians.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-443">line 443</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="clear"><span class="type-signature"></span>clear<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Clears the BitmapData.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-136">line 136</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="clearRect"><span class="type-signature"></span>clearRect<span class="signature">(x, y, width, height)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Sets all pixels in the rectangle defined by starting point (x, y) and size (width, height) to transparent black.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis of the coordinate for the rectangle starting point.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis of the coordinate for the rectangle starting point.</p></td> </tr> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The rectangles width.</p></td> </tr> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The rectangles height.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-458">line 458</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="clip"><span class="type-signature"></span>clip<span class="signature">()</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Creates a clipping path from the current sub-paths. Everything drawn after clip() is called appears inside the clipping path only.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-475">line 475</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="closePath"><span class="type-signature"></span>closePath<span class="signature">()</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Tries to draw a straight line from the current point to the start. If the shape has already been closed or has only one point, this function does nothing.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-488">line 488</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="cp"><span class="type-signature"></span>cp<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to closePath.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1009">line 1009</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="createLinearGradient"><span class="type-signature"></span>createLinearGradient<span class="signature">(x, y, width, height)</span><span class="type-signature"> → {CanvasGradient}</span></h4> </dt> <dd> <div class="description"> <p>Creates a linear gradient with defined by an imaginary line which implies the direction of the gradient. Once the gradient is created colors can be inserted using the addColorStop method.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis of the coordinate for the gradients starting point.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis of the coordinate for the gradients starting point.</p></td> </tr> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The width of the gradient.</p></td> </tr> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The height of the gradient.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-501">line 501</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The Linear Gradient.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">CanvasGradient</span> </dd> </dl> </dd> <dt> <h4 class="name" id="createRadialGradient"><span class="type-signature"></span>createRadialGradient<span class="signature">(x0, y0, r0, x1, y1, r1)</span><span class="type-signature"> → {CanvasGradient}</span></h4> </dt> <dd> <div class="description"> <p>Creates a radial gradient.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>y0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>r0</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>x1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>y1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>r1</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-519">line 519</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The Radial Gradient.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">CanvasGradient</span> </dd> </dl> </dd> <dt> <h4 class="name" id="dc"><span class="type-signature"></span>dc<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to drawCircle.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1099">line 1099</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="de"><span class="type-signature"></span>de<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to drawEllipse.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1111">line 1111</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="dp"><span class="type-signature"></span>dp<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to drawPolyStar.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1117">line 1117</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="dr"><span class="type-signature"></span>dr<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to rect.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1081">line 1081</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="ef"><span class="type-signature"></span>ef<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to endFill.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1042">line 1042</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="ellipse"><span class="type-signature"></span>ellipse<span class="signature">(x, y, w, h)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Draws an ellipse (oval) with a specified width (w) and height (h).</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>x coordinate center point of ellipse.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>y coordinate center point of ellipse.</p></td> </tr> <tr> <td class="name"><code>w</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>height (horizontal diameter) of ellipse. The horizontal radius will be half of this number.</p></td> </tr> <tr> <td class="name"><code>h</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>width (vertical diameter) of ellipse. The vertical radius will be half of this number.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-539">line 539</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="es"><span class="type-signature"></span>es<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to endStroke.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1078">line 1078</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="f"><span class="type-signature"></span>f<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to beginFill.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1021">line 1021</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="fill"><span class="type-signature"></span>fill<span class="signature">()</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Fills the subpaths with the current fill style.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-568">line 568</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="fillRect"><span class="type-signature"></span>fillRect<span class="signature">(x, y, width, height)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Draws a filled rectangle at (x, y) position whose size is determined by width and height.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis of the coordinate for the rectangle starting point.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis of the coordinate for the rectangle starting point.</p></td> </tr> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The rectangles width.</p></td> </tr> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The rectangles height.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-581">line 581</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="fillStyle"><span class="type-signature"></span>fillStyle<span class="signature">(color)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Sets the fill style.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>color</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The fill color value in CSS format: #RRGGBB or rgba(r,g,b,a)</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-598">line 598</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="font"><span class="type-signature"></span>font<span class="signature">(font)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Sets the font.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>font</code></td> <td class="type"> <span class="param-type">DOMString</span> </td> <td class="description last"><p>The font to be used for any text rendering. Default value 10px sans-serif.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-613">line 613</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="getPixel"><span class="type-signature"></span>getPixel<span class="signature">(x, y)</span><span class="type-signature"> → {number}</span></h4> </dt> <dd> <div class="description"> <p>Get a color of a specific pixel.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The X coordinate of the pixel to get.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The Y coordinate of the pixel to get.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-215">line 215</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>A native color value integer (format: 0xRRGGBB)</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">number</span> </dd> </dl> </dd> <dt> <h4 class="name" id="getPixel32"><span class="type-signature"></span>getPixel32<span class="signature">(x, y)</span><span class="type-signature"> → {number}</span></h4> </dt> <dd> <div class="description"> <p>Get a color of a specific pixel (including alpha value).</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The X coordinate of the pixel to get.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The Y coordinate of the pixel to get.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-230">line 230</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>A native color value integer (format: 0xAARRGGBB)</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">number</span> </dd> </dl> </dd> <dt> <h4 class="name" id="getPixels"><span class="type-signature"></span>getPixels<span class="signature">(rect)</span><span class="type-signature"> → {array}</span></h4> </dt> <dd> <div class="description"> <p>Get pixels in array in a specific Rectangle.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>rect</code></td> <td class="type"> <span class="param-type">Rectangle</span> </td> <td class="description last"><p>The specific Rectangle.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-244">line 244</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>CanvasPixelArray.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">array</span> </dd> </dl> </dd> <dt> <h4 class="name" id="globalAlpha"><span class="type-signature"></span>globalAlpha<span class="signature">(alpha)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>alpha</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Alpha value that is applied to shapes and images before they are composited onto the canvas. Default 1.0 (opaque).</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-626">line 626</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="globalCompositeOperation"><span class="type-signature"></span>globalCompositeOperation<span class="signature">(operation)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>With globalAlpha applied this sets how shapes and images are drawn onto the existing bitmap. Possible values: source-atop, source-in, source-out, source-over (default), destination-atop, destination-in, destination-out, destination-over, lighter, darker, copy and xor.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>operation</code></td> <td class="type"> <span class="param-type">DOMString</span> </td> <td class="description last"><p>The composite operation to apply.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-639">line 639</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="lf"><span class="type-signature"></span>lf<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to beginLinearGradientFill.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1027">line 1027</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="lineCap"><span class="type-signature"></span>lineCap<span class="signature">(style)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Type of endings on the end of lines. Possible values: butt (default), round, square.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>style</code></td> <td class="type"> <span class="param-type">DOMString</span> </td> <td class="description last"><p>Possible values: butt (default), round, square</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-653">line 653</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="lineDashOffset"><span class="type-signature"></span>lineDashOffset<span class="signature">(offset)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Specifies where to start a dasharray on a line.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>offset</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Specifies where to start a dasharray on a line.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-666">line 666</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="lineJoin"><span class="type-signature"></span>lineJoin<span class="signature">(join)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Defines the type of corners where two lines meet. Possible values: round, bevel, miter (default)</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>join</code></td> <td class="type"> <span class="param-type">DOMString</span> </td> <td class="description last"><p>Possible values: round, bevel, miter (default)</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-679">line 679</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="lineTo"><span class="type-signature"></span>lineTo<span class="signature">(x, y)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Connects the last point in the subpath to the x, y coordinates with a straight line.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis of the coordinate for the end of the line.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis of the coordinate for the end of the line.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-723">line 723</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="lineWidth"><span class="type-signature"></span>lineWidth<span class="signature">(width)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Width of lines. Default 1.0</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Width of lines. Default 1.0</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-692">line 692</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="ls"><span class="type-signature"></span>ls<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to beginLinearGradientStroke.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1063">line 1063</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="miterLimit"><span class="type-signature"></span>miterLimit<span class="signature">(limit)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Default 10.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>limit</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>Default 10.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-705">line 705</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="moveTo"><span class="type-signature"></span>moveTo<span class="signature">(x, y)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Moves the starting point of a new subpath to the (x, y) coordinates.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis of the point.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis of the point.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-740">line 740</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="mt"><span class="type-signature"></span>mt<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to moveTo.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-967">line 967</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="mt"><span class="type-signature"></span>mt<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to lineTo.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-973">line 973</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="qt"><span class="type-signature"></span>qt<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to quadraticCurveTo.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-991">line 991</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="quadraticCurveTo"><span class="type-signature"></span>quadraticCurveTo<span class="signature">(cpx, cpy, x, y)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Draws a quadratic curve from the current drawing point to (x, y) using the control point (cpx, cpy).</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>cpx</code></td> <td class="type"> <span class="param-type">Number</span> </td> <td class="description last"><p>The x axis of the control point.</p></td> </tr> <tr> <td class="name"><code>cpy</code></td> <td class="type"> <span class="param-type">Number</span> </td> <td class="description last"><p>The y axis of the control point.</p></td> </tr> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">Number</span> </td> <td class="description last"><p>The x axis of the ending point.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">Number</span> </td> <td class="description last"><p>The y axis of the ending point.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-756">line 756</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="r"><span class="type-signature"></span>r<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to rect.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1003">line 1003</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="rc"><span class="type-signature"></span>rc<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to drawRoundRectComplex.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1096">line 1096</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="rect"><span class="type-signature"></span>rect<span class="signature">(x, y, width, height)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Draws a rectangle at (x, y) position whose size is determined by width and height.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis of the coordinate for the rectangle starting point.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis of the coordinate for the rectangle starting point.</p></td> </tr> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The rectangles width.</p></td> </tr> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The rectangles height.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-773">line 773</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="render"><span class="type-signature"></span>render<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>If the game is running in WebGL this will push the texture up to the GPU if it's dirty. This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-941">line 941</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="restore"><span class="type-signature"></span>restore<span class="signature">()</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Restores the drawing style state to the last element on the 'state stack' saved by save().</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-790">line 790</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="rf"><span class="type-signature"></span>rf<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to beginRadialGradientFill.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1033">line 1033</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="rotate"><span class="type-signature"></span>rotate<span class="signature">(angle)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Rotates the drawing context values by r radians.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>angle</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The angle of rotation given in radians.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-803">line 803</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="rr"><span class="type-signature"></span>rr<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to drawRoundRect.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1093">line 1093</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="rs"><span class="type-signature"></span>rs<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to beginRadialGradientStroke.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1069">line 1069</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="s"><span class="type-signature"></span>s<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to beginStroke.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1057">line 1057</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">()</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Saves the current drawing style state using a stack so you can revert any change you make to it using restore().</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-850">line 850</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="scale"><span class="type-signature"></span>scale<span class="signature">(x, y)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Scales the current drawing context.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-863">line 863</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="scrollPathIntoView"><span class="type-signature"></span>scrollPathIntoView<span class="signature">()</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-878">line 878</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="setPixel"><span class="type-signature"></span>setPixel<span class="signature">(x, y, red, green, blue)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Sets the color of the given pixel to the specified red, green and blue values.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The X coordinate of the pixel to be set.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The Y coordinate of the pixel to be set.</p></td> </tr> <tr> <td class="name"><code>red</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The red color value (between 0 and 255)</p></td> </tr> <tr> <td class="name"><code>green</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The green color value (between 0 and 255)</p></td> </tr> <tr> <td class="name"><code>blue</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The blue color value (between 0 and 255)</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-194">line 194</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="setPixel32"><span class="type-signature"></span>setPixel32<span class="signature">(x, y, red, green, blue, alpha)</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Sets the color of the given pixel to the specified red, green, blue and alpha values.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The X coordinate of the pixel to be set.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The Y coordinate of the pixel to be set.</p></td> </tr> <tr> <td class="name"><code>red</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The red color value, between 0 and 0xFF (255).</p></td> </tr> <tr> <td class="name"><code>green</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The green color value, between 0 and 0xFF (255).</p></td> </tr> <tr> <td class="name"><code>blue</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The blue color value, between 0 and 0xFF (255).</p></td> </tr> <tr> <td class="name"><code>alpha</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The alpha color value, between 0 and 0xFF (255).</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-158">line 158</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="setStrokeStyle"><span class="type-signature"></span>setStrokeStyle<span class="signature">(thickness, <span class="optional">caps</span>, <span class="optional">joints</span>, <span class="optional">miterLimit</span>, <span class="optional">ignoreScale</span>)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Sets the stroke style for the current sub-path. Like all drawing methods, this can be chained, so you can define the stroke style and color in a single line of code like so:</p> <pre><code> ```myGraphics.setStrokeStyle(8,"round").beginStroke("#F00");```</code></pre> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Argument</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>thickness</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The width of the stroke.</p></td> </tr> <tr> <td class="name"><code>caps</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last"><p>Indicates the type of caps to use at the end of lines. One of butt, round, or square. Defaults to "butt". Also accepts the values 0 (butt), 1 (round), and 2 (square) for use with he tiny API.</p></td> </tr> <tr> <td class="name"><code>joints</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 0 </td> <td class="description last"><p>Specifies the type of joints that should be used where two lines meet. One of bevel, round, or miter. Defaults to "miter". Also accepts the values 0 (miter), 1 (round), and 2 (bevel) for use with the tiny API.</p></td> </tr> <tr> <td class="name"><code>miterLimit</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> 10 </td> <td class="description last"><p>If joints is set to "miter", then you can specify a miter limit ratio which controls at what point a mitered joint will be clipped.</p></td> </tr> <tr> <td class="name"><code>ignoreScale</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> <optional><br> </td> <td class="default"> false </td> <td class="description last"><p>If true, the stroke will be drawn at the specified thickness regardless of active transformations.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-817">line 817</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="ss"><span class="type-signature"></span>ss<span class="signature">()</span><span class="type-signature"></span></h4> </dt> <dd> <div class="description"> <p>Shortcut to setStrokeStyle.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1051">line 1051</a> </li></ul></dd> </dl> </dd> <dt> <h4 class="name" id="stroke"><span class="type-signature"></span>stroke<span class="signature">()</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Strokes the subpaths with the current stroke style.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-894">line 894</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="strokeRect"><span class="type-signature"></span>strokeRect<span class="signature">(x, y, width, height)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Paints a rectangle which has a starting point at (x, y) and has a w width and an h height onto the canvas, using the current stroke style.</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The x axis for the starting point of the rectangle.</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The y axis for the starting point of the rectangle.</p></td> </tr> <tr> <td class="name"><code>width</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The rectangles width.</p></td> </tr> <tr> <td class="name"><code>height</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="description last"><p>The rectangles height.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-907">line 907</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> <dt> <h4 class="name" id="strokeStyle"><span class="type-signature"></span>strokeStyle<span class="signature">(style)</span><span class="type-signature"> → {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4> </dt> <dd> <div class="description"> <p>Color or style to use for the lines around shapes. Default #000 (black).</p> </div> <h5>Parameters:</h5> <table class="params table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>style</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Color or style to use for the lines around shapes. Default #000 (black).</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-924">line 924</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The BitmapData instance this method was called on.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span> </dd> </dl> </dd> </dl> </article> </section> </div> <div class="clearfix"></div> <footer> <span class="copyright"> Phaser Copyright © 2012-2014 Photon Storm Ltd. </span> <br /> <span class="jsdoc-message"> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a> on Sat Feb 08 2014 07:19:41 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>. </span> </footer> </div> <div class="span3"> <div id="toc"></div> </div> <br clear="both"> </div> </div> <script src="scripts/sunlight.js"></script> <script src="scripts/sunlight.javascript.js"></script> <script src="scripts/sunlight-plugin.doclinks.js"></script> <script src="scripts/sunlight-plugin.linenumbers.js"></script> <script src="scripts/sunlight-plugin.menu.js"></script> <script src="scripts/jquery.min.js"></script> <script src="scripts/jquery.scrollTo.js"></script> <script src="scripts/jquery.localScroll.js"></script> <script src="scripts/bootstrap-dropdown.js"></script> <script src="scripts/toc.js"></script> <script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script> <script> $( function () { $( "#toc" ).toc( { selectors : "h1,h2,h3,h4", showAndHide : false, scrollTo : 60 } ); $( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" ); $( "#main span[id^='toc']" ).addClass( "toc-shim" ); } ); </script> </body> </html>