Monday, December 1st, 2008

AbstractCanvas: HTML Canvas and Java2D in one fell swoop

Category: Canvas, GWT, Java

Rodrigo Reyes has announced a new project called AbstractCanvas, a GWT project that sits on top of HTML Canvas and Java2D.

The same code can thus run in the browser, or on the server.

You can then write code such as:

VerticalPanel vPanel = new VerticalPanel();

CanvasPanelExt canvas1 = new CanvasPanelExt(300,150);

canvas1.fillRect(0, 0, canvas1.getCoordWidth(), canvas1.getCoordHeight());

canvas1.addCanvasPainter(new ColorTest()); // <- Note the use of CanvasPainter here canvas1.addCanvasPainter(new PathTest()); <- and here vPanel.add(canvas1); [/java]

Posted by Dion Almaer at 7:09 am
Comment here

3.8 rating from 16 votes

Comments Here »

Comments feed TrackBack URI

Leave a comment

You must be logged in to post a comment.