Permalink
Browse files

expose PGraphics "g"

  • Loading branch information...
1 parent ea46020 commit eebd914cbaf0a5d278bf540f979d0a81ce26dc01 @jdf committed Oct 31, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 runtime/src/jycessing/PAppletJythonDriver.java
@@ -109,6 +109,7 @@ public PAppletJythonDriver(final InteractiveConsole interp,
populateBuiltins();
setFields();
builtins.__setitem__("this", Py.java2py(this));
+ builtins.__setitem__("g", Py.java2py(g));
builtins.__setitem__("exit", new PyObject() {
@Override
public PyObject __call__(final PyObject[] args, final String[] kws) {
@@ -238,9 +239,10 @@ private void checkForRendererChangeException(final Throwable t) {
*/
@Override
public void size(final int iwidth, final int iheight,
- final String irenderer, final String ipath) {
+ final String irenderer, final String ipath) {
super.size(iwidth, iheight, irenderer, ipath);
setFields();
+ builtins.__setitem__("g", Py.java2py(g));
}
@Override

0 comments on commit eebd914

Please sign in to comment.