My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Wiki pages
Links

GWT Graphics

The goal of the GWT Graphics library is to provide a consistent cross-browser vector graphics library for Google Web Toolkit. GWT Graphics uses SVG and VML for creating graphics.

Supported browsers

The library has been tested to work with the following browsers:

  • Internet Explorer 6 and newer (6,7 and 8 use VML rendering, 9 uses SVG)
  • Firefox 3.0 and newer
  • Safari 3.2 and newer
  • Opera 9.6 and newer
  • Google Chrome

How to use it?

Download gwt-graphics.jar (see release notes too) and add it to the classpath of your project. In addition, you have to add the following line to the Module XML file of the project:

<inherits name='org.vaadin.gwtgraphics.GWTGraphics'/>

After the above two steps, you can use GWT Graphics in your project. To draw something with the library, you have to add an instance of DrawingArea to your application:

DrawingArea canvas = new DrawingArea(400, 400);
panel.add(canvas);

After that you can start drawing. For example, the following code draws a red circle :

Circle circle = new Circle(100, 100, 50);
circle.setFillColor("red");
canvas.add(circle);

Discussion

If you have any questions or problems with the library, feel free to use the discussion group of the project.

Demos & examples

Powered by Google Project Hosting