Merge pull request #5029 from JakubValtar/fix-tint

Fix typos made during pixelDensity update
This commit is contained in:
Ben Fry
2017-04-25 20:02:40 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1684,7 +1684,7 @@ public class PGraphicsJava2D extends PGraphics {
WritableRaster wr = image.getRaster();
if (tint) {
if (tintedTemp == null || tintedTemp.length != source.pixelWidth) {
tintedTemp = new int[source.pixelHeight];
tintedTemp = new int[source.pixelWidth];
}
int a2 = (tintColor >> 24) & 0xff;
// System.out.println("tint color is " + a2);
@@ -1166,7 +1166,7 @@ public class PGraphicsFX2D extends PGraphics {
tintedTemp[x] = hi | (source.pixels[index++] & 0xFFFFFF);
}
//wr.setDataElements(0, y, source.width, 1, tintedTemp);
pw.setPixels(0, y, source.pixelWidth, 1, argbFormat, tintedTemp, 0, source.pixelHeight);
pw.setPixels(0, y, source.pixelWidth, 1, argbFormat, tintedTemp, 0, source.pixelWidth);
}
} else {
int index = 0;