Fix copyPixels with sourceRect ~= 0.5 width or height (fixes #582)
This commit is contained in:
@@ -88,7 +88,7 @@ class ImageCanvasUtil {
|
||||
|
||||
public static function copyPixels (image:Image, sourceImage:Image, sourceRect:Rectangle, destPoint:Vector2, alphaImage:Image = null, alphaPoint:Vector2 = null, mergeAlpha:Bool = false):Void {
|
||||
|
||||
if (destPoint == null || destPoint.x >= image.width || destPoint.y >= image.height || sourceRect == null || sourceRect.width <= 0 || sourceRect.height <= 0) {
|
||||
if (destPoint == null || destPoint.x >= image.width || destPoint.y >= image.height || sourceRect == null || sourceRect.width < 1 || sourceRect.height < 1) {
|
||||
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user