Skip to content

Commit 624e907

Browse files
committed
deal with deprecation changes in PDF
1 parent 1cbdd36 commit 624e907

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

java/libraries/pdf/.classpath

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<classpath>
33
<classpathentry kind="src" path="src"/>
44
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5-
<classpathentry combineaccessrules="false" kind="src" path="/processing-core"/>
65
<classpathentry kind="lib" path="library/itext.jar" sourcepath="itext-src.zip"/>
6+
<classpathentry combineaccessrules="false" kind="src" path="/processing4-core"/>
77
<classpathentry kind="output" path="bin"/>
88
</classpath>

java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static protected DefaultFontMapper getMapper() {
177177
// long t = System.currentTimeMillis();
178178
mapper = new DefaultFontMapper();
179179

180-
if (PApplet.platform == PConstants.MACOSX) {
180+
if (PApplet.platform == PConstants.MACOS) {
181181
try {
182182
String homeLibraryFonts =
183183
System.getProperty("user.home") + "/Library/Fonts";
@@ -428,7 +428,7 @@ protected void imageImpl(PImage image,
428428
scale((x2 - x1) / imageWidth,
429429
(y2 - y1) / imageHeight);
430430
if (u2-u1 == imageWidth && v2-v1 == imageHeight) {
431-
g2.drawImage(image.getImage(), 0, 0, null);
431+
g2.drawImage((Image) image.getNative(), 0, 0, null);
432432
} else {
433433
PImage tmp = image.get(u1, v1, u2-u1, v2-v1);
434434
g2.drawImage((Image) tmp.getNative(), 0, 0, null);

0 commit comments

Comments
 (0)