Reverted changes with strength

This actually broke DropShadow
This commit is contained in:
Łukasz Modliński
2018-11-19 21:32:59 +01:00
committed by Joshua Granick
parent 06982a4ac2
commit c72362f028

View File

@@ -783,27 +783,25 @@ class ImageDataUtil {
var x: Int; var x: Int;
var y: Int; var y: Int;
if (strength != 1) { if (offset <= 0) {
if (offset <= 0) { y = 0;
y = 0; while (y < h) {
while (y < h) { x = 0;
x = 0; while (x < w) {
while (x < w) { translatePixel(imgB, sourceImage.rect, image.rect, destPoint, x, y, strength);
translatePixel(imgB, sourceImage.rect, image.rect, destPoint, x, y, strength); x += 1;
x += 1;
}
y += 1;
} }
} else { y += 1;
y = h-1; }
while (y >= 0 ) { } else {
x = w-1; y = h-1;
while (x >= 0) { while (y >= 0 ) {
translatePixel(imgB, sourceImage.rect, image.rect, destPoint, x, y, strength); x = w-1;
x -= 1; while (x >= 0) {
} translatePixel(imgB, sourceImage.rect, image.rect, destPoint, x, y, strength);
y -= 1; x -= 1;
} }
y -= 1;
} }
} }
@@ -815,7 +813,8 @@ class ImageDataUtil {
if (imagePremultiplied) image.premultiplied = true; if (imagePremultiplied) image.premultiplied = true;
if (sourceImagePremultiplied) sourceImage.premultiplied = true; if (sourceImagePremultiplied) sourceImage.premultiplied = true;
return sourceImage; if (imgA == sourceImage.data) return sourceImage;
return image;
} }