From 624e9074aeb1d9e2e6b2943e35ffd97a90b8b737 Mon Sep 17 00:00:00 2001 From: Ben Fry Date: Mon, 20 Jan 2020 14:54:38 -0500 Subject: [PATCH] deal with deprecation changes in PDF --- java/libraries/pdf/.classpath | 2 +- java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java/libraries/pdf/.classpath b/java/libraries/pdf/.classpath index bdc1ffbb23..472fa576c0 100644 --- a/java/libraries/pdf/.classpath +++ b/java/libraries/pdf/.classpath @@ -2,7 +2,7 @@ - + diff --git a/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java b/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java index ce72d44a15..d937afaf62 100644 --- a/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java +++ b/java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java @@ -177,7 +177,7 @@ static protected DefaultFontMapper getMapper() { // 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 @@ protected void imageImpl(PImage image, 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);