Fix copyPixels with sourceRect ~= 0.5 width or height (fixes #582)

This commit is contained in:
Joshua Granick
2015-09-23 20:53:29 -07:00
parent c92d72b3be
commit de6fceab18

View File

@@ -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;