Skip to content

Commit 759a30f

Browse files
committed
Update readme
1 parent 479f5a6 commit 759a30f

2 files changed

Lines changed: 3 additions & 55 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
v2.3.0 Abandon Processing Value Noise in favour of OpenSimplex2, whith choosable options
1+
v2.3.0 Abandon Processing Value Noise in favour of OpenSimplex2, with choosable options. Added pdf library using iText5.
22

33
v2.2.0 Bump to latest JOGL-rc January 2021
44

src/main/java/processing/pdf/PGraphicsPDF.java

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -229,58 +229,6 @@ public void endDraw() {
229229
popMatrix();
230230
}
231231

232-
/**
233-
* Gives the same basic functionality of File.exists but can be used to look
234-
* for removable media without showing a system dialog if the media is not
235-
* present.Workaround pulled from the
236-
* <A HREF="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4089199">
237-
* bug report</A> on bugs.sun.com.This bug was fixed in Java 6, and we can
238-
* remove the workaround when we start requiring Java 6.
239-
*
240-
* @param file
241-
* @return
242-
*/
243-
protected static boolean fileExists(File file) {
244-
try {
245-
Process process
246-
= Runtime.getRuntime().exec(new String[]{
247-
"cmd.exe", "/c", "dir", file.getAbsolutePath()
248-
});
249-
250-
// We need to consume all available output or the process will block.
251-
boolean haveExitCode = false;
252-
int exitCode = -1;
253-
InputStream out = process.getInputStream();
254-
InputStream err = process.getErrorStream();
255-
256-
while (!haveExitCode) {
257-
while (out.read() >= 0) {
258-
}
259-
while (err.read() >= 0) {
260-
}
261-
262-
try {
263-
exitCode = process.exitValue();
264-
haveExitCode = true;
265-
} catch (IllegalThreadStateException e) {
266-
// Not yet complete.
267-
Thread.sleep(100);
268-
}
269-
}
270-
//int exitCode = process.waitFor();
271-
return exitCode == 0;
272-
273-
} catch (IOException e) {
274-
System.out.println("Unable to check for file: " + file + " : " + e);
275-
return false;
276-
277-
} catch (InterruptedException e) {
278-
System.out.println("Unable to check for file. Interrupted: "
279-
+ file + " : " + e);
280-
return false;
281-
}
282-
}
283-
284232
/**
285233
* Call to explicitly go to the next page from within a single draw().
286234
*/
@@ -321,7 +269,7 @@ public void dispose() {
321269

322270
/**
323271
* Don't open a window for this renderer, it won't be used.
324-
* @return
272+
* @return
325273
*/
326274
@Override
327275
public boolean displayable() {
@@ -626,7 +574,7 @@ protected void checkFont() {
626574
/**
627575
* List the fonts known to the PDF renderer.This is like PFont.list(),
628576
however not all those fonts are available by default.
629-
* @return
577+
* @return
630578
*/
631579
static public String[] listFonts() {
632580
if (fontList == null) {

0 commit comments

Comments
 (0)