FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix for getNative() object type · szigyi/processing@8f959b8 · GitHub

Repository navigation

Commit 8f959b8

Browse files
committed
fix for getNative() object type
1 parent 1cd0624 commit 8f959b8

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class PGraphicsPDF extends PGraphicsJava2D {
6363
static protected String fontList[];
6464

6565

66-
public PGraphicsPDF() {
66+
public PGraphicsPDF() {
6767
// PDF always likes native fonts. Always.
6868
hint(ENABLE_NATIVE_FONTS);
6969
}
@@ -105,8 +105,8 @@ protected void defaultSettings() { // ignore
105105
super.defaultSettings();
106106
textMode = SHAPE;
107107
}
108-
109-
108+
109+
110110
public void beginDraw() {
111111
// long t0 = System.currentTimeMillis();
112112

@@ -210,8 +210,8 @@ static protected DefaultFontMapper getMapper() {
210210
}
211211
return mapper;
212212
}
213-
214-
213+
214+
215215
static protected void checkDir(String path, DefaultFontMapper mapper) {
216216
File folder = new File(path);
217217
if (folder.exists()) {
@@ -316,8 +316,8 @@ public void nextPage() {
316316
beginDraw();
317317
style(savedStyle);
318318
}
319-
320-
319+
320+
321321
protected Graphics2D createGraphics() {
322322
if (textMode == SHAPE) {
323323
return content.createGraphicsShapes(width, height);
@@ -604,7 +604,7 @@ public void addFonts(String directory) {
604604
* @return true if it's ok
605605
*/
606606
protected void checkFont() {
607-
Font awtFont = textFont.getNative();
607+
Font awtFont = (Font) textFont.getNative();
608608
if (awtFont == null) { // always need a native font or reference to it
609609
throw new RuntimeException("Use createFont() instead of loadFont() " +
610610
"when drawing text using the PDF library.");

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL