You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// To keep this fast we're not going to do any look-ups or parameter validation
767
-
768
-
if(alpha<=0)
755
+
/**
756
+
* Copies a rectangular block, defined by the `from` parameter, from the source image to this BitmapData.
757
+
* You can optionally translate, rotate, scale, alpha or blend the block as it's drawn.
758
+
* All rotation, scaling and drawing takes place around the blocks center point by default, but can be changed with the anchor parameters.
759
+
*
760
+
* @method Phaser.BitmapData#fastCopy
761
+
* @param {Phaser.Sprite|Phaser.Image|Phaser.BitmapData|HTMLImage} source - The Image to copy from.
762
+
* @param {Phaser.Rectangle} from - The area to copy from the source image.
763
+
* @param {number} [x] - The x coordinate to translate to before drawing. If not specified it will default to `from.x`.
764
+
* @param {number} [y] - The y coordinate to translate to before drawing. If not specified it will default to `from.y`.
765
+
* @param {number} [rotate=0] - The angle in degrees to rotate the block to before drawing. Rotation takes place around the center by default, but can be changed with the `anchor` parameters.
766
+
* @param {number} [anchorX=0.5] - The anchor point around with the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.
767
+
* @param {number} [anchorY=0.5] - The anchor point around with the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right.
768
+
* @param {number} [scaleX=1] - The horizontal scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on.
769
+
* @param {number} [scaleY=1] - The vertical scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on.
770
+
* @param {number} [alpha=1] - The alpha that will be set on the context before the block is drawn. A value between 0 (fully transparent) and 1, opaque.
771
+
* @param {number} [blendMode='source-over'] - The composite blend mode that will be used when drawing the block. The default is no blend mode at all.
772
+
* @param {boolean} [roundPx=false] - Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances.
0 commit comments