BitmapData#copyTransform()

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)
doc_phaser
2017-02-14 10:36:53
Comments
Leave a Comment

Please login to continue.