









































|
This document briefly describes the Batik architecture and the role of each of
its modules. For detailed module design, you can refer to the
Batik UML diagrams.
The Batik modules are of one of three types:
The following figure illustrates these three module types.

Application Modules illustrate how to use
the Core Modules and let users evaluate the Batik software by experimenting
with its features.
The Core Modules are the heart of Batik and the primary deliverables for the
projects. These are the modules developers use to manipulate, generate, create,
convert and render SVG content
Finally, the Low Level Modules are used internally by the Core Modules to
accomplish their work. These modules are not typically used by developers directly.
|
As mentioned earlier, the Application Modules illustrate the functionality that Batik
offers.
For example, the SVG Browser is built using several
Batik Core Modules (such as the JSVGCanvas GUI component and the ImageTranscoder s)
and illustrates how Batik lets you not only view, zoom, pan and rotate SVG documents, but also search them
and convert them to other formats (such as JPEG, TIFF or PNG).
The SVG Pretty Printer is another example that shows how Batik
lets you manipulate and transform SVG content, here for the purposed of tidying up potentially
disorganized SVG files
The SVG Font Converter illustrates how Batik can help you embed
SVG Font definitions in an SVG file by providing an application that converts ranges of characters
from a True Type Font format to the SVG Font format.
Finally, the SVG Rasterizer shows how to leverage the
Transcoder API to convert to and from SVG content
Note that even though the Application Modules are meant to be usefull and fun to use, they
are not the primary deliverables of the Batik project. Instead, they are illustrations of how the
Batik core modules might be used and combined.
|
The Batik core modules are the heart of the Batik architecture. They can be used individually
or in combinations for various purposes, and the Application Modules
offer some usage examples.
SVGGraphics2D is a modules that lets all
Java technology applications easily convert their graphics to the SVG format, as easily as
they draw to a screen or a printer, by leveraging the Java 2D API's extensible design.
SVG DOM an implementation of the SVG DOM API defined
in the SVG recommendation. It lets the programmer manipulate SVG documents in a Java program.
JSVGCanvas is a UI component that can display
SVG content and let the user interact with that content (zoom, pan, rotate, text selection, etc...)
Bridge this module, more rarely used directly, can convert an
SVG document into the internal representation Batik uses for graphics, based on the
Graphic Vector Toolkit, GVT
|
The Low Level Modules are not expected to be used directly by developers using the Batik
API. Rather, they are supporting the operation of the Core Modules. The Low Level Modules
include:
- The
Graphic Vector Toolkit (GVT), which represents a view of the DOM tree
that is more suitable for for rendering and event handling purposes.
- The
Renderer is responsible for rendering a GVT tree and any
related task. For example, a raster based Renderer may perform
some caching (the default Renderer in Batik does that). However, a Renderer could perform
any task it deems necessary and does not have to be raster based.
- The
Micro Parsers . These are parsers for complex SVG attributes such as
transform or color attributes, which higher level modules
rely on
|
|
|