> I seem to have started down a possibly foolish path and I wanted to
> get some feedback.
Nothing foolish about this -- several piccolo developers have thoughts
in this direction as well.
> I have started porting Piccolo to the new HTML5 Canvas API.
> Basically I am using GWT to take as much of the Java Code from
> Piccolo2D and use the project gwt-canvas to provide the Graphics2D
> type functionality. Since Piccolo depends so heavily on java.awt and
> java.awt.geom and the awt packages are not supported in GWT I am
> including a copy of those source files in the GWT project. For
> example, Piccolo depends on java.awt.Rectangle, so I copy the existing
> Rectangle class to a java.gwt.Rectangle and simply change the import
> statement in the Piccolo code.
I don't think copying java code through GWT is the right direction to
> Copying the awt classes looks like it is going to work in general but
> there are few problems which have shown themselves. First, most of the
> geometry type classes (Rectangle2D, Point2D, etc) only depend on them
> selves and java.lang.Math, so this makes them viable classes to be
> used with GWT, but some of them depends on internal sun.java.bla.bla.*
> classes, which I don't currently have the source code for. The second
> problem as I have not had a chance to review the legal issue in
> reusing Oracle's code in this way. I has occurred to me I might have
> better luck taking the code from Apache's project harmony, but again I
> have not gotten that far. For that matter I am not sure about altering
> the Piccolo2D code either.
Piccolo2D's license is clear. So is Project Harmony's. Using JDK
code is much more iffy.
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en