Java Reference
In-Depth Information
A full exploration of the SVG and SVG Tiny formats is beyond the scope of this chap-
ter; if you're interested in the nuts and bolts of the standard, you can start by looking at
the W3C standards at http://www.w3c.org/TR and the wealth of information available on
the Internet. In print, a good place to start is Kurt Cagle's discussion of the standard in his
book SVG Programming: The Graphical Web (Apress, 2002).
Understanding the Organization of the SVGAPI
SVG support for Java ME began with JSR 226. Compatible with SVG Tiny 1.1, it provided a
set of packages that includes support for basic rendering of SVG images and animated
images, as well as handling user events from SVG images. The standards community
quickly replaced JSR 226 with JSR 287, which provides better support for animation and
an SVG document's DOM.
Tip As I write this, NetBeans 6.1 and the majority of devices with any SVG support only provide support
for the SVGAPI that JSR 226 provides. Moving forward, however, I believe that the majority of SVG-enabled
devices and development environments will support JSR 287, so throughout the remainder of this chapter, I
focus on JSR 287.
The SVGAPI that both JSR 226 and JSR 287 describe provides support for several
aspects of vector graphics rendering. Key, of course, is the high-level rendering API that JSR
287 provides. However, JSR 287 also provides interfaces that provide an encapsulation of
the SVG DOM. It also provides SVG events, SVG animation through the Synchronized Mul-
timedia Integration Language (SMIL), and an optional package that defines interfaces for
high-performance immediate-mode rendering (in which the API does not keep a full
model of the objects being rendered) that vendors can implement to give applications
access to hardware rendering engines.
The SVGAPI provides the following packages:
javax.microedition.m2g : The high-level interfaces for document rendering
javax.microedition.vectorgraphics : Optional high-performance, immediate-mode
rendering APIs that the SVGAPI and other applications can use
org.w3c.dom : Interfaces that provide a subset of the DOM Level 3 Core API for
managing XML DOMs
org.w3c.dom.events : Event interfaces for the DOM Level 3 Core API
org.w3c.dom.smil : Interfaces for rendering SMIL animation
 
Search WWH ::




Custom Search