BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Lienzo 1.0: A Scene Graph API In Java For The HTML5 Canvas

Lienzo 1.0: A Scene Graph API In Java For The HTML5 Canvas

This item in japanese

Emitrom, a company providing custom enterprise software application services, has recently released Lienzo 1.0 GA under the Apache Licence. Lienzo is a GWT library that implements a structured graphic toolkit in Java using the HTML5 Canvas as a back end. Lienzo builds upon the existing Canvas support of GWT (see demo) by offering a more advanced Java API geared towards rich animations, games, image processing etc.

Lienzo 1.0 offers the following graphic functions

There is a live demo showing several examples (some animated as well) along with their source code.

The Canvas element of HTML 5 is typically scripted in JavaScript using a very low level set of methods that manage the GUI in immediate mode. The basic Java API offered by GWT is just a thin layer over the JavaScript API, so it is still low level for most Enterprise developers. Emitrom extends this basic API into a full Scene Graph managed in retained mode. This makes possible all the advanced features (such as animations) outlined above.

Lienzo can be extended to support other shapes apart from those already included. Emitrom also exposes the core Context2D Object that offers direct access to the low level methods of the HTML5 canvas. It is therefore possible to develop functionality that is not included in Lienzo by default or even easily port native JavaScript code from existing Canvas applications for those who need this capability.

Finally with the addition of extra libraries offered by Emitrom, Lienzo can also run on iOS, or on the desktop via Adobe Air, further enhancing the cross-platform development idea introduced by Flash4j.

For more information, see the User Manual and Javadocs. Commercial support options are also available.

Rate this Article

Adoption
Style

BT