phaser/v2-community/docs/Phaser.BitmapData.html
2016-12-05 10:06:09 +00:00

16190 lines
No EOL
287 KiB
HTML

<!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/default.css">
<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 style="position: absolute; width: 143px; height: 31px; right: 10px; top: 10px; z-index: 1050"><a href="http://phaser.io"><img src="img/phaser.png" border="0" /></a></div>
<div class="navbar-inner">
<a class="brand" href="index.html">Phaser API</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 class="class-depth-0">
<a href="Phaser.html">Phaser</a>
</li>
<li class="class-depth-0">
<a href="PIXI.html">PIXI</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 class="class-depth-0">
<a href="EarCut.html">EarCut</a>
</li>
<li class="class-depth-0">
<a href="Event.html">Event</a>
</li>
<li class="class-depth-0">
<a href="EventTarget.html">EventTarget</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Animation.html">Animation</a>
</li>
<li class="class-depth-1">
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li class="class-depth-1">
<a href="Phaser.ArraySet.html">ArraySet</a>
</li>
<li class="class-depth-1">
<a href="Phaser.ArrayUtils.html">ArrayUtils</a>
</li>
<li class="class-depth-1">
<a href="Phaser.AudioSprite.html">AudioSprite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li class="class-depth-1">
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Bullet.html">Bullet</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Button.html">Button</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Cache.html">Cache</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Camera.html">Camera</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Canvas.html">Canvas</a>
</li>
<li class="class-depth-1">
<a href="Phaser.CanvasPool.html">CanvasPool</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Circle.html">Circle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Color.html">Color</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Angle.html">Angle</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Animation.html">Animation</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.AutoCull.html">AutoCull</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Bounds.html">Bounds</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.BringToTop.html">BringToTop</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Core.html">Core</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Crop.html">Crop</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Delta.html">Delta</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Destroy.html">Destroy</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.FixedToCamera.html">FixedToCamera</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Health.html">Health</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.InCamera.html">InCamera</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.InputEnabled.html">InputEnabled</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.InWorld.html">InWorld</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.LifeSpan.html">LifeSpan</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.LoadTexture.html">LoadTexture</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Overlap.html">Overlap</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.PhysicsBody.html">PhysicsBody</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Reset.html">Reset</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.ScaleMinMax.html">ScaleMinMax</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Component.Smoothed.html">Smoothed</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Create.html">Create</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Creature.html">Creature</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Device.html">Device</a>
</li>
<li class="class-depth-1">
<a href="Phaser.DeviceButton.html">DeviceButton</a>
</li>
<li class="class-depth-1">
<a href="Phaser.DOM.html">DOM</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Easing.html">Easing</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Back.html">Back</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Ellipse.html">Ellipse</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Events.html">Events</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Filter.html">Filter</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FlexGrid.html">FlexGrid</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FlexLayer.html">FlexLayer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Frame.html">Frame</a>
</li>
<li class="class-depth-1">
<a href="Phaser.FrameData.html">FrameData</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Game.html">Game</a>
</li>
<li class="class-depth-1">
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
</li>
<li class="class-depth-1">
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Graphics.html">Graphics</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Group.html">Group</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Hermite.html">Hermite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Image.html">Image</a>
</li>
<li class="class-depth-1">
<a href="Phaser.ImageCollection.html">ImageCollection</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Input.html">Input</a>
</li>
<li class="class-depth-1">
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Key.html">Key</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li class="class-depth-1">
<a href="Phaser.KeyCode.html">KeyCode</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Line.html">Line</a>
</li>
<li class="class-depth-1">
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Loader.html">Loader</a>
</li>
<li class="class-depth-1">
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Math.html">Math</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Matrix.html">Matrix</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Mouse.html">Mouse</a>
</li>
<li class="class-depth-1">
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Net.html">Net</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Particle.html">Particle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Particles.html">Particles</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Particles.Arcade.html">Arcade</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Path.html">Path</a>
</li>
<li class="class-depth-1">
<a href="Phaser.PathFollower.html">PathFollower</a>
</li>
<li class="class-depth-1">
<a href="Phaser.PathPoint.html">PathPoint</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Physics.html">Physics</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Arcade.TilemapCollision.html">TilemapCollision</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Physics.Ninja.html">Ninja</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Physics.P2.html">P2</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Body.html">Body</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Material.html">Material</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RotationalSpring.html">RotationalSpring</a>
</li>
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Plugin.html">Plugin</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Plugin.PathManager.html">PathManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Point.html">Point</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Pointer.html">Pointer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.PointerMode.html">PointerMode</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Polygon.html">Polygon</a>
</li>
<li class="class-depth-1">
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RetroFont.html">RetroFont</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Rope.html">Rope</a>
</li>
<li class="class-depth-1">
<a href="Phaser.RoundedRectangle.html">RoundedRectangle</a>
</li>
<li class="class-depth-1">
<a href="Phaser.ScaleManager.html">ScaleManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Signal.html">Signal</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SignalBinding.html">SignalBinding</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Sound.html">Sound</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Stage.html">Stage</a>
</li>
<li class="class-depth-1">
<a href="Phaser.State.html">State</a>
</li>
<li class="class-depth-1">
<a href="Phaser.StateManager.html">StateManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Text.html">Text</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tile.html">Tile</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Time.html">Time</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Timer.html">Timer</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Touch.html">Touch</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Tween.html">Tween</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TweenData.html">TweenData</a>
</li>
<li class="class-depth-1">
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Utils.html">Utils</a>
</li>
<li class="class-depth-2">
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Video.html">Video</a>
</li>
<li class="class-depth-1">
<a href="Phaser.Weapon.html">Weapon</a>
</li>
<li class="class-depth-1">
<a href="Phaser.World.html">World</a>
</li>
<li class="class-depth-1">
<a href="PIXI.BaseTexture.html">BaseTexture</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasBuffer.html">CanvasBuffer</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasGraphics.html">CanvasGraphics</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasMaskManager.html">CanvasMaskManager</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasRenderer.html">CanvasRenderer</a>
</li>
<li class="class-depth-1">
<a href="PIXI.CanvasTinter.html">CanvasTinter</a>
</li>
<li class="class-depth-1">
<a href="PIXI.ComplexPrimitiveShader.html">ComplexPrimitiveShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.DisplayObject.html">DisplayObject</a>
</li>
<li class="class-depth-1">
<a href="PIXI.DisplayObjectContainer.html">DisplayObjectContainer</a>
</li>
<li class="class-depth-1">
<a href="PIXI.FilterTexture.html">FilterTexture</a>
</li>
<li class="class-depth-2">
<a href="PIXI.Phaser.GraphicsData.html">Phaser.GraphicsData</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PIXI.html">PIXI</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PixiFastShader.html">PixiFastShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PixiShader.html">PixiShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.PrimitiveShader.html">PrimitiveShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Sprite.html">Sprite</a>
</li>
<li class="class-depth-1">
<a href="PIXI.StripShader.html">StripShader</a>
</li>
<li class="class-depth-1">
<a href="PIXI.Texture.html">Texture</a>
</li>
<li class="class-depth-1">
<a href="PIXI.WebGLBlendModeManager.html">WebGLBlendModeManager</a>
</li>
<li class="class-depth-1">
<a href="PIXI.WebGLFastSpriteBatch.html">WebGLFastSpriteBatch</a>
</li>
<li class="class-depth-1">
<a href="PIXI.WebGLFilterManager.html">WebGLFilterManager</a>
</li>
<li class="class-depth-1">
<a href="PIXI.WebGLRenderer.html">WebGLRenderer</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 class="class-depth-0">
<a href="global.html#ANGLE_DOWN">ANGLE_DOWN</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_LEFT">ANGLE_LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_NORTH_EAST">ANGLE_NORTH_EAST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_NORTH_WEST">ANGLE_NORTH_WEST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_RIGHT">ANGLE_RIGHT</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_SOUTH_EAST">ANGLE_SOUTH_EAST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_SOUTH_WEST">ANGLE_SOUTH_WEST</a>
</li>
<li class="class-depth-0">
<a href="global.html#ANGLE_UP">ANGLE_UP</a>
</li>
<li class="class-depth-0">
<a href="global.html#arc">arc</a>
</li>
<li class="class-depth-0">
<a href="global.html#AUTO">AUTO</a>
</li>
<li class="class-depth-0">
<a href="global.html#beginFill">beginFill</a>
</li>
<li class="class-depth-0">
<a href="global.html#bezierCurveTo">bezierCurveTo</a>
</li>
<li class="class-depth-0">
<a href="global.html#BITMAPDATA">BITMAPDATA</a>
</li>
<li class="class-depth-0">
<a href="global.html#BITMAPTEXT">BITMAPTEXT</a>
</li>
<li class="class-depth-0">
<a href="global.html#blendModes">blendModes</a>
</li>
<li class="class-depth-0">
<a href="global.html#BOTTOM_CENTER">BOTTOM_CENTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#BOTTOM_LEFT">BOTTOM_LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#BOTTOM_RIGHT">BOTTOM_RIGHT</a>
</li>
<li class="class-depth-0">
<a href="global.html#BUTTON">BUTTON</a>
</li>
<li class="class-depth-0">
<a href="global.html#CANVAS">CANVAS</a>
</li>
<li class="class-depth-0">
<a href="global.html#CANVAS_FILTER">CANVAS_FILTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#CENTER">CENTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#CIRCLE">CIRCLE</a>
</li>
<li class="class-depth-0">
<a href="global.html#clear">clear</a>
</li>
<li class="class-depth-0">
<a href="global.html#CREATURE">CREATURE</a>
</li>
<li class="class-depth-0">
<a href="global.html#destroyCachedSprite">destroyCachedSprite</a>
</li>
<li class="class-depth-0">
<a href="global.html#displayList">displayList</a>
</li>
<li class="class-depth-0">
<a href="global.html#DOWN">DOWN</a>
</li>
<li class="class-depth-0">
<a href="global.html#drawCircle">drawCircle</a>
</li>
<li class="class-depth-0">
<a href="global.html#drawEllipse">drawEllipse</a>
</li>
<li class="class-depth-0">
<a href="global.html#drawPolygon">drawPolygon</a>
</li>
<li class="class-depth-0">
<a href="global.html#drawRect">drawRect</a>
</li>
<li class="class-depth-0">
<a href="global.html#drawRoundedRect">drawRoundedRect</a>
</li>
<li class="class-depth-0">
<a href="global.html#drawShape">drawShape</a>
</li>
<li class="class-depth-0">
<a href="global.html#ELLIPSE">ELLIPSE</a>
</li>
<li class="class-depth-0">
<a href="global.html#emit">emit</a>
</li>
<li class="class-depth-0">
<a href="global.html#EMITTER">EMITTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#endFill">endFill</a>
</li>
<li class="class-depth-0">
<a href="global.html#GAMES">GAMES</a>
</li>
<li class="class-depth-0">
<a href="global.html#generateTexture">generateTexture</a>
</li>
<li class="class-depth-0">
<a href="global.html#getBounds">getBounds</a>
</li>
<li class="class-depth-0">
<a href="global.html#getLocalBounds">getLocalBounds</a>
</li>
<li class="class-depth-0">
<a href="global.html#GRAPHICS">GRAPHICS</a>
</li>
<li class="class-depth-0">
<a href="global.html#GROUP">GROUP</a>
</li>
<li class="class-depth-0">
<a href="global.html#HEADLESS">HEADLESS</a>
</li>
<li class="class-depth-0">
<a href="global.html#HORIZONTAL">HORIZONTAL</a>
</li>
<li class="class-depth-0">
<a href="global.html#IMAGE">IMAGE</a>
</li>
<li class="class-depth-0">
<a href="global.html#LANDSCAPE">LANDSCAPE</a>
</li>
<li class="class-depth-0">
<a href="global.html#LEFT">LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#LEFT_BOTTOM">LEFT_BOTTOM</a>
</li>
<li class="class-depth-0">
<a href="global.html#LEFT_CENTER">LEFT_CENTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#LEFT_TOP">LEFT_TOP</a>
</li>
<li class="class-depth-0">
<a href="global.html#LINE">LINE</a>
</li>
<li class="class-depth-0">
<a href="global.html#lineStyle">lineStyle</a>
</li>
<li class="class-depth-0">
<a href="global.html#lineTo">lineTo</a>
</li>
<li class="class-depth-0">
<a href="global.html#listeners">listeners</a>
</li>
<li class="class-depth-0">
<a href="global.html#MATRIX">MATRIX</a>
</li>
<li class="class-depth-0">
<a href="global.html#mixin">mixin</a>
</li>
<li class="class-depth-0">
<a href="global.html#moveTo">moveTo</a>
</li>
<li class="class-depth-0">
<a href="global.html#NONE">NONE</a>
</li>
<li class="class-depth-0">
<a href="global.html#off">off</a>
</li>
<li class="class-depth-0">
<a href="global.html#on">on</a>
</li>
<li class="class-depth-0">
<a href="global.html#once">once</a>
</li>
<li class="class-depth-0">
<a href="global.html#PENDING_ATLAS">PENDING_ATLAS</a>
</li>
<li class="class-depth-2">
<a href="global.html#Phaser.Path#numPointsreturn%257Bnumber%257DThetotalnumberofPathPointsinthisPath.">Phaser.Path#numPoints
return {number} The total number of PathPoints in this Path.</a>
</li>
<li class="class-depth-0">
<a href="global.html#POINT">POINT</a>
</li>
<li class="class-depth-0">
<a href="global.html#POINTER">POINTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#POLYGON">POLYGON</a>
</li>
<li class="class-depth-0">
<a href="global.html#PORTRAIT">PORTRAIT</a>
</li>
<li class="class-depth-0">
<a href="global.html#quadraticCurveTo">quadraticCurveTo</a>
</li>
<li class="class-depth-0">
<a href="global.html#RECTANGLE">RECTANGLE</a>
</li>
<li class="class-depth-0">
<a href="global.html#removeAllListeners">removeAllListeners</a>
</li>
<li class="class-depth-0">
<a href="global.html#RENDERTEXTURE">RENDERTEXTURE</a>
</li>
<li class="class-depth-0">
<a href="global.html#RETROFONT">RETROFONT</a>
</li>
<li class="class-depth-0">
<a href="global.html#RIGHT">RIGHT</a>
</li>
<li class="class-depth-0">
<a href="global.html#RIGHT_BOTTOM">RIGHT_BOTTOM</a>
</li>
<li class="class-depth-0">
<a href="global.html#RIGHT_CENTER">RIGHT_CENTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#RIGHT_TOP">RIGHT_TOP</a>
</li>
<li class="class-depth-0">
<a href="global.html#ROPE">ROPE</a>
</li>
<li class="class-depth-0">
<a href="global.html#ROUNDEDRECTANGLE">ROUNDEDRECTANGLE</a>
</li>
<li class="class-depth-0">
<a href="global.html#scaleModes">scaleModes</a>
</li>
<li class="class-depth-0">
<a href="global.html#SPRITE">SPRITE</a>
</li>
<li class="class-depth-0">
<a href="global.html#SPRITEBATCH">SPRITEBATCH</a>
</li>
<li class="class-depth-0">
<a href="global.html#stopImmediatePropagation">stopImmediatePropagation</a>
</li>
<li class="class-depth-0">
<a href="global.html#stopPropagation">stopPropagation</a>
</li>
<li class="class-depth-0">
<a href="global.html#TEXT">TEXT</a>
</li>
<li class="class-depth-0">
<a href="global.html#TILEMAP">TILEMAP</a>
</li>
<li class="class-depth-0">
<a href="global.html#TILEMAPLAYER">TILEMAPLAYER</a>
</li>
<li class="class-depth-0">
<a href="global.html#TILESPRITE">TILESPRITE</a>
</li>
<li class="class-depth-0">
<a href="global.html#TOP_CENTER">TOP_CENTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#TOP_LEFT">TOP_LEFT</a>
</li>
<li class="class-depth-0">
<a href="global.html#TOP_RIGHT">TOP_RIGHT</a>
</li>
<li class="class-depth-0">
<a href="global.html#UP">UP</a>
</li>
<li class="class-depth-0">
<a href="global.html#updateLocalBounds">updateLocalBounds</a>
</li>
<li class="class-depth-0">
<a href="global.html#VERSION">VERSION</a>
</li>
<li class="class-depth-0">
<a href="global.html#VERTICAL">VERTICAL</a>
</li>
<li class="class-depth-0">
<a href="global.html#VIDEO">VIDEO</a>
</li>
<li class="class-depth-0">
<a href="global.html#WEBGL">WEBGL</a>
</li>
<li class="class-depth-0">
<a href="global.html#WEBGL_FILTER">WEBGL_FILTER</a>
</li>
<li class="class-depth-0">
<a href="global.html#WEBGL_MULTI">WEBGL_MULTI</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Core<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.Game.html">Game</a></li>
<li class="class-depth-1"><a href="Phaser.Group.html">Group</a></li>
<li class="class-depth-1"><a href="Phaser.World.html">World</a></li>
<li class="class-depth-1"><a href="Phaser.Loader.html">Loader</a></li>
<li class="class-depth-1"><a href="Phaser.Cache.html">Cache</a></li>
<li class="class-depth-1"><a href="Phaser.Time.html">Time</a></li>
<li class="class-depth-1"><a href="Phaser.Camera.html">Camera</a></li>
<li class="class-depth-1"><a href="Phaser.StateManager.html">State Manager</a></li>
<li class="class-depth-1"><a href="Phaser.TweenManager.html">Tween Manager</a></li>
<li class="class-depth-1"><a href="Phaser.SoundManager.html">Sound Manager</a></li>
<li class="class-depth-1"><a href="Phaser.Input.html">Input Manager</a></li>
<li class="class-depth-1"><a href="Phaser.ScaleManager.html">Scale Manager</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Game Objects<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.GameObjectFactory.html">Factory (game.add)</a></li>
<li class="class-depth-1"><a href="Phaser.GameObjectCreator.html">Creator (game.make)</a></li>
<li class="class-depth-1"><a href="Phaser.Sprite.html">Sprite</a></li>
<li class="class-depth-1"><a href="Phaser.Image.html">Image</a></li>
<li class="class-depth-1"><a href="Phaser.Sound.html">Sound</a></li>
<li class="class-depth-1"><a href="Phaser.Video.html">Video</a></li>
<li class="class-depth-1"><a href="Phaser.Particles.Arcade.Emitter.html">Particle Emitter</a></li>
<li class="class-depth-1"><a href="Phaser.Particle.html">Particle</a></li>
<li class="class-depth-1"><a href="Phaser.Text.html">Text</a></li>
<li class="class-depth-1"><a href="Phaser.Tween.html">Tween</a></li>
<li class="class-depth-1"><a href="Phaser.BitmapText.html">BitmapText</a></li>
<li class="class-depth-1"><a href="Phaser.Tilemap.html">Tilemap</a></li>
<li class="class-depth-1"><a href="Phaser.BitmapData.html">BitmapData</a></li>
<li class="class-depth-1"><a href="Phaser.RetroFont.html">RetroFont</a></li>
<li class="class-depth-1"><a href="Phaser.Button.html">Button</a></li>
<li class="class-depth-1"><a href="Phaser.Animation.html">Animation</a></li>
<li class="class-depth-1"><a href="Phaser.Graphics.html">Graphics</a></li>
<li class="class-depth-1"><a href="Phaser.RenderTexture.html">RenderTexture</a></li>
<li class="class-depth-1"><a href="Phaser.TileSprite.html">TileSprite</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Geometry<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.Circle.html">Circle</a></li>
<li class="class-depth-1"><a href="Phaser.Ellipse.html">Ellipse</a></li>
<li class="class-depth-1"><a href="Phaser.Line.html">Line</a></li>
<li class="class-depth-1"><a href="Phaser.Matrix.html">Matrix</a></li>
<li class="class-depth-1"><a href="Phaser.Point.html">Point</a></li>
<li class="class-depth-1"><a href="Phaser.Polygon.html">Polygon</a></li>
<li class="class-depth-1"><a href="Phaser.Rectangle.html">Rectangle</a></li>
<li class="class-depth-1"><a href="Phaser.RoundedRectangle.html">Rounded Rectangle</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Physics<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.Physics.Arcade.html">Arcade Physics</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.Arcade.Body.html">Body</a></li>
<li class="class-depth-2"><a href="Phaser.Weapon.html">Weapon</a></li>
<li class="class-depth-1"><a href="Phaser.Physics.P2.html">P2 Physics</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.Body.html">Body</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.Spring.html">Spring</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a></li>
<li class="class-depth-1"><a href="Phaser.Physics.Ninja.html">Ninja Physics</a></li>
<li class="class-depth-2"><a href="Phaser.Physics.Body.html">Body</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Input<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="Phaser.InputHandler.html">Input Handler</a></li>
<li class="class-depth-1"><a href="Phaser.Pointer.html">Pointer</a></li>
<li class="class-depth-1"><a href="Phaser.DeviceButton.html">Device Button</a></li>
<li class="class-depth-1"><a href="Phaser.Mouse.html">Mouse</a></li>
<li class="class-depth-1"><a href="Phaser.Keyboard.html">Keyboard</a></li>
<li class="class-depth-1"><a href="Phaser.Key.html">Key</a></li>
<li class="class-depth-1"><a href="Phaser.KeyCode.html">Key Codes</a></li>
<li class="class-depth-1"><a href="Phaser.Gamepad.html">Gamepad</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Community<b class="caret"></b></a>
<ul class="dropdown-menu ">
<li class="class-depth-1"><a href="http://phaser.io">Phaser Web Site</a></li>
<li class="class-depth-1"><a href="https://github.com/photonstorm/phaser">Phaser Github</a></li>
<li class="class-depth-1"><a href="http://phaser.io/examples">Phaser Examples</a></li>
<li class="class-depth-1"><a href="https://github.com/photonstorm/phaser-plugins">Phaser Plugins</a></li>
<li class="class-depth-1"><a href="http://www.html5gamedevs.com/forum/14-phaser/">Forum</a></li>
<li class="class-depth-1"><a href="http://stackoverflow.com/questions/tagged/phaser-framework">Stack Overflow</a></li>
<li class="class-depth-1"><a href="http://phaser.io/learn">Tutorials</a></li>
<li class="class-depth-1"><a href="http://phaser.io/community/newsletter">Newsletter</a></li>
<li class="class-depth-1"><a href="http://phaser.io/community/twitter">Twitter</a></li>
<li class="class-depth-1"><a href="http://phaser.io/community/slack">Slack</a></li>
<li class="class-depth-1"><a href="http://phaser.io/community/donate">Donate</a></li>
<li class="class-depth-1"><a href="https://www.codeandweb.com/texturepacker/phaser">Texture Packer</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>
</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 class="optional">skipPool</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations.<br>A single BitmapData can be used as the texture for one or many Images / Sprites.<br>So if you need to dynamically create a Sprite texture then they are a good choice.</p>
<p>Important note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't<br>live on the display list, they are NOT automatically cleared when you change State. Therefore you <em>must</em> call BitmapData.destroy<br>in your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.</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 BitmapData.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
256
</td>
<td class="description last"><p>The width of the BitmapData in pixels. If undefined or zero it's set to a default value.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
256
</td>
<td class="description last"><p>The height of the BitmapData in pixels. If undefined or zero it's set to a default value.</p></td>
</tr>
<tr>
<td class="name"><code>skipPool</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>When this BitmapData generates its internal canvas to use for rendering, it will get the canvas from the CanvasPool if false, or create its own if true.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-24">line 24</a>
</dt>
</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"> :<a href="PIXI.BaseTexture.html">PIXI.BaseTexture</a></span></h4>
</dt>
<dd>
<div class="description">
<p>The PIXI.BaseTexture.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-124">line 124</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="canvas"><span class="type-signature"></span>canvas<span class="type-signature"> :HTMLCanvasElement</span></h4>
</dt>
<dd>
<div class="description">
<p>The canvas to which this BitmapData draws.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-54">line 54</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="context"><span class="type-signature"></span>context<span class="type-signature"> :CanvasRenderingContext2D</span></h4>
</dt>
<dd>
<div class="description">
<p>The 2d context of the canvas.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-60">line 60</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="ctx"><span class="type-signature"></span>ctx<span class="type-signature"> :CanvasRenderingContext2D</span></h4>
</dt>
<dd>
<div class="description">
<p>A reference to BitmapData.context.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-65">line 65</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="data"><span class="type-signature"></span>data<span class="type-signature"> :Uint8ClampedArray</span></h4>
</dt>
<dd>
<div class="description">
<p>A Uint8ClampedArray view into BitmapData.buffer.<br>Note that this is unavailable in some browsers (such as Epic Browser due to its security restrictions)</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-84">line 84</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="dirty"><span class="type-signature"></span>dirty<span class="type-signature"> :boolean</span></h4>
</dt>
<dd>
<div class="description">
<p>If dirty this BitmapData will be re-rendered.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-159">line 159</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="disableTextureUpload"><span class="type-signature"></span>disableTextureUpload<span class="type-signature"> :boolean</span></h4>
</dt>
<dd>
<div class="description">
<p>If disableTextureUpload is true this BitmapData will never send its image data to the GPU when its dirty flag is true.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-154">line 154</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="frameData"><span class="type-signature"></span>frameData<span class="type-signature"> :<a href="Phaser.FrameData.html">Phaser.FrameData</a></span></h4>
</dt>
<dd>
<div class="description">
<p>The FrameData container this BitmapData uses for rendering.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-135">line 135</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="game"><span class="type-signature"></span>game<span class="type-signature"> :<a href="Phaser.Game.html">Phaser.Game</a></span></h4>
</dt>
<dd>
<div class="description">
<p>A reference to the currently running game.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-33">line 33</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="height"><span class="type-signature"></span>height<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<div class="description">
<p>The height of the BitmapData in pixels.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-48">line 48</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="imageData"><span class="type-signature"></span>imageData<span class="type-signature"> :ImageData</span></h4>
</dt>
<dd>
<div class="description">
<p>The context image data.<br>Please note that a call to BitmapData.draw() or BitmapData.copy() does not update immediately this property for performance reason. Use BitmapData.update() to do so.<br>This property is updated automatically after the first game loop, according to the dirty flag property.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-77">line 77</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="key"><span class="type-signature"></span>key<span class="type-signature"> :string</span></h4>
</dt>
<dd>
<div class="description">
<p>The key of the BitmapData in the Cache, if stored there.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-38">line 38</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="pixels"><span class="type-signature"></span>pixels<span class="type-signature"> :Uint32Array</span></h4>
</dt>
<dd>
<div class="description">
<p>An Uint32Array view into BitmapData.buffer.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-94">line 94</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="smoothProperty"><span class="type-signature"></span>smoothProperty<span class="type-signature"> :string</span></h4>
</dt>
<dd>
<div class="description">
<p>The context property needed for smoothing this Canvas.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-70">line 70</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="texture"><span class="type-signature"></span>texture<span class="type-signature"> :<a href="PIXI.Texture.html">PIXI.Texture</a></span></h4>
</dt>
<dd>
<div class="description">
<p>The PIXI.Texture.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-130">line 130</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="textureFrame"><span class="type-signature"></span>textureFrame<span class="type-signature"> :<a href="Phaser.Frame.html">Phaser.Frame</a></span></h4>
</dt>
<dd>
<div class="description">
<p>The Frame this BitmapData uses for rendering.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-141">line 141</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="type"><span class="type-signature"></span>type<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<div class="description">
<p>The const type of this object.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-149">line 149</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="width"><span class="type-signature"></span>width<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<div class="description">
<p>The width of the BitmapData in pixels.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-43">line 43</a>
</dt>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name "
id=".getTransform"><span class="type-signature">&lt;static> </span>getTransform<span class="signature">(translateX, translateY, scaleX, scaleY, skewX, skewY)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Gets a JavaScript object that has 6 properties set that are used by BitmapData in a transform.</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>translateX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The x translate value.</p></td>
</tr>
<tr>
<td class="name"><code>translateY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The y translate value.</p></td>
</tr>
<tr>
<td class="name"><code>scaleX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The scale x value.</p></td>
</tr>
<tr>
<td class="name"><code>scaleY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The scale y value.</p></td>
</tr>
<tr>
<td class="name"><code>skewX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The skew x value.</p></td>
</tr>
<tr>
<td class="name"><code>skewY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The skew y value.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">object</span>
-
</div>
<div class="returns-desc param-desc">
<p>A JavaScript object containing all of the properties BitmapData needs for transforms.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2419">line 2419</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="add"><span class="type-signature"></span>add<span class="signature">(object)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Updates the given objects so that they use this BitmapData as their texture.<br>This will replace any texture they will currently have set.</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>object</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type">Array.&lt;<a href="Phaser.Sprite.html">Phaser.Sprite</a>></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type">Array.&lt;<a href="Phaser.Image.html">Phaser.Image</a>></span>
</td>
<td class="description last"><p>Either a single Sprite/Image or an Array of Sprites/Images.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-393">line 393</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="addToWorld"><span class="type-signature"></span>addToWorld<span class="signature">(<span class="optional">x</span>, <span class="optional">y</span>, <span class="optional">anchorX</span>, <span class="optional">anchorY</span>, <span class="optional">scaleX</span>, <span class="optional">scaleY</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Image.html">Phaser.Image</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.</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">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The x coordinate to place the Image at.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The y coordinate to place the Image at.</p></td>
</tr>
<tr>
<td class="name"><code>anchorX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
</tr>
<tr>
<td class="name"><code>anchorY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
</tr>
<tr>
<td class="name"><code>scaleX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
</tr>
<tr>
<td class="name"><code>scaleY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>The newly added Image object.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1179">line 1179</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="alphaMask"><span class="type-signature"></span>alphaMask<span class="signature">(source, <span class="optional">mask</span>, <span class="optional">sourceRect</span>, <span class="optional">maskRect</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Draws the image onto this BitmapData using an image as an alpha mask.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>source</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
<span class="param-type">Image</span>
|
<span class="param-type">HTMLCanvasElement</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself.</p></td>
</tr>
<tr>
<td class="name"><code>mask</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
<span class="param-type">Image</span>
|
<span class="param-type">HTMLCanvasElement</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>The object to be used as the mask. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. If you don't provide a mask it will use this BitmapData as the mask.</p></td>
</tr>
<tr>
<td class="name"><code>sourceRect</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>A Rectangle where x/y define the coordinates to draw the Source image to and width/height define the size.</p></td>
</tr>
<tr>
<td class="name"><code>maskRect</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>A Rectangle where x/y define the coordinates to draw the Mask image to and width/height define the size.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1738">line 1738</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendAdd"><span class="type-signature"></span>blendAdd<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'lighter'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2169">line 2169</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendColor"><span class="type-signature"></span>blendColor<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'color'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2351">line 2351</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendColorBurn"><span class="type-signature"></span>blendColorBurn<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'color-burn'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2260">line 2260</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendColorDodge"><span class="type-signature"></span>blendColorDodge<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'color-dodge'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2247">line 2247</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendDarken"><span class="type-signature"></span>blendDarken<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'darken'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2221">line 2221</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendDestinationAtop"><span class="type-signature"></span>blendDestinationAtop<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'destination-atop'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2143">line 2143</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendDestinationIn"><span class="type-signature"></span>blendDestinationIn<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'destination-in'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2117">line 2117</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendDestinationOut"><span class="type-signature"></span>blendDestinationOut<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'destination-out'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2130">line 2130</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendDestinationOver"><span class="type-signature"></span>blendDestinationOver<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'destination-over'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2104">line 2104</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendDifference"><span class="type-signature"></span>blendDifference<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'difference'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2299">line 2299</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendExclusion"><span class="type-signature"></span>blendExclusion<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'exclusion'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2312">line 2312</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendHardLight"><span class="type-signature"></span>blendHardLight<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'hard-light'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2273">line 2273</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendHue"><span class="type-signature"></span>blendHue<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'hue'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2325">line 2325</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendLighten"><span class="type-signature"></span>blendLighten<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'lighten'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2234">line 2234</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendLuminosity"><span class="type-signature"></span>blendLuminosity<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'luminosity'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2364">line 2364</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendMultiply"><span class="type-signature"></span>blendMultiply<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'multiply'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2182">line 2182</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendOverlay"><span class="type-signature"></span>blendOverlay<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'overlay'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2208">line 2208</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendReset"><span class="type-signature"></span>blendReset<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Resets the blend mode (effectively sets it to 'source-over')</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2039">line 2039</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendSaturation"><span class="type-signature"></span>blendSaturation<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'saturation'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2338">line 2338</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendScreen"><span class="type-signature"></span>blendScreen<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'screen'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2195">line 2195</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendSoftLight"><span class="type-signature"></span>blendSoftLight<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'soft-light'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2286">line 2286</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendSourceAtop"><span class="type-signature"></span>blendSourceAtop<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'source-atop'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2091">line 2091</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendSourceIn"><span class="type-signature"></span>blendSourceIn<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'source-in'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2065">line 2065</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendSourceOut"><span class="type-signature"></span>blendSourceOut<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'source-out'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2078">line 2078</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendSourceOver"><span class="type-signature"></span>blendSourceOver<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'source-over'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2052">line 2052</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="blendXor"><span class="type-signature"></span>blendXor<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the blend mode to 'xor'</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2156">line 2156</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="circle"><span class="type-signature"></span>circle<span class="signature">(x, y, radius, <span class="optional">fillStyle</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</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="description last"><p>The x coordinate to draw the Circle at. This is the center of the circle.</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="description last"><p>The y coordinate to draw the Circle at. This is the center of the circle.</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="description last"><p>The radius of the Circle in pixels. The radius is half the diameter.</p></td>
</tr>
<tr>
<td class="name"><code>fillStyle</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>If set the context fillStyle will be set to this value before the circle is drawn.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1891">line 1891</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="clear"><span class="type-signature"></span>clear<span class="signature">(<span class="optional">x</span>, <span class="optional">y</span>, <span class="optional">width</span>, <span class="optional">height</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Clears the BitmapData context using a clearRect.</p>
<p>You can optionally define the area to clear.<br>If the arguments are left empty it will clear the entire canvas.</p>
<p>You may need to call BitmapData.update after this in order to clear out the pixel data,<br>but Phaser will not do this automatically for you.</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">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The x coordinate of the top-left of the area to clear.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The y coordinate of the top-left of the area to clear.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The width of the area to clear. If undefined it will use BitmapData.width.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The height of the area to clear. If undefined it will use BitmapData.height.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-463">line 463</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="cls"><span class="type-signature"></span>cls<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Clears the BitmapData context using a clearRect.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-457">line 457</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="copy"><span class="type-signature"></span>copy<span class="signature">(<span class="optional">source</span>, <span class="optional">x</span>, <span class="optional">y</span>, <span class="optional">width</span>, <span class="optional">height</span>, <span class="optional">tx</span>, <span class="optional">ty</span>, <span class="optional">newWidth</span>, <span class="optional">newHeight</span>, <span class="optional">rotate</span>, <span class="optional">anchorX</span>, <span class="optional">anchorY</span>, <span class="optional">scaleX</span>, <span class="optional">scaleY</span>, <span class="optional">alpha</span>, <span class="optional">blendMode</span>, <span class="optional">roundPx</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Copies a rectangular area from the source object to this BitmapData. If you give <code>null</code> as the source it will copy from itself.</p>
<p>You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.</p>
<p>All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.</p>
<p>Note that the source image can also be this BitmapData, which can create some interesting effects.</p>
<p>This method has a lot of parameters for maximum control.<br>You can use the more friendly methods like <code>copyRect</code> and <code>draw</code> to avoid having to remember them all.</p>
<p>You may prefer to use <code>copyTransform</code> if you're simply trying to draw a Sprite to this BitmapData,<br>and don't wish to translate, scale or rotate it from its original values.</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>source</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>
|
<span class="param-type">Image</span>
|
<span class="param-type">HTMLCanvasElement</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself.</p></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The x coordinate representing the top-left of the region to copy from the source image.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The y coordinate representing the top-left of the region to copy from the source image.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The width of the region to copy from the source image. If not specified it will use the full source image width.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The height of the region to copy from the source image. If not specified it will use the full source image height.</p></td>
</tr>
<tr>
<td class="name"><code>tx</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The x coordinate to translate to before drawing. If not specified it will default to the <code>x</code> parameter. If <code>null</code> and <code>source</code> is a Display Object, it will default to <code>source.x</code>.</p></td>
</tr>
<tr>
<td class="name"><code>ty</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The y coordinate to translate to before drawing. If not specified it will default to the <code>y</code> parameter. If <code>null</code> and <code>source</code> is a Display Object, it will default to <code>source.y</code>.</p></td>
</tr>
<tr>
<td class="name"><code>newWidth</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The new width of the block being copied. If not specified it will default to the <code>width</code> parameter.</p></td>
</tr>
<tr>
<td class="name"><code>newHeight</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The new height of the block being copied. If not specified it will default to the <code>height</code> parameter.</p></td>
</tr>
<tr>
<td class="name"><code>rotate</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The angle in radians to rotate the block to before drawing. Rotation takes place around the center by default, but can be changed with the <code>anchor</code> parameters.</p></td>
</tr>
<tr>
<td class="name"><code>anchorX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
</tr>
<tr>
<td class="name"><code>anchorY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.</p></td>
</tr>
<tr>
<td class="name"><code>scaleX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The horizontal scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
</tr>
<tr>
<td class="name"><code>scaleY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The vertical scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on.</p></td>
</tr>
<tr>
<td class="name"><code>alpha</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque.</p></td>
</tr>
<tr>
<td class="name"><code>blendMode</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
</tr>
<tr>
<td class="name"><code>roundPx</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1205">line 1205</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="copyRect"><span class="type-signature"></span>copyRect<span class="signature">(source, area, x, y, <span class="optional">alpha</span>, <span class="optional">blendMode</span>, <span class="optional">roundPx</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.</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>source</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>
|
<span class="param-type">Image</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The Image to copy from. If you give a string it will try and find the Image in the Game.Cache.</p></td>
</tr>
<tr>
<td class="name"><code>area</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The Rectangle region to copy from the source image.</p></td>
</tr>
<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 destination x coordinate to copy the image to.</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 destination y coordinate to copy the image to.</p></td>
</tr>
<tr>
<td class="name"><code>alpha</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque.</p></td>
</tr>
<tr>
<td class="name"><code>blendMode</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
</tr>
<tr>
<td class="name"><code>roundPx</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1534">line 1534</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="copyTransform"><span class="type-signature"></span>copyTransform<span class="signature">(<span class="optional">source</span>, <span class="optional">blendMode</span>, <span class="optional">roundPx</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Draws the given <code>source</code> Game Object to this BitmapData, using its <code>worldTransform</code> property to set the<br>position, scale and rotation of where it is drawn. This function is used internally by <code>drawGroup</code>.<br>It takes the objects tint and scale mode into consideration before drawing.</p>
<p>You can optionally specify Blend Mode and Round Pixels arguments.</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>source</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
<span class="param-type"><a href="Phaser.BitmapText.html">Phaser.BitmapText</a></span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The Game Object to draw.</p></td>
</tr>
<tr>
<td class="name"><code>blendMode</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
</tr>
<tr>
<td class="name"><code>roundPx</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1426">line 1426</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Destroys this BitmapData and puts the canvas it was using back into the canvas pool for re-use.</p>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2024">line 2024</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="draw"><span class="type-signature"></span>draw<span class="signature">(source, <span class="optional">x</span>, <span class="optional">y</span>, <span class="optional">width</span>, <span class="optional">height</span>, <span class="optional">blendMode</span>, <span class="optional">roundPx</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified.<br>You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.</p>
<p>The children will be drawn at their <code>x</code> and <code>y</code> world space coordinates. If this is outside the bounds of the BitmapData they won't be visible.<br>When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.</p>
<p>Note: You should ensure that at least 1 full update has taken place before calling this,<br>otherwise the objects are likely to render incorrectly, if at all.<br>You can trigger an update yourself by calling <code>stage.updateTransform()</code> before calling <code>draw</code>.</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>source</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
<span class="param-type"><a href="Phaser.RenderTexture.html">Phaser.RenderTexture</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The Sprite, Image or Text object to draw onto this BitmapData.</p></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The x coordinate to translate to before drawing. If not specified it will default to <code>source.x</code>.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The y coordinate to translate to before drawing. If not specified it will default to <code>source.y</code>.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The new width of the Sprite being copied. If not specified it will default to <code>source.width</code>.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The new height of the Sprite being copied. If not specified it will default to <code>source.height</code>.</p></td>
</tr>
<tr>
<td class="name"><code>blendMode</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
</tr>
<tr>
<td class="name"><code>roundPx</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1553">line 1553</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="drawFull"><span class="type-signature"></span>drawFull<span class="signature">(parent, <span class="optional">blendMode</span>, <span class="optional">roundPx</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Draws the Game Object or Group to this BitmapData and then recursively iterates through all of its children.</p>
<p>If a child has an <code>exists</code> property then it (and its children) will be only be drawn if exists is <code>true</code>.</p>
<p>The children will be drawn at their <code>x</code> and <code>y</code> world space coordinates. If this is outside the bounds of the BitmapData<br>they won't be drawn. Depending on your requirements you may need to resize the BitmapData in advance to match the<br>bounds of the top-level Game Object.</p>
<p>When drawing it will take into account the child's world rotation, scale and alpha values.</p>
<p>It's perfectly valid to pass in <code>game.world</code> as the parent object, and it will iterate through the entire display list.</p>
<p>Note: If you are trying to grab your entire game at the start of a State then you should ensure that at least 1 full update<br>has taken place before doing so, otherwise all of the objects will render with incorrect positions and scales. You can<br>trigger an update yourself by calling <code>stage.updateTransform()</code> before calling <code>drawFull</code>.</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>parent</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.World.html">Phaser.World</a></span>
|
<span class="param-type"><a href="Phaser.Group.html">Phaser.Group</a></span>
|
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
<span class="param-type"><a href="Phaser.BitmapText.html">Phaser.BitmapText</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The Game Object to draw onto this BitmapData and then recursively draw all of its children.</p></td>
</tr>
<tr>
<td class="name"><code>blendMode</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
</tr>
<tr>
<td class="name"><code>roundPx</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1648">line 1648</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="drawGroup"><span class="type-signature"></span>drawGroup<span class="signature">(group, <span class="optional">blendMode</span>, <span class="optional">roundPx</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Draws the immediate children of a Phaser.Group to this BitmapData.</p>
<p>It's perfectly valid to pass in <code>game.world</code> as the Group, and it will iterate through the entire display list.</p>
<p>Children are drawn <em>only</em> if they have their <code>exists</code> property set to <code>true</code>, and have image, or RenderTexture, based Textures.</p>
<p>The children will be drawn at their <code>x</code> and <code>y</code> world space coordinates. If this is outside the bounds of the BitmapData they won't be visible.<br>When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.</p>
<p>Note: You should ensure that at least 1 full update has taken place before calling this,<br>otherwise the objects are likely to render incorrectly, if at all.<br>You can trigger an update yourself by calling <code>stage.updateTransform()</code> before calling <code>drawGroup</code>.</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>group</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Group.html">Phaser.Group</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The Group to draw onto this BitmapData. Can also be Phaser.World.</p></td>
</tr>
<tr>
<td class="name"><code>blendMode</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'.</p></td>
</tr>
<tr>
<td class="name"><code>roundPx</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1581">line 1581</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="extract"><span class="type-signature"></span>extract<span class="signature">(destination, r, g, b, <span class="optional">a</span>, <span class="optional">resize</span>, <span class="optional">r2</span>, <span class="optional">g2</span>, <span class="optional">b2</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData.<br>The original BitmapData remains unchanged.<br>The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true.<br>Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid:<br><code>picture.extract(mask, r, g, b)</code><br>You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color.<br>If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint<br>the color during extraction.</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>destination</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The BitmapData that the extracted pixels will be drawn to.</p></td>
</tr>
<tr>
<td class="name"><code>r</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 red color component, in the range 0 - 255.</p></td>
</tr>
<tr>
<td class="name"><code>g</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 green color component, in the range 0 - 255.</p></td>
</tr>
<tr>
<td class="name"><code>b</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 blue color component, in the range 0 - 255.</p></td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
255
</td>
<td class="description last"><p>The alpha color component, in the range 0 - 255 that the new pixel will be drawn at.</p></td>
</tr>
<tr>
<td class="name"><code>resize</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Should the destination BitmapData be resized to match this one before the pixels are copied?</p></td>
</tr>
<tr>
<td class="name"><code>r2</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>An alternative red color component to be written to the destination, in the range 0 - 255.</p></td>
</tr>
<tr>
<td class="name"><code>g2</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>An alternative green color component to be written to the destination, in the range 0 - 255.</p></td>
</tr>
<tr>
<td class="name"><code>b2</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>An alternative blue color component to be written to the destination, in the range 0 - 255.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>The BitmapData that the extract pixels were drawn on.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1772">line 1772</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="fill"><span class="type-signature"></span>fill<span class="signature">(r, g, b, <span class="optional">a</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Fills the BitmapData with the given color.</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>r</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 red color value, between 0 and 0xFF (255).</p></td>
</tr>
<tr>
<td class="name"><code>g</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 green color value, between 0 and 0xFF (255).</p></td>
</tr>
<tr>
<td class="name"><code>b</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 blue color value, between 0 and 0xFF (255).</p></td>
</tr>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The alpha color value, between 0 and 1.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-494">line 494</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="generateTexture"><span class="type-signature"></span>generateTexture<span class="signature">(key)</span><span class="type-signature"> &rarr; {<a href="PIXI.Texture.html">PIXI.Texture</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Creates a new Image element by converting this BitmapDatas canvas into a dataURL.</p>
<p>The image is then stored in the image Cache using the key given.</p>
<p>Finally a PIXI.Texture is created based on the image and returned.</p>
<p>You can apply the texture to a sprite or any other supporting object by using either the<br>key or the texture. First call generateTexture:</p>
<p><code>var texture = bitmapdata.generateTexture('ball');</code></p>
<p>Then you can either apply the texture to a sprite:</p>
<p><code>game.add.sprite(0, 0, texture);</code></p>
<p>or by using the string based key:</p>
<p><code>game.add.sprite(0, 0, 'ball');</code></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>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The key which will be used to store the image in the Cache.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="PIXI.Texture.html">PIXI.Texture</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>The newly generated texture.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-516">line 516</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="getBounds"><span class="type-signature"></span>getBounds<span class="signature">(<span class="optional">rect</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Rectangle.html">Phaser.Rectangle</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Scans the BitmapData and calculates the bounds. This is a rectangle that defines the extent of all non-transparent pixels.<br>The rectangle returned will extend from the top-left of the image to the bottom-right, excluding transparent pixels.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rect</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>If provided this Rectangle object will be populated with the bounds, otherwise a new object will be created.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>A Rectangle whose dimensions encompass the full extent of non-transparent pixels in this BitmapData.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1151">line 1151</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="getFirstPixel"><span class="type-signature"></span>getFirstPixel<span class="signature">(<span class="optional">direction</span>)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Scans the BitmapData, pixel by pixel, until it encounters a pixel that isn't transparent (i.e. has an alpha value &gt; 0).<br>It then stops scanning and returns an object containing the color of the pixel in r, g and b properties and the location in the x and y properties.</p>
<p>The direction parameter controls from which direction it should start the scan:</p>
<p>0 = top to bottom<br>1 = bottom to top<br>2 = left to right<br>3 = right to left</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>direction</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The direction in which to scan for the first pixel. 0 = top to bottom, 1 = bottom to top, 2 = left to right and 3 = right to left.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">object</span>
-
</div>
<div class="returns-desc param-desc">
<p>Returns an object containing the color of the pixel in the <code>r</code>, <code>g</code> and <code>b</code> properties and the location in the <code>x</code> and <code>y</code> properties.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1068">line 1068</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="getPixel"><span class="type-signature"></span>getPixel<span class="signature">(x, y, <span class="optional">out</span>)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get the color of a specific pixel in the context into a color object.<br>If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,<br>otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</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="description last"><p>The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.</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="description last"><p>The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.</p></td>
</tr>
<tr>
<td class="name"><code>out</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">object</span>
-
</div>
<div class="returns-desc param-desc">
<p>An object with the red, green, blue and alpha values set in the r, g, b and a properties.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-985">line 985</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="getPixel32"><span class="type-signature"></span>getPixel32<span class="signature">(x, y)</span><span class="type-signature"> &rarr; {number}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get the color of a specific pixel including its alpha value.<br>If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,<br>otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.<br>Note that on little-endian systems the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA.</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. Must lay within the dimensions of this BitmapData.</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. Must lay within the dimensions of this BitmapData.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">number</span>
-
</div>
<div class="returns-desc param-desc">
<p>A native color value integer (format: 0xAARRGGBB)</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1016">line 1016</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="getPixelRGB"><span class="type-signature"></span>getPixelRGB<span class="signature">(x, y, <span class="optional">out</span>, <span class="optional">hsl</span>, <span class="optional">hsv</span>)</span><span class="type-signature"> &rarr; {object}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties.<br>If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,<br>otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.</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 coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.</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 coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.</p></td>
</tr>
<tr>
<td class="name"><code>out</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>An object into which 3 properties will be created: r, g and b. If not provided a new object will be created.</p></td>
</tr>
<tr>
<td class="name"><code>hsl</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Also convert the rgb values into hsl?</p></td>
</tr>
<tr>
<td class="name"><code>hsv</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Also convert the rgb values into hsv?</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">object</span>
-
</div>
<div class="returns-desc param-desc">
<p>An object with the red, green and blue values set in the r, g and b properties.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1036">line 1036</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="getPixels"><span class="type-signature"></span>getPixels<span class="signature">(rect)</span><span class="type-signature"> &rarr; {ImageData}</span></h4>
</dt>
<dd>
<div class="description">
<p>Gets all the pixels from the region specified by the given Rectangle object.</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"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
</td>
<td class="description last"><p>The Rectangle region to get.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type">ImageData</span>
-
</div>
<div class="returns-desc param-desc">
<p>Returns a ImageData object containing a Uint8ClampedArray data property.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1055">line 1055</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="line"><span class="type-signature"></span>line<span class="signature">(x1, y1, x2, y2, <span class="optional">color</span>, <span class="optional">width</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Draws a line between the coordinates given in the color and thickness specified.</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>x1</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 coordinate to start the line from.</p></td>
</tr>
<tr>
<td class="name"><code>y1</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 coordinate to start the line from.</p></td>
</tr>
<tr>
<td class="name"><code>x2</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 coordinate to draw the line to.</p></td>
</tr>
<tr>
<td class="name"><code>y2</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 coordinate to draw the line to.</p></td>
</tr>
<tr>
<td class="name"><code>color</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
'#fff'
</td>
<td class="description last"><p>The stroke color that the line will be drawn in.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The line thickness.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1920">line 1920</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="load"><span class="type-signature"></span>load<span class="signature">(source)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Takes the given Game Object, resizes this BitmapData to match it and then draws it into this BitmapDatas canvas, ready for further processing.<br>The source game object is not modified by this operation.<br>If the source object uses a texture as part of a Texture Atlas or Sprite Sheet, only the current frame will be used for sizing.<br>If a string is given it will assume it's a cache key and look in Phaser.Cache for an image key matching the string.</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>source</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
<span class="param-type">Image</span>
|
<span class="param-type">HTMLCanvasElement</span>
|
<span class="param-type">string</span>
</td>
<td class="description last"><p>The object that will be used to populate this BitmapData. If you give a string it will try and find the Image in the Game.Cache first.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-422">line 422</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="move"><span class="type-signature"></span>move<span class="signature">(x, y, <span class="optional">wrap</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Shifts the contents of this BitmapData by the distances given.</p>
<p>The image will wrap-around the edges on all sides if the wrap argument is true (the default).</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">integer</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The amount of pixels to horizontally shift the canvas by. Use a negative value to shift to the left, positive to the right.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The amount of pixels to vertically shift the canvas by. Use a negative value to shift up, positive to shift down.</p></td>
</tr>
<tr>
<td class="name"><code>wrap</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Wrap the content of the BitmapData.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-240">line 240</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="moveH"><span class="type-signature"></span>moveH<span class="signature">(distance, <span class="optional">wrap</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Shifts the contents of this BitmapData horizontally.</p>
<p>The image will wrap-around the sides if the wrap argument is true (the default).</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>distance</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The amount of pixels to horizontally shift the canvas by. Use a negative value to shift to the left, positive to the right.</p></td>
</tr>
<tr>
<td class="name"><code>wrap</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Wrap the content of the BitmapData.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-267">line 267</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="moveV"><span class="type-signature"></span>moveV<span class="signature">(distance, <span class="optional">wrap</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Shifts the contents of this BitmapData vertically.</p>
<p>The image will wrap-around the sides if the wrap argument is true (the default).</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>distance</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The amount of pixels to vertically shift the canvas by. Use a negative value to shift up, positive to shift down.</p></td>
</tr>
<tr>
<td class="name"><code>wrap</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Wrap the content of the BitmapData.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-330">line 330</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="processPixel"><span class="type-signature"></span>processPixel<span class="signature">(callback, callbackContext, <span class="optional">x</span>, <span class="optional">y</span>, <span class="optional">width</span>, <span class="optional">height</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates.<br>Whatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped.<br>Note that the format of the color received will be different depending on if the system is big or little endian.<br>It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead.<br>The callback will also be sent the pixels x and y coordinates respectively.</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>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The callback that will be sent each pixel color to be processed.</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The context under which the callback will be called.</p></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The x coordinate of the top-left of the region to process from.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The y coordinate of the top-left of the region to process from.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The width of the region to process.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The height of the region to process.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-700">line 700</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="processPixelRGB"><span class="type-signature"></span>processPixelRGB<span class="signature">(callback, callbackContext, <span class="optional">x</span>, <span class="optional">y</span>, <span class="optional">width</span>, <span class="optional">height</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback.<br>The callback will be sent a color object with 6 properties: <code>{ r: number, g: number, b: number, a: number, color: number, rgba: string }</code>.<br>Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha.<br>The <code>color</code> property is an Int32 of the full color. Note the endianess of this will change per system.<br>The <code>rgba</code> property is a CSS style rgba() string which can be used with context.fillStyle calls, among others.<br>The callback will also be sent the pixels x and y coordinates respectively.<br>The callback must return either <code>false</code>, in which case no change will be made to the pixel, or a new color object.<br>If a new color object is returned the pixel will be set to the r, g, b and a color values given within it.</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>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The callback that will be sent each pixel color object to be processed.</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The context under which the callback will be called.</p></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The x coordinate of the top-left of the region to process from.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The y coordinate of the top-left of the region to process from.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The width of the region to process.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The height of the region to process.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-642">line 642</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="rect"><span class="type-signature"></span>rect<span class="signature">(x, y, width, height, <span class="optional">fillStyle</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</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="description last"><p>The x coordinate of the top-left 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="attributes">
</td>
<td class="description last"><p>The y coordinate of the top-left 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="attributes">
</td>
<td class="description last"><p>The width of the Rectangle.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The height of the Rectangle.</p></td>
</tr>
<tr>
<td class="name"><code>fillStyle</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>If set the context fillStyle will be set to this value before the rect is drawn.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1825">line 1825</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="render"><span class="type-signature"></span>render<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</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.<br>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.<br>If you wish to suppress this functionality set BitmapData.disableTextureUpload to <code>true</code>.</p>
</div>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-2004">line 2004</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="replaceRGB"><span class="type-signature"></span>replaceRGB<span class="signature">(r1, g1, b1, a1, r2, g2, b2, a2, <span class="optional">region</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Replaces all pixels matching one color with another. The color values are given as two sets of RGBA values.<br>An optional region parameter controls if the replacement happens in just a specific area of the BitmapData or the entire thing.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>r1</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The red color value to be replaced. Between 0 and 255.</p></td>
</tr>
<tr>
<td class="name"><code>g1</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The green color value to be replaced. Between 0 and 255.</p></td>
</tr>
<tr>
<td class="name"><code>b1</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The blue color value to be replaced. Between 0 and 255.</p></td>
</tr>
<tr>
<td class="name"><code>a1</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The alpha color value to be replaced. Between 0 and 255.</p></td>
</tr>
<tr>
<td class="name"><code>r2</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The red color value that is the replacement color. Between 0 and 255.</p></td>
</tr>
<tr>
<td class="name"><code>g2</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The green color value that is the replacement color. Between 0 and 255.</p></td>
</tr>
<tr>
<td class="name"><code>b2</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The blue color value that is the replacement color. Between 0 and 255.</p></td>
</tr>
<tr>
<td class="name"><code>a2</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The alpha color value that is the replacement color. Between 0 and 255.</p></td>
</tr>
<tr>
<td class="name"><code>region</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="description last"><p>The area to perform the search over. If not given it will replace over the whole BitmapData.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-754">line 754</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="resize"><span class="type-signature"></span>resize<span class="signature">(width, height)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer.</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">integer</span>
</td>
<td class="description last"><p>The new width of the BitmapData.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">integer</span>
</td>
<td class="description last"><p>The new height of the BitmapData.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-552">line 552</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="setHSL"><span class="type-signature"></span>setHSL<span class="signature">(<span class="optional">h</span>, <span class="optional">s</span>, <span class="optional">l</span>, <span class="optional">region</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.</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>h</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The hue, in the range 0 - 1.</p></td>
</tr>
<tr>
<td class="name"><code>s</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The saturation, in the range 0 - 1.</p></td>
</tr>
<tr>
<td class="name"><code>l</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The lightness, in the range 0 - 1.</p></td>
</tr>
<tr>
<td class="name"><code>region</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The area to perform the operation on. If not given it will run over the whole BitmapData.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-804">line 804</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="setPixel"><span class="type-signature"></span>setPixel<span class="signature">(x, y, red, green, blue, <span class="optional">immediate</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</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>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 coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.</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 coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.</p></td>
</tr>
<tr>
<td class="name"><code>red</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 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="attributes">
</td>
<td class="default">
</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="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The blue color value, between 0 and 0xFF (255).</p></td>
</tr>
<tr>
<td class="name"><code>immediate</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>If <code>true</code> the context.putImageData will be called and the dirty flag set.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-967">line 967</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="setPixel32"><span class="type-signature"></span>setPixel32<span class="signature">(x, y, red, green, blue, alpha, <span class="optional">immediate</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</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>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 coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.</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 coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.</p></td>
</tr>
<tr>
<td class="name"><code>red</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 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="attributes">
</td>
<td class="default">
</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="attributes">
</td>
<td class="default">
</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="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The alpha color value, between 0 and 0xFF (255).</p></td>
</tr>
<tr>
<td class="name"><code>immediate</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>If <code>true</code> the context.putImageData will be called and the dirty flag set.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-928">line 928</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="shadow"><span class="type-signature"></span>shadow<span class="signature">(color, <span class="optional">blur</span>, <span class="optional">x</span>, <span class="optional">y</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it.<br>You can cancel an existing shadow by calling this method and passing no parameters.<br>Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.</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>color</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>The color of the shadow, given in a CSS format, i.e. <code>#000000</code> or <code>rgba(0,0,0,1)</code>. If <code>null</code> or <code>undefined</code> the shadow will be reset.</p></td>
</tr>
<tr>
<td class="name"><code>blur</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
5
</td>
<td class="description last"><p>The amount the shadow will be blurred by. Low values = a crisp shadow, high values = a softer shadow.</p></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
10
</td>
<td class="description last"><p>The horizontal offset of the shadow in pixels.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
10
</td>
<td class="description last"><p>The vertical offset of the shadow in pixels.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1706">line 1706</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="shiftHSL"><span class="type-signature"></span>shiftHSL<span class="signature">(<span class="optional">h</span>, <span class="optional">s</span>, <span class="optional">l</span>, <span class="optional">region</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.<br>Shifting will add the given value onto the current h, s and l values, not replace them.<br>The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.</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>h</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The amount to shift the hue by.</p></td>
</tr>
<tr>
<td class="name"><code>s</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The amount to shift the saturation by.</p></td>
</tr>
<tr>
<td class="name"><code>l</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>The amount to shift the lightness by.</p></td>
</tr>
<tr>
<td class="name"><code>region</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The area to perform the operation on. If not given it will run over the whole BitmapData.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-865">line 865</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="text"><span class="type-signature"></span>text<span class="signature">(text, x, y, <span class="optional">font</span>, <span class="optional">color</span>, <span class="optional">shadow</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Draws text to the BitmapData in the given font and color.<br>The default font is 14px Courier, so useful for quickly drawing debug text.<br>If you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method.</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>text</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>The text to write to the BitmapData.</p></td>
</tr>
<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 coordinate of the top-left of the text string.</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 coordinate of the top-left of the text string.</p></td>
</tr>
<tr>
<td class="name"><code>font</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
'14px Courier'
</td>
<td class="description last"><p>The font. This is passed directly to Context.font, so anything that can support, this can.</p></td>
</tr>
<tr>
<td class="name"><code>color</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
'rgb(255,255,255)'
</td>
<td class="description last"><p>The color the text will be drawn in.</p></td>
</tr>
<tr>
<td class="name"><code>shadow</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Draw a single pixel black shadow below the text (offset by text.x/y + 1)</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1849">line 1849</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="textureLine"><span class="type-signature"></span>textureLine<span class="signature">(line, image, <span class="optional">repeat</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Takes the given Line object and image and renders it to this BitmapData as a repeating texture line.</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>line</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Line.html">Phaser.Line</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>A Phaser.Line object that will be used to plot the start and end of the line.</p></td>
</tr>
<tr>
<td class="name"><code>image</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">Image</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The key of an image in the Phaser.Cache to use as the texture for this line, or an actual Image.</p></td>
</tr>
<tr>
<td class="name"><code>repeat</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
'repeat-x'
</td>
<td class="description last"><p>The pattern repeat mode to use when drawing the line. Either <code>repeat</code>, <code>repeat-x</code> or <code>no-repeat</code>.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-1954">line 1954</a>
</dt>
</dl>
</dd>
<dt>
<h4 class="name "
id="update"><span class="type-signature"></span>update<span class="signature">(<span class="optional">x</span>, <span class="optional">y</span>, <span class="optional">width</span>, <span class="optional">height</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>This re-creates the BitmapData.imageData from the current context.<br>It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array.<br>If not given the dimensions defaults to the full size of the context.</p>
<p>Warning: This is a very expensive operation, so use it sparingly.</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">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The x coordinate of the top-left of the image data area to grab from.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>The y coordinate of the top-left of the image data area to grab from.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The width of the image data area.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
1
</td>
<td class="description last"><p>The height of the image data area.</p></td>
</tr>
</tbody>
</table>
<h5>Returns:</h5>
<div class="returns">
<div class="returns-type">
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
-
</div>
<div class="returns-desc param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
</div>
<dl class="details">
<dt class="tag-source">Source -
<a href="src_gameobjects_BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="src_gameobjects_BitmapData.js.html#sunlight-1-line-596">line 596</a>
</dt>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
Phaser Copyright © 2012-2016 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a>
on Mon Dec 05 2016 10:04:32 GMT+0000 (GMT Standard Time) 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( {
anchorName : function(i, heading, prefix) {
return $(heading).attr("id") || ( prefix + i );
},
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>