Skip to content

Commit

Permalink
deal with deprecation changes in PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
benfry committed Jan 20, 2020
1 parent 1cbdd36 commit 624e907
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion java/libraries/pdf/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/processing-core"/>
<classpathentry kind="lib" path="library/itext.jar" sourcepath="itext-src.zip"/>
<classpathentry combineaccessrules="false" kind="src" path="/processing4-core"/>
<classpathentry kind="output" path="bin"/>
</classpath>
4 changes: 2 additions & 2 deletions java/libraries/pdf/src/processing/pdf/PGraphicsPDF.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 624e907

Please sign in to comment.