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" >
2014-02-18 03:01:51 +00:00
< 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-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" >
2014-02-21 15:37:26 +00:00
< 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" >
2014-02-08 07:24:22 +00:00
< 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" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Arcade.Body.html" > Body< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.html" > Ninja< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.AABB.html" > AABB< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.Body.html" > Body< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.Circle.html" > Circle< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.Ninja.Tile.html" > Tile< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-2" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.html" > P2< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.Body.html" > Body< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.BodyDebug.html" > BodyDebug< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.CollisionGroup.html" > CollisionGroup< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.ContactMaterial.html" > ContactMaterial< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.DistanceConstraint.html" > DistanceConstraint< / a >
< / li >
2014-04-11 12:09:28 +00:00
< 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" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.GearConstraint.html" > GearConstraint< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.InversePointProxy.html" > InversePointProxy< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.LockConstraint.html" > LockConstraint< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.Material.html" > Material< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.PointProxy.html" > PointProxy< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.PrismaticConstraint.html" > PrismaticConstraint< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.RevoluteConstraint.html" > RevoluteConstraint< / a >
2014-02-21 15:37:26 +00:00
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-3" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.Physics.P2.Spring.html" > Spring< / a >
2014-02-21 15:37:26 +00:00
< / 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" >
2014-03-14 06:36:05 +00:00
< 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" >
2014-03-14 06:36:05 +00:00
< a href = "Phaser.RetroFont.html" > RetroFont< / a >
< / li >
2014-04-10 22:13:43 +00:00
< li class = "class-depth-1" >
2014-03-14 06:36:05 +00:00
< 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 >
2014-04-11 12:09:28 +00:00
< 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" >
2014-02-18 03:01:51 +00:00
< 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-05-20 09:12:48 +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 >
2014-02-18 03:01:51 +00:00
< 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.
A single BitmapData can be used as the texture 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 >
2014-02-08 07:24:22 +00:00
< 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 >
2014-02-08 07:24:22 +00:00
< 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" >
< optional>< br >
< / td >
< td class = "default" >
2014-02-08 07:24:22 +00:00
100
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" >
< optional>< br >
< / td >
< td class = "default" >
2014-02-08 07:24:22 +00:00
100
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 >
2014-02-18 03:01:51 +00:00
< 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" >
2014-02-18 03:01:51 +00:00
< 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 >
2014-04-11 12:09:28 +00:00
< / 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 >
2014-04-11 12:09:28 +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 > height< / code > < / td >
2014-04-11 12:09:28 +00:00
< td class = "type" >
2014-04-29 14:39:02 +00:00
< span class = "param-type" > number< / span >
2014-04-11 12:09:28 +00:00
< / td >
2014-04-29 14:39:02 +00:00
< td class = "description last" > < p > The height of the BitmapData in pixels.< / p > < / td >
2014-04-11 12:09:28 +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-44" > line 44< / a >
2014-04-11 12:09:28 +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 = "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 >
2014-02-18 03:01:51 +00:00
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" >
2014-02-18 03:01:51 +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 > texture< / code > < / td >
2014-02-18 03:01:51 +00:00
< td class = "type" >
2014-04-29 14:39:02 +00:00
< span class = "param-type" > PIXI.Texture< / span >
2014-02-18 03:01:51 +00:00
< / td >
2014-04-29 14:39:02 +00:00
< td class = "description last" > < p > The PIXI.Texture.< / p > < / td >
2014-02-18 03:01:51 +00:00
< / 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 >
2014-02-18 03:01:51 +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
< 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 >
2014-02-21 15:37:26 +00:00
< / 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 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
2014-04-29 14:39:02 +00:00
< dl class = "details" >
2014-02-21 15:37:26 +00:00
2014-04-29 14:39:02 +00:00
< h5 class = "subsection-title" > Properties:< / h5 >
< dl >
< table class = "props table table-striped" >
2014-02-21 15:37:26 +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 > type< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-29 14:39:02 +00:00
< span class = "param-type" > number< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-29 14:39:02 +00:00
< td class = "description last" > < p > The const type of this object.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
2014-04-29 14:39:02 +00:00
< / dl >
2014-02-21 15:37:26 +00:00
< 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 >
2014-02-21 15:37:26 +00:00
< / 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
2014-02-21 15:37:26 +00:00
< / dd >
2014-04-29 14:39:02 +00:00
< / dl >
< h3 class = "subsection-title" > Methods< / h3 >
< dl >
2014-02-21 15:37:26 +00:00
< dt >
2014-04-29 14:39:02 +00:00
< h4 class = "name" id = "add" > < span class = "type-signature" > < / span > add< span class = "signature" > (object)< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-04-29 14:39:02 +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-02-21 15:37:26 +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-04-29 14:39:02 +00:00
< td class = "name" > < code > object< / code > < / td >
2014-02-21 15:37:26 +00:00
< td class = "type" >
2014-04-29 14:39:02 +00:00
< span class = "param-type" > < a href = "Phaser.Sprite.html" > Phaser.Sprite< / a > < / span >
2014-02-21 15:37:26 +00:00
|
2014-04-29 14:39:02 +00:00
< span class = "param-type" > < a href = "Array.html" > Array< / a > .< < a href = "Phaser.Sprite.html" > Phaser.Sprite< / a > >< / span >
|
2014-02-21 15:37:26 +00:00
2014-04-29 14:39:02 +00:00
< span class = "param-type" > < a href = "Phaser.Image.html" > Phaser.Image< / a > < / span >
|
2014-02-21 15:37:26 +00:00
2014-04-29 14:39:02 +00:00
< span class = "param-type" > < a href = "Array.html" > Array< / a > .< < a href = "Phaser.Image.html" > Phaser.Image< / a > >< / span >
2014-02-21 15:37:26 +00:00
< / td >
2014-04-29 14:39:02 +00:00
< td class = "description last" > < p > Either a single Sprite/Image or an Array of Sprites/Images.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< 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-161" > line 161< / a >
2014-02-21 15:37:26 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-07-10 19:31:11 +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 > < span class = "type-signature" > → {< a href = "Phaser.Image.html" > Phaser.Image< / a > }< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The x coordinate to place the image at.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > y< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The y coordinate to place the image at.< / 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-750" > line 750< / a >
< / li > < / ul > < / dd >
< / dl >
< 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 >
< / dd >
< dt >
< h4 class = "name" id = "alphaMask" > < span class = "type-signature" > < / span > alphaMask< span class = "signature" > (source, < span class = "optional" > mask< / span > , < span class = "optional" > sourceRect< / span > , < span class = "optional" > maskRect< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-21 15:37:26 +00:00
< / dt >
< dd >
< div class = "description" >
2014-04-29 14:39:02 +00:00
< p > Draws the given image onto this BitmapData using an image as an alpha mask.< / p >
2014-02-21 15:37:26 +00:00
< / 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-02-21 15:37:26 +00:00
< 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 >
|
< span class = "param-type" > < a href = "Phaser.BitmapData.html" > Phaser.BitmapData< / a > < / span >
|
2014-02-21 15:37:26 +00:00
< span class = "param-type" > HTMLImage< / span >
|
< span class = "param-type" > string< / span >
< / td >
2014-07-10 19:31:11 +00:00
< td class = "attributes" >
< / td >
2014-02-21 15:37:26 +00:00
< td class = "description last" > < p > The Image to draw. If you give a key it will try and find the Image in the Game.Cache.< / p > < / td >
< / tr >
< tr >
2014-04-29 14:39:02 +00:00
< td class = "name" > < code > mask< / code > < / td >
2014-02-21 15:37:26 +00:00
< 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 >
|
< span class = "param-type" > < a href = "Phaser.BitmapData.html" > Phaser.BitmapData< / a > < / span >
|
2014-04-29 14:39:02 +00:00
< span class = "param-type" > HTMLImage< / span >
|
2014-02-21 15:37:26 +00:00
2014-04-29 14:39:02 +00:00
< span class = "param-type" > string< / span >
2014-07-10 19:31:11 +00:00
|
< span class = "param-type" > null< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > The Image to use as the alpha mask. If you give a key it will try and find the Image in the Game.Cache. If you pass nothing or null it will use itself.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > sourceRect< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Rectangle.html" > Phaser.Rectangle< / a > < / span >
< / td >
2014-02-21 15:37:26 +00:00
2014-07-10 19:31:11 +00:00
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > A Rectangle where x/y define the coordinates to draw the Source image to and width/height define the size.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > maskRect< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Rectangle.html" > Phaser.Rectangle< / a > < / span >
< / td >
< td class = "attributes" >
< optional>< br >
2014-02-21 15:37:26 +00:00
2014-07-10 19:31:11 +00:00
2014-02-21 15:37:26 +00:00
2014-07-10 19:31:11 +00:00
< / td >
2014-02-21 15:37:26 +00:00
2014-07-10 19:31:11 +00:00
< td class = "description last" > < p > A Rectangle where x/y define the coordinates to draw the Mask image to and width/height define the size.< / p > < / td >
2014-02-21 15:37:26 +00:00
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< 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-884" > line 884< / a >
2014-02-21 15:37:26 +00:00
< / 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 = "circle" > < span class = "type-signature" > < / span > circle< span class = "signature" > (x, y, radius, < span class = "optional" > fillStyle< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
2013-11-28 15:57:09 +00:00
< / dt >
< dd >
< div class = "description" >
2014-04-29 14:39:02 +00:00
< p > Draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size.< / 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 >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-04-29 14:39:02 +00:00
< td class = "attributes" >
< / td >
2013-11-28 15:57:09 +00:00
2014-05-20 09:12:48 +00:00
< td class = "description last" > < p > The x coordinate to draw the Circle at. This is the center of the circle.< / p > < / td >
2013-11-28 15:57:09 +00:00
< / 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" >
< / td >
2014-05-20 09:12:48 +00:00
< td class = "description last" > < p > The y coordinate to draw the Circle at. This is the center of the circle.< / p > < / td >
2014-04-29 14:39:02 +00:00
< / tr >
< tr >
< td class = "name" > < code > radius< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
2014-05-20 09:12:48 +00:00
< td class = "description last" > < p > The radius of the Circle in pixels. The radius is half the diameter.< / p > < / td >
2014-04-29 14:39:02 +00:00
< / tr >
< tr >
< td class = "name" > < code > fillStyle< / code > < / td >
< td class = "type" >
< span class = "param-type" > string< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
2013-11-28 15:57:09 +00:00
2014-04-29 14:39:02 +00:00
< td class = "description last" > < p > If set the context fillStyle will be set to this value before the circle is drawn.< / p > < / td >
2013-11-28 15:57:09 +00:00
< / tr >
2014-02-18 03:01:51 +00:00
< / tbody >
< / table >
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
< dl class = "details" >
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
< 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-1001" > line 1001< / a >
2014-02-18 03:01:51 +00:00
< / li > < / ul > < / dd >
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
< / dl >
2014-04-29 14:39:02 +00:00
< / dd >
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
< dt >
2014-04-29 14:39:02 +00:00
< h4 class = "name" id = "clear" > < span class = "type-signature" > < / span > clear< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
2014-02-18 03:01:51 +00:00
< / dt >
< dd >
< div class = "description" >
2014-04-29 14:39:02 +00:00
< p > Clears the BitmapData context using a clearRect.< / p >
2014-02-18 03:01:51 +00:00
< / div >
2013-11-28 15:57:09 +00:00
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
< dl class = "details" >
2014-02-18 03:01:51 +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
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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-221" > line 221< / 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
< / 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 >
< 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 >
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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-219" > line 219< / a >
2013-11-28 15:57:09 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
2014-07-10 19:31:11 +00:00
< h4 class = "name" id = "copyPixels" > < span class = "type-signature" > < / span > copyPixels< span class = "signature" > (source, area, x, y)< / span > < span class = "type-signature" > < / span > < / h4 >
2013-11-28 15:57:09 +00:00
< / dt >
< dd >
< div class = "description" >
2014-04-29 14:39:02 +00:00
< p > Copies the pixels from the source image to this BitmapData based on the given area and destination.< / 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 >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2014-04-29 14:39:02 +00:00
< 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 >
|
< span class = "param-type" > < a href = "Phaser.BitmapData.html" > Phaser.BitmapData< / a > < / span >
|
2014-04-29 14:39:02 +00:00
< span class = "param-type" > HTMLImage< / span >
|
< span class = "param-type" > string< / span >
< / td >
2014-07-10 19:31:11 +00:00
< 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 >
2014-04-29 14:39:02 +00:00
< / tr >
< tr >
< td class = "name" > < code > area< / code > < / td >
2013-11-28 15:57:09 +00:00
< td class = "type" >
2014-02-21 15:37:26 +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 = "description last" > < p > The Rectangle region to copy from the source image.< / p > < / td >
< / tr >
< tr >
2014-07-10 19:31:11 +00:00
< td class = "name" > < code > x< / code > < / td >
2014-04-29 14:39:02 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "description last" > < p > The destination x coordinate to copy the image to.< / p > < / td >
< / tr >
< tr >
2014-07-10 19:31:11 +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 = "description last" > < p > The destination y coordinate to copy the image to.< / 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-764" > line 764< / a >
2013-11-28 15:57:09 +00:00
< / li > < / ul > < / dd >
< / dl >
2014-02-18 03:01:51 +00:00
< / dd >
< dt >
2014-07-10 19:31:11 +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 > < span class = "type-signature" > < / span > < / h4 >
2014-02-18 03:01:51 +00:00
< / dt >
< dd >
2014-04-29 14:39:02 +00:00
< div class = "description" >
2014-07-10 19:31:11 +00:00
< p > Draws the given image or Game Object to this BitmapData at the coordinates specified.
You can use the optional width and height values to 'stretch' the image as it's drawn.< / 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 >
|
< span class = "param-type" > < a href = "Phaser.BitmapData.html" > Phaser.BitmapData< / a > < / span >
|
2014-04-29 14:39:02 +00:00
< 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 draw. If you give a string it will try and find the Image in the Game.Cache.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The x coordinate to draw the image to.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > y< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The y coordinate to draw the image to.< / p > < / td >
< / tr >
2014-07-10 19:31:11 +00:00
< tr >
< td class = "name" > < code > width< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The width when drawing the image. You can use this to optionally stretch the drawn image horizontally.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > height< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The height when drawing the image. You can use this to optionally stretch the drawn image vertically.< / p > < / td >
< / tr >
2014-04-29 14:39:02 +00:00
< / tbody >
< / table >
< dl class = "details" >
< 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-805" > line 805< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "drawSprite" > < span class = "type-signature" > < / span > drawSprite< span class = "signature" > (sprite, < span class = "optional" > x< / span > , < span class = "optional" > y< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
2014-07-10 19:31:11 +00:00
< p > DEPRECATED: Use BitmapData.draw instead.< / p >
< p > Draws the given image to this BitmapData at the coordinates specified.
If you need to only draw a part of the image use BitmapData.copyPixels instead.< / 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 > sprite< / 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 >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The Sprite to draw. Must have a loaded texture and frame.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The x coordinate to draw the Sprite to.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > y< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The y coordinate to draw the Sprite to.< / p > < / td >
< / 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 >
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-864" > line 864< / a >
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "extract" > < span class = "type-signature" > < / span > extract< span class = "signature" > (destination, r, g, b, < span class = "optional" > a< / span > , < span class = "optional" > resize< / span > , < span class = "optional" > r2< / span > , < span class = "optional" > g2< / span > , < span class = "optional" > b2< / span > )< / span > < span class = "type-signature" > → {< 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 >
< td class = "description last" > < p > The BitmapData that the extracts pixels will be drawn to.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > r< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The red color component, in the range 0 - 255.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > g< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
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
< 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
< 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
< 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
< 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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-927" > line 927< / 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 >
< 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" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Fills the BitmapData with the given color.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > r< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The red color value, between 0 and 0xFF (255).< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > g< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The green color value, between 0 and 0xFF (255).< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > b< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The blue color value, between 0 and 0xFF (255).< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > a< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-238" > line 238< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "getPixel" > < span class = "type-signature" > < / span > getPixel< span class = "signature" > (x, y, < span class = "optional" > out< / span > )< / span > < span class = "type-signature" > → {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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-667" > line 667< / 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" > → {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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-698" > line 698< / 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" > → {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" >
< 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" >
< 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" >
< optional>< br >
< / td >
< td class = "default" >
false
< / td >
< td class = "description last" > < p > Also convert the rgb values into hsv?< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< 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-718" > line 718< / 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 and blue values set in the r, g and b properties.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > object< / span >
< / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "getPixels" > < span class = "type-signature" > < / span > getPixels< span class = "signature" > (rect)< / span > < span class = "type-signature" > → {ImageData}< / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Gets all the pixels from the region specified by the given Rectangle object.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > rect< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Rectangle.html" > Phaser.Rectangle< / a > < / span >
< / td >
< td class = "description last" > < p > The Rectangle region to get.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< 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-737" > line 737< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< 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
< / dd >
< dt >
< h4 class = "name" id = "load" > < span class = "type-signature" > < / span > load< span class = "signature" > (source)< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Takes the given Game Object, resizes this BitmapData to match it and then draws it into this BitmapDatas canvas, ready for further processing.
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 and draw.
If a string is given it will assume it's a cache key and look in Phaser.Cache for an image key matching the string.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > source< / code > < / td >
< td class = "type" >
< span class = "param-type" > < a href = "Phaser.Sprite.html" > Phaser.Sprite< / a > < / span >
|
< span class = "param-type" > < a href = "Phaser.Image.html" > Phaser.Image< / a > < / span >
|
< span class = "param-type" > < a href = "Phaser.BitmapData.html" > Phaser.BitmapData< / a > < / span >
|
< span class = "param-type" > string< / span >
< / td >
< td class = "description last" > < p > The object that will be used to populate this BitmapData.< / 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-186" > line 186< / a >
< / li > < / ul > < / dd >
< / dl >
2014-04-29 14:39:02 +00:00
< / dd >
< dt >
< h4 class = "name" id = "processPixel" > < span class = "type-signature" > < / span > processPixel< span class = "signature" > (callback, callbackContext, < span class = "optional" > x< / span > , < span class = "optional" > y< / span > , < span class = "optional" > width< / span > , < span class = "optional" > height< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates.
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 >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > callback< / code > < / td >
< td class = "type" >
< span class = "param-type" > function< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The callback that will be sent each pixel color to be processed.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > callbackContext< / code > < / td >
< td class = "type" >
< span class = "param-type" > object< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The context under which the callback will be called.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< 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" >
< 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" >
< 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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-397" > line 397< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "processPixelRGB" > < span class = "type-signature" > < / span > processPixelRGB< span class = "signature" > (callback, callbackContext, < span class = "optional" > x< / span > , < span class = "optional" > y< / span > , < span class = "optional" > width< / span > , < span class = "optional" > height< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback.
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 >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > callback< / code > < / td >
< td class = "type" >
< span class = "param-type" > function< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The callback that will be sent each pixel color object to be processed.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > callbackContext< / code > < / td >
< td class = "type" >
< span class = "param-type" > object< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The context under which the callback will be called.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< 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" >
< 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" >
< 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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-342" > line 342< / a >
2014-05-20 09:12:48 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "rect" > < span class = "type-signature" > < / span > rect< span class = "signature" > (x, y, width, height, < span class = "optional" > fillStyle< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < p > The x coordinate of the top-left of the Rectangle.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > y< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < p > The y coordinate of the top-left of the Rectangle.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > width< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < p > The width of the Rectangle.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > height< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < p > The height of the Rectangle.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > fillStyle< / code > < / td >
< td class = "type" >
< span class = "param-type" > string< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "description last" > < p > If set the context fillStyle will be set to this value before the rect is drawn.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< 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-980" > line 980< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "refreshBuffer" > < span class = "type-signature" > < / span > refreshBuffer< 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" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > DEPRECATED: This method will be removed in Phaser 2.1. Please use BitmapData.update instead.< / p >
< 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 >
< / 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" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The x coordinate of the top-left of the image data area to grab from.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > y< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
0
< / td >
< td class = "description last" > < p > The y coordinate of the top-left of the image data area to grab from.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > width< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The width of the image data area.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > height< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< optional>< br >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The height of the image data area.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< 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-289" > line 289< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "render" > < span class = "type-signature" > < / span > render< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > If the game is running in WebGL this will push the texture up to the GPU if it's dirty.
This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function.
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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-1025" > line 1025< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "replaceRGB" > < span class = "type-signature" > < / span > replaceRGB< span class = "signature" > (r1, g1, b1, a1, r2, g2, b2, a2, < span class = "optional" > region< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Replaces all pixels matching one color with another. The color values are given as two sets of RGBA values.
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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-448" > line 448< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "resize" > < span class = "type-signature" > < / span > resize< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer.< / p >
< / div >
< dl class = "details" >
< 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-257" > line 257< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< h4 class = "name" id = "setHSL" > < span class = "type-signature" > < / span > setHSL< span class = "signature" > (< span class = "optional" > h< / span > , < span class = "optional" > s< / span > , < span class = "optional" > l< / span > , < span class = "optional" > region< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > h< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< 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" >
< 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" >
< 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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-495" > line 495< / a >
2014-04-29 14:39:02 +00:00
< / li > < / ul > < / dd >
< / dl >
< / dd >
< dt >
< 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" > < / span > < / h4 >
< / dt >
< dd >
< div class = "description" >
< p > Sets the color of the given pixel to the specified red, green and blue values.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params table table-striped" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Argument< / th >
< th > Default< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > x< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > y< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > red< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The red color value, between 0 and 0xFF (255).< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > green< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The green color value, between 0 and 0xFF (255).< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > blue< / code > < / td >
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "default" >
< / td >
< td class = "description last" > < p > The blue color value, between 0 and 0xFF (255).< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > 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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-649" > line 649< / 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 = "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" > < / 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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-613" > line 613< / 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 = "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" > < / 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" >
< 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 >
2014-02-18 03:01:51 +00:00
< / tr >
< tr >
2014-04-29 14:39:02 +00:00
< td class = "name" > < code > s< / code > < / td >
2014-02-18 03:01:51 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-04-29 14:39:02 +00:00
< td class = "attributes" >
< optional>< br >
< / td >
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
< td class = "default" >
null
< / td >
2014-02-18 03:01:51 +00:00
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" >
< 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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-553" > line 553< / 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 = "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" > < / 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 >
2014-02-18 03:01:51 +00:00
< td class = "name" > < code > x< / code > < / td >
2013-11-28 15:57:09 +00:00
< td class = "type" >
2014-02-18 03:01:51 +00:00
< span class = "param-type" > number< / span >
< / td >
2014-04-29 14:39:02 +00:00
< td class = "attributes" >
< optional>< br >
< / td >
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
< td class = "default" >
0
< / td >
2014-02-18 03:01:51 +00:00
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 >
2014-02-18 03:01:51 +00:00
< / 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" >
< optional>< br >
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
< / td >
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
< td class = "default" >
0
< / td >
2014-02-18 03:01:51 +00:00
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 >
2014-02-18 03:01:51 +00:00
< / tr >
< tr >
2014-04-29 14:39:02 +00:00
< td class = "name" > < code > width< / code > < / td >
2014-02-18 03:01:51 +00:00
< td class = "type" >
< span class = "param-type" > number< / span >
< / td >
2014-04-29 14:39:02 +00:00
< td class = "attributes" >
< optional>< br >
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
< / td >
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
< td class = "default" >
< / td >
2014-02-18 03:01:51 +00:00
2014-04-29 14:39:02 +00:00
< td class = "description last" > < p > The width of the image data area.< / p > < / td >
2014-02-18 03:01:51 +00:00
< / tr >
< tr >
2014-04-29 14:39:02 +00:00
< td class = "name" > < code > height< / code > < / td >
2014-02-18 03:01:51 +00:00
< 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" >
< 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-07-10 19:31:11 +00:00
< a href = "BitmapData.js.html" > gameobjects/BitmapData.js< / a > , < a href = "BitmapData.js.html#sunlight-1-line-287" > line 287< / a >
2013-11-28 15:57:09 +00:00
< / li > < / ul > < / dd >
< / dl >
< / 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" >
2014-04-11 12:09:28 +00:00
Documentation generated by < a href = "https://github.com/jsdoc3/jsdoc" > JSDoc 3.3.0-dev< / a >
2014-07-10 19:31:11 +00:00
on Thu Jul 10 2014 20:18:57 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) {
2014-03-14 06:36:05 +00:00
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 >