Discussion:
Jython experiment update [unsucessful]
Stuart Axon
2009-08-24 11:36:35 UTC
Permalink
Hi
I wanted to see if there were differences between cairo + python and cairo + java.
[bottom line: there is :)]
If they weren't very different I was thinking of trying the java bindings via jython to get shoebot in the browser working...


Differences included:

Imports come from
org.gnome.gtk
not
gtk

event handling is also different (using Event objects, which native cairo does not).


I also briefly looked at IronPython and noted the same sort of differences.


In future ctypes is coming to both Jython and Ironpython, meaning that you could do something connect to native cairo from Jython in a java applet.


For now, the other options people have mentioned are probably the easiest for getting things working in a browser:
Jython + Java2D backend
or connect to canvas somehow.

A possible idea for a backend could be a Processing backend via jython, but I suspect we'd be opening a whole different can of worms there :)


If anyone knows how easy it is to make alternate graphical backends then I'm definitely interested, however I don't have any knowledge of Java2D so far.


Notes on porting javacairo to pythoncairo are here:
[http://www.stuartaxon.com/2009/08/21/using-java2python-to-port-a-javacairo-tutorial/]


Best Regards
Stuart
Stuart Axon
2009-08-24 23:29:02 UTC
Permalink
Oops, should've proof read this; some terrible grammar, also by native bindings I mean CPython cairo bindings :)



----- Original Message ----
From: Stuart Axon <stuaxo2-/***@public.gmane.org>
To: shoebox mailing list <shoebot-devel-***@public.gmane.org>
Sent: Monday, August 24, 2009 12:36:35 PM
Subject: [shoebot-devel] Jython experiment update [unsucessful]

Hi
I wanted to see if there were differences between cairo + python and cairo + java.
[bottom line: there is :)]
If they weren't very different I was thinking of trying the java bindings via jython to get shoebot in the browser working...


Differences included:

Imports come from
org.gnome.gtk
not
gtk

event handling is also different (using Event objects, which native cairo does not).


I also briefly looked at IronPython and noted the same sort of differences.


In future ctypes is coming to both Jython and Ironpython, meaning that you could do something connect to native cairo from Jython in a java applet.


For now, the other options people have mentioned are probably the easiest for getting things working in a browser:
Jython + Java2D backend
or connect to canvas somehow.

A possible idea for a backend could be a Processing backend via jython, but I suspect we'd be opening a whole different can of worms there :)


If anyone knows how easy it is to make alternate graphical backends then I'm definitely interested, however I don't have any knowledge of Java2D so far.


Notes on porting javacairo to pythoncairo are here:
[http://www.stuartaxon.com/2009/08/21/using-java2python-to-port-a-javacairo-tutorial/]


Best Regards
Stuart
ricardo lafuente
2009-09-03 11:24:54 UTC
Permalink
hmm, some really interesting food for thought here :-) TBH i ran away
from Java as soon as i heard about Python, so my input here is somewhat
limited.

anyhow, the idea of using Jython to access the Java2D engine is great
stuff -- we'd only need to create a new Java2DCanvas that could call
java2d commands via jython. Or is it more complex than this?

And a processing backend makes a lot of sense (and a lot of worms
lurking indeed :) but isn't this basically having the java2d or opengl
renderer? OTOH, would be nice to make a Pythonic version of processing,
since there's a lot of commands in Processing that Nodebox lacks, and
which would be very very useful for getting designers who learned
Processing into Python.
Post by Stuart Axon
Oops, should've proof read this; some terrible grammar, also by native bindings I mean CPython cairo bindings :)
----- Original Message ----
Sent: Monday, August 24, 2009 12:36:35 PM
Subject: [shoebot-devel] Jython experiment update [unsucessful]
Hi
I wanted to see if there were differences between cairo + python and cairo + java.
[bottom line: there is :)]
If they weren't very different I was thinking of trying the java bindings via jython to get shoebot in the browser working...
Imports come from
org.gnome.gtk
not
gtk
event handling is also different (using Event objects, which native cairo does not).
I also briefly looked at IronPython and noted the same sort of differences.
In future ctypes is coming to both Jython and Ironpython, meaning that you could do something connect to native cairo from Jython in a java applet.
Jython + Java2D backend
or connect to canvas somehow.
A possible idea for a backend could be a Processing backend via jython, but I suspect we'd be opening a whole different can of worms there :)
If anyone knows how easy it is to make alternate graphical backends then I'm definitely interested, however I don't have any knowledge of Java2D so far.
[http://www.stuartaxon.com/2009/08/21/using-java2python-to-port-a-javacairo-tutorial/]
Best Regards
Stuart
_______________________________________________
Shoebot-devel mailing list
http://lists.tinkerhouse.net/listinfo.cgi/shoebot-devel-tinkerhouse.net
_______________________________________________
Shoebot-devel mailing list
http://lists.tinkerhouse.net/listinfo.cgi/shoebot-devel-tinkerhouse.net
Loading...