| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 83c97b0 commit 3b64812
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1258,7 +1258,7 @@ protected void imageImpl(PImage who, | |||
| 1258 | 1258 | } | |
| 1259 | 1259 | ||
| 1260 | 1260 | if (who.modified) { | |
| 1261 | - cash.update(tint, tintColor); | ||
| 1261 | + cash.update(who, tint, tintColor); | ||
| 1262 | 1262 | who.modified = false; | |
| 1263 | 1263 | } | |
| 1264 | 1264 | ||
@@ -1291,14 +1291,13 @@ protected void imageImpl(PImage who, | |||
| 1291 | 1291 | ||
| 1292 | 1292 | ||
| 1293 | 1293 | class ImageCache { | |
| 1294 | - PImage source; | ||
| 1295 | 1294 | boolean tinted; | |
| 1296 | 1295 | int tintedColor; | |
| 1297 | 1296 | int tintedPixels[]; // one row of tinted pixels | |
| 1298 | 1297 | BufferedImage image; | |
| 1299 | 1298 | ||
| 1300 | 1299 | public ImageCache(PImage source) { | |
| 1301 | - this.source = source; | ||
| 1300 | + // this.source = source; | ||
| 1302 | 1301 | // even if RGB, set the image type to ARGB, because the | |
| 1303 | 1302 | // image may have an alpha value for its tint(). | |
| 1304 | 1303 | // int type = BufferedImage.TYPE_INT_ARGB; | |
@@ -1311,7 +1310,7 @@ public ImageCache(PImage source) { | |||
| 1311 | 1310 | * has changed, or the pixels have changed, so should just go through | |
| 1312 | 1311 | * with the update without further checks. | |
| 1313 | 1312 | */ | |
| 1314 | - public void update(boolean tint, int tintColor) { | ||
| 1313 | + public void update(PImage source, boolean tint, int tintColor) { | ||
| 1315 | 1314 | int bufferType = BufferedImage.TYPE_INT_ARGB; | |
| 1316 | 1315 | boolean opaque = (tintColor & 0xFF000000) == 0xFF000000; | |
| 1317 | 1316 | if (source.format == RGB) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments