deal with deprecation changes in PDF

This commit is contained in:
Ben Fry
2020-01-20 14:54:38 -05:00
parent 1cbdd36ec7
commit 624e9074ae
2 changed files with 3 additions and 3 deletions
@@ -177,7 +177,7 @@ public class PGraphicsPDF extends PGraphicsJava2D {
// long t = System.currentTimeMillis();
mapper = new DefaultFontMapper();
if (PApplet.platform == PConstants.MACOSX) {
if (PApplet.platform == PConstants.MACOS) {
try {
String homeLibraryFonts =
System.getProperty("user.home") + "/Library/Fonts";
@@ -428,7 +428,7 @@ public class PGraphicsPDF extends PGraphicsJava2D {
scale((x2 - x1) / imageWidth,
(y2 - y1) / imageHeight);
if (u2-u1 == imageWidth && v2-v1 == imageHeight) {
g2.drawImage(image.getImage(), 0, 0, null);
g2.drawImage((Image) image.getNative(), 0, 0, null);
} else {
PImage tmp = image.get(u1, v1, u2-u1, v2-v1);
g2.drawImage((Image) tmp.getNative(), 0, 0, null);