copyTransform(source, blendMode, roundPx) → {Phaser.BitmapData}
Draws the given source
Game Object to this BitmapData, using its worldTransform
property to set the
position, scale and rotation of where it is drawn. This function is used internally by drawGroup
.
It takes the objects tint and scale mode into consideration before drawing.
You can optionally specify Blend Mode and Round Pixels arguments.
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
source | Phaser.Sprite | Phaser.Image | Phaser.Text | Phaser.BitmapData | Phaser.BitmapText | <optional> | The Game Object to draw. | |
blendMode | string | <optional> | null | The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'. |
roundPx | boolean | <optional> | false | Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. |
Returns
This BitmapData object for method chaining.
- Source code: gameobjects/BitmapData.js (Line 1426)
Please login to continue.