Fix alpha point and offset in image copyPixels (fix openfl/openfl#1707)

This commit is contained in:
Joshua Granick
2017-09-12 13:21:41 -07:00
parent 3f011e5a6e
commit e56394ccd3
2 changed files with 4 additions and 6 deletions

View File

@@ -215,7 +215,6 @@ namespace lime {
ImageDataView alphaView = ImageDataView (alphaImage, &alphaRect);
int alphaPosition;
RGBA alphaPixel;
int alphaOffsetY = alphaView.y - destView.y;
if (blend) {
@@ -223,7 +222,7 @@ namespace lime {
sourcePosition = sourceView.Row (y);
destPosition = destView.Row (y);
alphaPosition = alphaView.Row (y + alphaOffsetY);
alphaPosition = alphaView.Row (y);
for (int x = 0; x < destView.width; x++) {
@@ -262,7 +261,7 @@ namespace lime {
sourcePosition = sourceView.Row (y);
destPosition = destView.Row (y);
alphaPosition = alphaView.Row (y + alphaOffsetY);
alphaPosition = alphaView.Row (y);
for (int x = 0; x < destView.width; x++) {