FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

removed back reference to PImage from ImageCache (issue #1391) · h2oop/processing@3b64812 · GitHub

Repository navigation

Commit 3b64812

Browse files
committed
removed back reference to PImage from ImageCache (issue processing#1391)
1 parent 83c97b0 commit 3b64812

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎core/src/processing/core/PGraphicsJava2D.java‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@ protected void imageImpl(PImage who,
12581258
}
12591259

12601260
if (who.modified) {
1261-
cash.update(tint, tintColor);
1261+
cash.update(who, tint, tintColor);
12621262
who.modified = false;
12631263
}
12641264

@@ -1291,14 +1291,13 @@ protected void imageImpl(PImage who,
12911291

12921292

12931293
class ImageCache {
1294-
PImage source;
12951294
boolean tinted;
12961295
int tintedColor;
12971296
int tintedPixels[]; // one row of tinted pixels
12981297
BufferedImage image;
12991298

13001299
public ImageCache(PImage source) {
1301-
this.source = source;
1300+
// this.source = source;
13021301
// even if RGB, set the image type to ARGB, because the
13031302
// image may have an alpha value for its tint().
13041303
// int type = BufferedImage.TYPE_INT_ARGB;
@@ -1311,7 +1310,7 @@ public ImageCache(PImage source) {
13111310
* has changed, or the pixels have changed, so should just go through
13121311
* with the update without further checks.
13131312
*/
1314-
public void update(boolean tint, int tintColor) {
1313+
public void update(PImage source, boolean tint, int tintColor) {
13151314
int bufferType = BufferedImage.TYPE_INT_ARGB;
13161315
boolean opaque = (tintColor & 0xFF000000) == 0xFF000000;
13171316
if (source.format == RGB) {

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL