BitmapData#smoothProperty

smoothProperty : string The context property needed for smoothing this Canvas. Source code: gameobjects/BitmapData.js (Line 70)

BitmapData#text()

text(text, x, y, font, color, shadow) → {Phaser.BitmapData} Draws text to the BitmapData in the given font and color.The default font is 14px Courier, so useful for quickly drawing debug text.If you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method. Parameters Name Type Argument Default Description text string The text to write to the BitmapData. x number The x coordinate of the top-left of the text string. y number The y

BitmapData#shadow()

shadow(color, blur, x, y) → {Phaser.BitmapData} Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it.You can cancel an existing shadow by calling this method and passing no parameters.Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage. Parameters Name Type Argument Default Description color string The color of the shadow, given in a CSS format, i.e. #000000 or rgba(0,0,0,1). If null

BitmapData#shiftHSL()

shiftHSL(h, s, l, region) → {Phaser.BitmapData} 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. Parameters Name Type Argument Default Description h number <optional> null The amount to shi

BitmapData#setPixel32()

setPixel32(x, y, red, green, blue, alpha, immediate) → {Phaser.BitmapData} Sets the color of the given pixel to the specified red, green, blue and alpha values. Parameters Name Type Argument Default Description x number The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. y number The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. red number The red color value, between 0 and 0xFF (255). green

BitmapData#setPixel()

setPixel(x, y, red, green, blue, immediate) → {Phaser.BitmapData} Sets the color of the given pixel to the specified red, green and blue values. Parameters Name Type Argument Default Description x number The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. y number The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. red number The red color value, between 0 and 0xFF (255). green number The

BitmapData#setHSL()

setHSL(h, s, l, region) → {Phaser.BitmapData} Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified. Parameters Name Type Argument Default Description h number <optional> null The hue, in the range 0 - 1. s number <optional> null The saturation, in the range 0 - 1. l number <optional> null The lightness, in the range 0 - 1. region Phaser.Rectangle <optional> The area to

BitmapData#replaceRGB()

replaceRGB(r1, g1, b1, a1, r2, g2, b2, a2, region) → {Phaser.BitmapData} 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. Parameters Name Type Argument Description r1 number The red color value to be replaced. Between 0 and 255. g1 number The green color value to be replaced. Between 0 and 255. b1 nu

BitmapData#resize()

resize(width, height) → {Phaser.BitmapData} Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer. Parameters Name Type Description width integer The new width of the BitmapData. height integer The new height of the BitmapData. Returns Phaser.BitmapData - This BitmapData object for method chaining. Source code: gameobjects/BitmapData.js (Line 552)

BitmapData#render()

render() → {Phaser.BitmapData} 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 true. Returns Phaser.BitmapData - This BitmapData object for method chaining. Source code: gameobjects/BitmapData.js (Line 2004)