| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -413,7 +413,13 @@ protected void imageImpl(PImage image, | |||
| 413 | 413 | int imageHeight = image.height; | |
| 414 | 414 | scale((x2 - x1) / (float)imageWidth, | |
| 415 | 415 | (y2 - y1) / (float)imageHeight); | |
| 416 | - g2.drawImage(image.getImage(), u1, v1, null); | ||
| 416 | + if (u2-u1 != imageWidth || v2-v1 != imageHeight) { | ||
| 417 | + PImage tmp = new PImage(u2-u1, v2-v1, ARGB); | ||
| 418 | + tmp.copy(image, u1, v1, u2, v2, 0, 0, u2-u1, v2-v1); | ||
| 419 | + g2.drawImage(image.getImage(), 0, 0, null); | ||
| 420 | + } else { | ||
| 421 | + g2.drawImage(image.getImage(), u1, v1, null); | ||
| 422 | + } | ||
| 417 | 423 | popMatrix(); | |
| 418 | 424 | } | |
| 419 | 425 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments