phaser/docs/Phaser.BitmapData.html

12850 lines
193 KiB
HTML
Raw Normal View History

2013-11-28 15:57:09 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Class: BitmapData</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<a class="brand" href="index.html">Phaser</a>
<ul class="nav">
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
class="caret"></b></a>
<ul class="dropdown-menu ">
2014-04-10 22:13:43 +00:00
<li class="class-depth-0">
2013-11-28 15:57:09 +00:00
<a href="Phaser.html">Phaser</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Animation.html">Animation</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
2014-04-29 14:39:02 +00:00
<li class="class-depth-1">
<a href="Phaser.ArrayList.html">ArrayList</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Button.html">Button</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Cache.html">Cache</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Camera.html">Camera</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Canvas.html">Canvas</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Circle.html">Circle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Color.html">Color</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Device.html">Device</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.html">Easing</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Back.html">Back</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Ellipse.html">Ellipse</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Events.html">Events</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Filter.html">Filter</a>
</li>
2014-09-09 14:36:56 +00:00
<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>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Frame.html">Frame</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.FrameData.html">FrameData</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Game.html">Game</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Graphics.html">Graphics</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Group.html">Group</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Image.html">Image</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Input.html">Input</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Key.html">Key</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.Line.html">Line</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Loader.html">Loader</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Math.html">Math</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Mouse.html">Mouse</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Net.html">Net</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.Particle.html">Particle</a>
</li>
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Particles.html">Particles</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Physics.html">Physics</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Physics.Ninja.html">Ninja</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
<a href="Phaser.Physics.P2.html">P2</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Body.html">Body</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
</li>
2014-04-10 22:13:43 +00:00
<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>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Material.html">Material</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
</li>
2014-09-09 14:36:56 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.RotationalSpring.html">RotationalSpring</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-3">
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Plugin.html">Plugin</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Point.html">Point</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Pointer.html">Pointer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Polygon.html">Polygon</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.RetroFont.html">RetroFont</a>
</li>
2014-09-09 14:36:56 +00:00
<li class="class-depth-1">
<a href="Phaser.Rope.html">Rope</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.ScaleManager.html">ScaleManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Signal.html">Signal</a>
</li>
<li class="class-depth-1">
<a href="Phaser.SignalBinding.html">SignalBinding</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Sound.html">Sound</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Sprite.html">Sprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Stage.html">Stage</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.State.html">State</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.StateManager.html">StateManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Text.html">Text</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tile.html">Tile</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tileset.html">Tileset</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Time.html">Time</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Timer.html">Timer</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2014-02-05 06:29:17 +00:00
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Touch.html">Touch</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Tween.html">Tween</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Utils.html">Utils</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-2">
2013-11-28 15:57:09 +00:00
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
2014-04-10 22:13:43 +00:00
<li class="class-depth-1">
2013-11-28 15:57:09 +00:00
<a href="Phaser.World.html">World</a>
</li>
</ul>
</li>
2014-09-09 14:36:56 +00:00
2013-11-28 15:57:09 +00:00
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<div id="main">
<h1 class="page-title">Class: BitmapData</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
BitmapData
</h2>
<div class="class-description"><p>A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations.
2014-09-09 14:36:56 +00:00
A single BitmapData can be used as the texture for one or many Images/Sprites. So if you need to dynamically create a Sprite texture then they are a good choice.</p></div>
2013-11-28 15:57:09 +00:00
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="BitmapData"><span class="type-signature"></span>new BitmapData<span class="signature">(game, key, <span class="optional">width</span>, <span class="optional">height</span>)</span><span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
<p>Creates a new BitmapData object.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>game</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>A reference to the currently running game.</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Internal Phaser reference key for the render texture.</p></td>
</tr>
2013-11-28 15:57:09 +00:00
<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">
2014-09-09 14:36:56 +00:00
256
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>The width of the BitmapData in pixels.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
2014-09-09 14:36:56 +00:00
256
2013-11-28 15:57:09 +00:00
</td>
<td class="description last"><p>The height of the BitmapData in pixels.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-21">line 21</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="baseTexture"><span class="type-signature"></span>baseTexture<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>baseTexture</code></td>
<td class="type">
<span class="param-type">PIXI.BaseTexture</span>
</td>
<td class="description last"><p>The PIXI.BaseTexture.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-05-20 09:12:48 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-103">line 103</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="buffer"><span class="type-signature"></span>buffer<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>buffer</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">ArrayBuffer</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>An ArrayBuffer the same size as the context ImageData.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-05-20 09:12:48 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-83">line 83</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="canvas"><span class="type-signature"></span>canvas<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>canvas</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">HTMLCanvasElement</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The canvas to which this BitmapData draws.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-50">line 50</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="context"><span class="type-signature"></span>context<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>context</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">CanvasRenderingContext2D</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The 2d context of the canvas.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-56">line 56</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
2014-03-24 12:41:45 +00:00
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="ctx"><span class="type-signature"></span>ctx<span class="type-signature"></span></h4>
2014-03-24 12:41:45 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>ctx</code></td>
2014-03-24 12:41:45 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">CanvasRenderingContext2D</span>
2014-03-24 12:41:45 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>A reference to BitmapData.context.</p></td>
2014-03-24 12:41:45 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-61">line 61</a>
2014-03-24 12:41:45 +00:00
</li></ul></dd>
2013-11-28 15:57:09 +00:00
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="data"><span class="type-signature"></span>data<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>data</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">Uint8ClampedArray</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>A Uint8ClampedArray view into BitmapData.buffer.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-05-20 09:12:48 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-71">line 71</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="dirty"><span class="type-signature"></span>dirty<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>dirty</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">boolean</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>If dirty this BitmapData will be re-rendered.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-10 19:31:11 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-133">line 133</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="disableTextureUpload"><span class="type-signature"></span>disableTextureUpload<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>disableTextureUpload</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">boolean</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>If disableTextureUpload is true this BitmapData will never send its image data to the GPU when its dirty flag is true.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-10 19:31:11 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-128">line 128</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="game"><span class="type-signature"></span>game<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>game</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>A reference to the currently running game.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-29">line 29</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="height"><span class="type-signature"></span>height<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>height</code></td>
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">number</span>
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The height of the BitmapData in pixels.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-44">line 44</a>
</li></ul></dd>
2013-11-28 15:57:09 +00:00
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="imageData"><span class="type-signature"></span>imageData<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>imageData</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">ImageData</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The context image data.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-66">line 66</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="key"><span class="type-signature"></span>key<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>key</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">string</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The key of the BitmapData in the Cache, if stored there.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-04-29 14:39:02 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-34">line 34</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="pixels"><span class="type-signature"></span>pixels<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>pixels</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">Uint32Array</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>An Uint32Array view into BitmapData.buffer.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-05-20 09:12:48 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-76">line 76</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
2013-11-28 15:57:09 +00:00
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="texture"><span class="type-signature"></span>texture<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>texture</code></td>
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">PIXI.Texture</span>
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The PIXI.Texture.</p></td>
</tr>
</tbody>
</table>
</dl>
2013-11-28 15:57:09 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-05-20 09:12:48 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-109">line 109</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="textureFrame"><span class="type-signature"></span>textureFrame<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
2014-04-29 14:39:02 +00:00
<dl class="details">
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
2013-11-28 15:57:09 +00:00
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>textureFrame</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type"><a href="Phaser.Frame.html">Phaser.Frame</a></span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The Frame this BitmapData uses for rendering.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
2014-04-29 14:39:02 +00:00
</dl>
2013-11-28 15:57:09 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-05-20 09:12:48 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-115">line 115</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"></span></h4>
</dt>
<dd>
2014-04-29 14:39:02 +00:00
<dl class="details">
2014-04-29 14:39:02 +00:00
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>type</code></td>
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type">number</span>
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The const type of this object.</p></td>
</tr>
</tbody>
</table>
2014-04-29 14:39:02 +00:00
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-07-10 19:31:11 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-123">line 123</a>
</li></ul></dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-04-29 14:39:02 +00:00
<h4 class="name" id="width"><span class="type-signature"></span>width<span class="type-signature"></span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<dl class="details">
2014-04-29 14:39:02 +00:00
<h5 class="subsection-title">Properties:</h5>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<dl>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<th>Type</th>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The width of the BitmapData in pixels.</p></td>
</tr>
</tbody>
</table>
</dl>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-39">line 39</a>
</li></ul></dd>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
</dl>
2013-11-28 15:57:09 +00:00
</dd>
2014-04-29 14:39:02 +00:00
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
2014-09-09 14:36:56 +00:00
<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">
2014-09-09 14:36:56 +00:00
<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>
2014-09-09 14:36:56 +00:00
<td class="name"><code>translateX</code></td>
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">number</span>
2014-09-09 14:36:56 +00:00
</td>
2014-09-09 14:36:56 +00:00
<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>
2014-09-09 14:36:56 +00:00
<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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1566">line 1566</a>
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>A JavaScript object containing all of the properties BitmapData needs for transforms.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-07-10 19:31:11 +00:00
</dt>
<dd>
<div class="description">
2014-09-09 14:36:56 +00:00
<p>Updates the given objects so that they use this BitmapData as their texture. This will replace any texture they will currently have set.</p>
2014-07-10 19:31:11 +00:00
</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>
2014-09-09 14:36:56 +00:00
<td class="name"><code>object</code></td>
2014-07-10 19:31:11 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
2014-07-10 19:31:11 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Array.html">Array</a>.&lt;<a href="Phaser.Sprite.html">Phaser.Sprite</a>></span>
|
2014-07-10 19:31:11 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
2014-07-10 19:31:11 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Array.html">Array</a>.&lt;<a href="Phaser.Image.html">Phaser.Image</a>></span>
2014-07-10 19:31:11 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>Either a single Sprite/Image or an Array of Sprites/Images.</p></td>
2014-07-10 19:31:11 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-202">line 202</a>
2014-07-10 19:31:11 +00:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
2014-09-09 14:36:56 +00:00
<p>This BitmapData object for method chaining.</p>
2014-07-10 19:31:11 +00:00
</div>
<dl>
<dt>
Type
</dt>
<dd>
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
2014-07-10 19:31:11 +00:00
</dd>
</dl>
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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">
2014-09-09 14:36:56 +00:00
<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>
2014-07-10 19:31:11 +00:00
<th>Argument</th>
2014-09-09 14:36:56 +00:00
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>x</code></td>
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">number</span>
</td>
2014-07-10 19:31:11 +00:00
<td class="attributes">
2014-09-09 14:36:56 +00:00
&lt;optional><br>
2014-07-10 19:31:11 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="default">
0
</td>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The x coordinate to place the Image at.</p></td>
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>y</code></td>
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">number</span>
2014-07-10 19:31:11 +00:00
2014-09-09 14:36:56 +00:00
</td>
2014-07-10 19:31:11 +00:00
2014-09-09 14:36:56 +00:00
<td class="attributes">
&lt;optional><br>
2014-09-09 14:36:56 +00:00
</td>
<td class="default">
0
</td>
<td class="description last"><p>The y coordinate to place the Image at.</p></td>
</tr>
2014-07-10 19:31:11 +00:00
2014-09-09 14:36:56 +00:00
<tr>
<td class="name"><code>anchorX</code></td>
<td class="type">
<span class="param-type">number</span>
2014-07-10 19:31:11 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
2014-09-09 14:36:56 +00:00
<td class="default">
0
</td>
2014-07-10 19:31:11 +00:00
2014-09-09 14:36:56 +00:00
<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>
2014-07-10 19:31:11 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>anchorY</code></td>
2014-07-10 19:31:11 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">number</span>
2014-07-10 19:31:11 +00:00
</td>
2014-07-10 19:31:11 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-09-09 14:36:56 +00:00
<td class="default">
0
</td>
2014-07-10 19:31:11 +00:00
2014-09-09 14:36:56 +00:00
<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>
2014-07-10 19:31:11 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>scaleX</code></td>
2014-07-10 19:31:11 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<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>
2014-07-10 19:31:11 +00:00
</td>
<td class="attributes">
&lt;optional><br>
2014-07-10 19:31:11 +00:00
2014-07-10 19:31:11 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="default">
1
</td>
2014-09-09 14:36:56 +00:00
<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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-816">line 816</a>
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>The newly added Image object.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
</dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<h4 class="name" id="alphaMask"><span class="type-signature"></span>alphaMask<span class="signature">(source, <span class="optional">mask</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
2014-09-09 14:36:56 +00:00
<p>Draws the image onto this BitmapData using an image as an alpha mask.</p>
2013-11-28 15:57:09 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2014-04-29 14:39:02 +00:00
<th>Argument</th>
2013-11-28 15:57:09 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>source</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type">HTMLImage</span>
|
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type">HTMLCanvasElement</span>
|
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type">string</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="attributes">
</td>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>mask</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type">HTMLImage</span>
|
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type">HTMLCanvasElement</span>
|
2014-04-29 14:39:02 +00:00
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<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>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
2013-11-28 15:57:09 +00:00
<dl class="details">
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1065">line 1065</a>
</li></ul></dd>
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</dd>
2013-11-28 15:57:09 +00:00
2013-11-28 15:57:09 +00:00
<dt>
2014-09-09 14:36:56 +00:00
<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">
2014-09-09 14:36:56 +00:00
<p>Sets the blend mode to 'lighter'</p>
</div>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<dl class="details">
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1336">line 1336</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
</dl>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</dd>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</dt>
<dd>
<div class="description">
2014-09-09 14:36:56 +00:00
<p>Sets the blend mode to 'color'</p>
2014-04-29 14:39:02 +00:00
</div>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1518">line 1518</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1427">line 1427</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1414">line 1414</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1388">line 1388</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1310">line 1310</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1284">line 1284</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1297">line 1297</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1271">line 1271</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1466">line 1466</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1479">line 1479</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1440">line 1440</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1492">line 1492</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1401">line 1401</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1531">line 1531</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1349">line 1349</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1375">line 1375</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1206">line 1206</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1505">line 1505</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1362">line 1362</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1453">line 1453</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1258">line 1258</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1232">line 1232</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1245">line 1245</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1219">line 1219</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1323">line 1323</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1156">line 1156</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="clear"><span class="type-signature"></span>clear<span class="signature">()</span><span class="type-signature"> &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>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-267">line 267</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-265">line 265</a>
</li></ul></dd>
</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.
You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.
All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.
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.
You can use the more friendly methods like <code>copyRect</code> and <code>draw</code> to avoid having to remember them all.</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">HTMLImage</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.</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.</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">number</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.</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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-842">line 842</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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>
2013-11-28 15:57:09 +00:00
<div class="description">
2014-09-09 14:36:56 +00:00
<p>Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.</p>
2013-11-28 15:57:09 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2014-09-09 14:36:56 +00:00
<th>Argument</th>
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<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">HTMLImage</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>
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The destination x coordinate to copy the image to.</p></td>
</tr>
2013-11-28 15:57:09 +00:00
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>y</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">number</span>
2014-07-10 19:31:11 +00:00
2014-09-09 14:36:56 +00:00
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="attributes">
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="default">
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The destination y coordinate to copy the image to.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>alpha</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">number</span>
2013-11-28 15:57:09 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<td class="default">
1
</td>
2013-11-28 15:57:09 +00:00
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>blendMode</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
2014-09-09 14:36:56 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="default">
null
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The composite blend mode that will be used when drawing. The default is no blend mode at all.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>roundPx</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">boolean</span>
2014-04-29 14:39:02 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="default">
false
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<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>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1024">line 1024</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
<div class="description">
2014-09-09 14:36:56 +00:00
<p>Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified.
You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.
When drawing it will take into account the Sprites rotation, scale and alpha values.</p>
2014-04-29 14:39:02 +00:00
</div>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<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">
2014-07-10 19:31:11 +00:00
<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>
|
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
2014-04-29 14:39:02 +00:00
</td>
<td class="attributes">
</td>
<td class="default">
</td>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The Sprite, Image or Text object to draw onto this BitmapData.</p></td>
2014-04-29 14:39:02 +00:00
</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>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</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>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</tr>
2014-07-10 19:31:11 +00:00
<tr>
<td class="name"><code>width</code></td>
2014-09-09 14:36:56 +00:00
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="type">
<span class="param-type">number</span>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="attributes">
&lt;optional><br>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
</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>
2014-04-29 14:39:02 +00:00
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>height</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">number</span>
2014-04-29 14:39:02 +00:00
</td>
<td class="attributes">
2014-09-09 14:36:56 +00:00
&lt;optional><br>
2014-04-29 14:39:02 +00:00
</td>
<td class="default">
</td>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>blendMode</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
2014-09-09 14:36:56 +00:00
null
2014-04-29 14:39:02 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The composite blend mode that will be used when drawing the Sprite. The default is no blend mode at all.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>roundPx</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">boolean</span>
2014-04-29 14:39:02 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
2014-09-09 14:36:56 +00:00
false
2014-04-29 14:39:02 +00:00
</td>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</tr>
</tbody>
</table>
<dl class="details">
2014-07-10 19:31:11 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1043">line 1043</a>
2014-07-10 19:31:11 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-07-10 19:31:11 +00:00
</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.
The original BitmapData remains unchanged.
The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true.
Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid:
<code>picture.extract(mask, r, g, b)</code>
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.
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
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>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The BitmapData that the extracted pixels will be drawn to.</p></td>
2014-07-10 19:31:11 +00:00
</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>
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
</td>
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
<td class="attributes">
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
</td>
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
<td class="default">
</td>
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
<td class="description last"><p>The green color component, in the range 0 - 255.</p></td>
</tr>
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
<tr>
<td class="name"><code>b</code></td>
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
<span class="param-type">number</span>
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
</td>
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
<td class="attributes">
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
</td>
2014-04-29 14:39:02 +00:00
2014-07-10 19:31:11 +00:00
<td class="default">
</td>
<td class="description last"><p>The blue color component, in the range 0 - 255.</p></td>
</tr>
2014-04-29 14:39:02 +00:00
<tr>
2014-07-10 19:31:11 +00:00
<td class="name"><code>a</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
2014-07-10 19:31:11 +00:00
<span class="param-type">number</span>
2014-04-29 14:39:02 +00:00
</td>
<td class="attributes">
2014-07-10 19:31:11 +00:00
&lt;optional><br>
2014-04-29 14:39:02 +00:00
</td>
<td class="default">
2014-07-10 19:31:11 +00:00
255
2014-04-29 14:39:02 +00:00
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>The alpha color component, in the range 0 - 255 that the new pixel will be drawn at.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-07-10 19:31:11 +00:00
<td class="name"><code>resize</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
2014-07-10 19:31:11 +00:00
<span class="param-type">boolean</span>
2014-04-29 14:39:02 +00:00
</td>
<td class="attributes">
2014-07-10 19:31:11 +00:00
&lt;optional><br>
2014-04-29 14:39:02 +00:00
</td>
<td class="default">
2014-07-10 19:31:11 +00:00
false
2014-04-29 14:39:02 +00:00
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>Should the destination BitmapData be resized to match this one before the pixels are copied?</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-07-10 19:31:11 +00:00
<td class="name"><code>r2</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
2014-07-10 19:31:11 +00:00
&lt;optional><br>
2014-04-29 14:39:02 +00:00
</td>
<td class="default">
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>An alternative red color component to be written to the destination, in the range 0 - 255.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-07-10 19:31:11 +00:00
<td class="name"><code>g2</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
2014-07-10 19:31:11 +00:00
&lt;optional><br>
2014-04-29 14:39:02 +00:00
</td>
<td class="default">
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>An alternative green color component to be written to the destination, in the range 0 - 255.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-07-10 19:31:11 +00:00
<td class="name"><code>b2</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
2014-07-10 19:31:11 +00:00
<td class="description last"><p>An alternative blue color component to be written to the destination, in the range 0 - 255.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1079">line 1079</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The BitmapData that the extract pixels were drawn on.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-287">line 287</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</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">
2014-05-20 09:12:48 +00:00
<p>Get the color of a specific pixel in the context into a color object.
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
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>
2014-04-29 14:39:02 +00:00
</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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-733">line 733</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>An object with the red, green, blue and alpha values set in the r, g, b and a properties.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">object</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getPixel32"><span class="type-signature"></span>getPixel32<span class="signature">(x, y)</span><span class="type-signature"> &rarr; {number}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get the color of a specific pixel including its alpha value.
2014-05-20 09:12:48 +00:00
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
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.
2014-04-29 14:39:02 +00:00
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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-764">line 764</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>A native color value integer (format: 0xAARRGGBB)</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="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">
2014-05-20 09:12:48 +00:00
<p>Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties.
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,
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>
2014-04-29 14:39:02 +00:00
</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>
2014-09-09 14:36:56 +00:00
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="default">
false
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>Also convert the rgb values into hsv?</p></td>
2014-04-29 14:39:02 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-784">line 784</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
2014-09-09 14:36:56 +00:00
<p>An object with the red, green and blue values set in the r, g and b properties.</p>
2014-04-29 14:39:02 +00:00
</div>
<dl>
<dt>
Type
</dt>
<dd>
2014-09-09 14:36:56 +00:00
<span class="param-type">object</span>
2014-04-29 14:39:02 +00:00
</dd>
</dl>
2014-07-10 19:31:11 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<h4 class="name" id="getPixels"><span class="type-signature"></span>getPixels<span class="signature">(rect)</span><span class="type-signature"> &rarr; {ImageData}</span></h4>
2014-07-10 19:31:11 +00:00
</dt>
<dd>
<div class="description">
2014-09-09 14:36:56 +00:00
<p>Gets all the pixels from the region specified by the given Rectangle object.</p>
2014-07-10 19:31:11 +00:00
</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>
2014-09-09 14:36:56 +00:00
<td class="name"><code>rect</code></td>
2014-07-10 19:31:11 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
2014-07-10 19:31:11 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The Rectangle region to get.</p></td>
2014-07-10 19:31:11 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-803">line 803</a>
2014-07-10 19:31:11 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>Returns a ImageData object containing a Uint8ClampedArray data property.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">ImageData</span>
</dd>
</dl>
2014-07-10 19:31:11 +00:00
2014-04-29 14:39:02 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</dt>
<dd>
<div class="description">
2014-09-09 14:36:56 +00:00
<p>Takes the given Game Object, resizes this BitmapData to match it and then draws it into this BitmapDatas canvas, ready for further processing.
The source game object is not modified by this operation.
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.
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>
2014-04-29 14:39:02 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2014-09-09 14:36:56 +00:00
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<th class="last">Description</th>
</tr>
</thead>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<tbody>
2014-04-29 14:39:02 +00:00
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>source</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.Text.html">Phaser.Text</a></span>
|
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
|
<span class="param-type">HTMLImage</span>
|
<span class="param-type">HTMLCanvasElement</span>
|
<span class="param-type">string</span>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
</td>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-230">line 230</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</dt>
<dd>
<div class="description">
2014-09-09 14:36:56 +00:00
<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.
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.
Note that the format of the color received will be different depending on if the system is big or little endian.
It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead.
The callback will also be sent the pixels x and y coordinates respectively.</p>
2014-04-29 14:39:02 +00:00
</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>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The callback that will be sent each pixel color to be processed.</p></td>
2014-04-29 14:39:02 +00:00
</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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-447">line 447</a>
2014-05-20 09:12:48 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-05-20 09:12:48 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-05-20 09:12:48 +00:00
</dt>
<dd>
<div class="description">
2014-09-09 14:36:56 +00:00
<p>Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback.
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>.
Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha.
The <code>color</code> property is an Int32 of the full color. Note the endianess of this will change per system.
The <code>rgba</code> property is a CSS style rgba() string which can be used with context.fillStyle calls, among others.
The callback will also be sent the pixels x and y coordinates respectively.
The callback must return either <code>false</code>, in which case no change will be made to the pixel, or a new color object.
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>
2014-05-20 09:12:48 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
2014-09-09 14:36:56 +00:00
<th>Default</th>
2014-05-20 09:12:48 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>callback</code></td>
2014-05-20 09:12:48 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">function</span>
2014-05-20 09:12:48 +00:00
</td>
<td class="attributes">
</td>
2014-09-09 14:36:56 +00:00
<td class="default">
</td>
2014-05-20 09:12:48 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The callback that will be sent each pixel color object to be processed.</p></td>
2014-05-20 09:12:48 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<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>
2014-05-20 09:12:48 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
2014-09-09 14:36:56 +00:00
&lt;optional><br>
2014-05-20 09:12:48 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="default">
0
</td>
2014-05-20 09:12:48 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The x coordinate of the top-left of the region to process from.</p></td>
2014-05-20 09:12:48 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>y</code></td>
2014-05-20 09:12:48 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
2014-09-09 14:36:56 +00:00
&lt;optional><br>
2014-05-20 09:12:48 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="default">
0
</td>
2014-05-20 09:12:48 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The y coordinate of the top-left of the region to process from.</p></td>
2014-05-20 09:12:48 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>width</code></td>
2014-05-20 09:12:48 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
2014-09-09 14:36:56 +00:00
&lt;optional><br>
2014-05-20 09:12:48 +00:00
</td>
2014-09-09 14:36:56 +00:00
<td class="default">
</td>
2014-05-20 09:12:48 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The width of the region to process.</p></td>
2014-05-20 09:12:48 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>height</code></td>
2014-05-20 09:12:48 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">number</span>
2014-05-20 09:12:48 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
2014-09-09 14:36:56 +00:00
<td class="default">
</td>
2014-05-20 09:12:48 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The height of the region to process.</p></td>
2014-05-20 09:12:48 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-389">line 389</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</dt>
<dd>
<div class="description">
2014-09-09 14:36:56 +00:00
<p>Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.</p>
2014-04-29 14:39:02 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The x coordinate of the top-left of the Rectangle.</p></td>
</tr>
2014-04-29 14:39:02 +00:00
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>y</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The y coordinate of the top-left of the Rectangle.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>width</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The width of the Rectangle.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>height</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>The height of the Rectangle.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
<tr>
2014-09-09 14:36:56 +00:00
<td class="name"><code>fillStyle</code></td>
2014-04-29 14:39:02 +00:00
<td class="type">
2014-09-09 14:36:56 +00:00
<span class="param-type">string</span>
2014-04-29 14:39:02 +00:00
</td>
<td class="attributes">
&lt;optional><br>
</td>
2014-09-09 14:36:56 +00:00
<td class="description last"><p>If set the context fillStyle will be set to this value before the rect is drawn.</p></td>
2014-04-29 14:39:02 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1132">line 1132</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</dt>
<dd>
<div class="description">
<p>If the game is running in WebGL this will push the texture up to the GPU if it's dirty.
This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function.
If you wish to suppress this functionality set BitmapData.disableTextureUpload to <code>true</code>.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-1183">line 1183</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</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.
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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-501">line 501</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<h4 class="name" id="resize"><span class="type-signature"></span>resize<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Phaser.BitmapData.html">Phaser.BitmapData</a>}</span></h4>
2014-04-29 14:39:02 +00:00
</dt>
<dd>
<div class="description">
<p>Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-309">line 309</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2014-04-29 14:39:02 +00:00
</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>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-551">line 551</a>
2014-04-29 14:39:02 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2014-04-29 14:39:02 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<h4 class="name" id="setPixel"><span class="type-signature"></span>setPixel<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>
2014-04-29 14:39:02 +00:00
</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>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>
<dl class="details">
2013-11-28 15:57:09 +00:00
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-714">line 714</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
2014-04-29 14:39:02 +00:00
<p>Sets the color of the given pixel to the specified red, green, blue and alpha values.</p>
2013-11-28 15:57:09 +00:00
</div>
2014-04-29 14:39:02 +00:00
<h5>Parameters:</h5>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<th>Type</th>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<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>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="default">
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The alpha color value, between 0 and 0xFF (255).</p></td>
</tr>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<tr>
<td class="name"><code>immediate</code></td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="type">
<span class="param-type">boolean</span>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="attributes">
&lt;optional><br>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="default">
true
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="description last"><p>If <code>true</code> the context.putImageData will be called and the dirty flag set.</p></td>
</tr>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
</tbody>
</table>
2013-11-28 15:57:09 +00:00
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-675">line 675</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
2014-04-29 14:39:02 +00:00
<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.
Shifting will add the given value onto the current h, s and l values, not replace them.
The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.</p>
2013-11-28 15:57:09 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2014-04-29 14:39:02 +00:00
<th>Argument</th>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<th>Default</th>
2013-11-28 15:57:09 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>h</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
2014-04-29 14:39:02 +00:00
<td class="attributes">
&lt;optional><br>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="default">
null
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The amount to shift the hue by.</p></td>
</tr>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>s</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
2014-04-29 14:39:02 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-04-29 14:39:02 +00:00
<td class="default">
null
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The amount to shift the saturation by.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>l</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
2014-04-29 14:39:02 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="default">
null
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The amount to shift the lightness by.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>region</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
2014-04-29 14:39:02 +00:00
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="default">
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The area to perform the operation on. If not given it will run over the whole BitmapData.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-612">line 612</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
<dt>
2014-09-09 14:36:56 +00:00
<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>
2013-11-28 15:57:09 +00:00
</dt>
<dd>
<div class="description">
2014-04-29 14:39:02 +00:00
<p>This re-creates the BitmapData.imageData from the current context.
It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array.
If not given the dimensions defaults to the full size of the context.</p>
2013-11-28 15:57:09 +00:00
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
2014-04-29 14:39:02 +00:00
<th>Argument</th>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<th>Default</th>
2013-11-28 15:57:09 +00:00
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
2013-11-28 15:57:09 +00:00
<td class="type">
<span class="param-type">number</span>
</td>
2014-04-29 14:39:02 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2014-04-29 14:39:02 +00:00
<td class="default">
0
</td>
2014-04-29 14:39:02 +00:00
<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>
2014-04-29 14:39:02 +00:00
<td class="attributes">
&lt;optional><br>
2014-04-29 14:39:02 +00:00
2014-04-29 14:39:02 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="default">
0
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The y coordinate of the top-left of the image data area to grab from.</p></td>
</tr>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
2014-04-29 14:39:02 +00:00
<td class="attributes">
&lt;optional><br>
2014-04-29 14:39:02 +00:00
2014-04-29 14:39:02 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="default">
</td>
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The width of the image data area.</p></td>
</tr>
<tr>
2014-04-29 14:39:02 +00:00
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
2013-11-28 15:57:09 +00:00
</td>
2014-04-29 14:39:02 +00:00
<td class="attributes">
&lt;optional><br>
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="default">
</td>
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
<td class="description last"><p>The height of the image data area.</p></td>
2013-11-28 15:57:09 +00:00
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
2014-09-09 14:36:56 +00:00
<a href="BitmapData.js.html">gameobjects/BitmapData.js</a>, <a href="BitmapData.js.html#sunlight-1-line-345">line 345</a>
2013-11-28 15:57:09 +00:00
</li></ul></dd>
</dl>
2014-09-09 14:36:56 +00:00
<h5>Returns:</h5>
<div class="param-desc">
<p>This BitmapData object for method chaining.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.BitmapData.html">Phaser.BitmapData</a></span>
</dd>
</dl>
2013-11-28 15:57:09 +00:00
</dd>
</dl>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
2014-02-05 06:29:17 +00:00
Phaser Copyright © 2012-2014 Photon Storm Ltd.
2013-11-28 15:57:09 +00:00
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
2014-09-09 14:36:56 +00:00
on Tue Sep 09 2014 15:29:19 GMT+0100 (BST) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
2013-11-28 15:57:09 +00:00
</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( {
2014-04-10 22:13:43 +00:00
anchorName : function(i, heading, prefix) {
return $(heading).attr("id") || ( prefix + i );
},
2013-11-28 15:57:09 +00:00
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>