Browse Prior Art Database

A method to weblize Java2D graphics using HTML Canvas

IP.com Disclosure Number: IPCOM000220188D
Publication Date: 2012-Jul-25
Document File: 4 page(s) / 81K

Publishing Venue

The IP.com Prior Art Database

Abstract

The Java2D API is a set of classes for advanced 2D graphics and imaging, encompassing line art, text, and images in a single comprehensive model. The invention provides a way to allow traditional Java2D graphics being displayed on browsers so that the existing Java2D application can be weblized with no or little modification.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 53% of the total text.

Page 01 of 4

A method to weblize Java2D graphics using HTML Canvas

The Java2D API is a set of classes for advanced 2D graphics and imaging, encompassing line art, text, and images in a single comprehensive model. The invention provides a way to allow traditional Java2D graphics being displayed on browsers so that the existing Java2D application can be weblized with no or little modification.

Prior arts

Abstractcanvas: https://code.google.com/p/abstractcanvas/.

AbstractCanvas is a GWT project that sits on top of HTML Canvas and Java2D, provides an API and its implementations, based on the HTML Canvas, to provide a graphics engine for both GWT and AWT, unifying client-side and server-side graphics development.

However, AbstractCanvas following drawbacks:
High coupling -- AbstractCanvas heavily relies on GWT so that it won't work without GWT runtime.


1.

Code intrusion -- In order to use AbstractCanvas, the application needs to be coded using APIs provided AbstractCanvas. Existing application can't be


2.

reused directly without any modification.

Compile time -- AbstractCanvas provides code-to-code conversion at compile time.


3.

4.

This invention provides an out-of-box engine which reads any Java2D graphics in your application and renders them in your browser using HTML canvas.

Advantages: Existing Java2D application can be reused and weblized


1.


2.

Mobile friendly


3.

No dependency on other 3rd party components


4.


5.

Basic work follow:

No or little modification

1


Page 02 of 4


1.

Intercept Java2D graphic objects into graphic container during Java2D drawing by using AOP injection.


2.

Convert the graphic objects inside the container to interim objects which matches corresponding graphics in HTML canvas.


3.

Generate HTML canvas objects and draw the graphic objects on it.


4.

Details:

Respond with JSON strings or HTML pages to the browsers.

2


Page 03 of 4

-
Java2D sample code

public void p...