use of processing.core.PApplet in project geomerative by rikrd.
the class HelloSplittingShapesTest method setUp.
public void setUp() {
PApplet applet = new PApplet();
RG.init(applet);
RSVG svgLoader = new RSVG();
// need to be in the geomerative directory for this to work
poly = svgLoader.toGroup("./tutorial/Tutorial_13_HelloSplittingShapes/data/bot1.svg").toPolygon();
}
use of processing.core.PApplet in project hid-serial by rayshobby.
the class G4P method setCursor.
public static void setCursor(int cursorOff, GWindow window) {
PApplet app = window.papplet;
setCursor(cursorOff, app);
}
use of processing.core.PApplet in project hid-serial by rayshobby.
the class GWindowCloser method post.
public void post() {
// System.out.println("Window to dispose " + toDisposeOf.size());
if (!toDisposeOf.isEmpty()) {
for (GWindow gwindow : toDisposeOf) {
PApplet wapp = gwindow.papplet;
GWindowInfo winfo = G4P.windows.get(wapp);
if (winfo != null) {
winfo.dispose();
G4P.windows.remove(wapp);
gwindow.dispose();
}
}
toDisposeOf.clear();
}
}
use of processing.core.PApplet in project hid-serial by rayshobby.
the class G4P method addWindow.
/**
* Register a GWindow object.
*
* @param window
*/
static void addWindow(GWindow window) {
PApplet app = window.papplet;
GWindowInfo winfo = windows.get(app);
if (winfo == null) {
winfo = new GWindowInfo(app);
windows.put(app, winfo);
}
// Create and start windows closer object
if (windowCloser == null) {
windowCloser = new GWindowCloser();
sketchApplet.registerMethod("post", windowCloser);
}
}
use of processing.core.PApplet in project hid-serial by rayshobby.
the class G4P method removeControl.
/**
* Remove a control from the window. This is used in preparation
* for disposing of a control.
* @param control
* @return true if control was remove else false
*/
static boolean removeControl(GAbstractControl control) {
PApplet app = control.getPApplet();
GWindowInfo winfo = windows.get(app);
if (winfo != null) {
winfo.removeControl(control);
return true;
}
return false;
}
Aggregations