mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
remove some eclipse warnings, and add a new PImage constructor
This commit is contained in:
+4
-4
@@ -971,11 +971,11 @@ public class PFont implements PConstants {
|
||||
// GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
Class geClass = Class.forName("java.awt.GraphicsEnvironment");
|
||||
Method glgeMethod =
|
||||
geClass.getMethod("getLocalGraphicsEnvironment", null);
|
||||
Object ge = glgeMethod.invoke(null, null);
|
||||
geClass.getMethod("getLocalGraphicsEnvironment", (Class[]) null);
|
||||
Object ge = glgeMethod.invoke((Class[]) null, (Object[]) null);
|
||||
|
||||
Method gafMethod = geClass.getMethod("getAllFonts", null);
|
||||
Font fonts[] = (Font[]) gafMethod.invoke(ge, null); //ge.getAllFonts();
|
||||
Method gafMethod = geClass.getMethod("getAllFonts", (Class[]) null);
|
||||
Font fonts[] = (Font[]) gafMethod.invoke(ge, (Object[]) null); //ge.getAllFonts();
|
||||
String list[] = new String[fonts.length];
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
list[i] = fonts[i].getName();
|
||||
|
||||
Reference in New Issue
Block a user