File: architecture.xml

package info (click to toggle)
batik 1.18%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 28,972 kB
  • sloc: java: 192,233; xml: 19,449; javascript: 1,276; sh: 85; makefile: 5
file content (121 lines) | stat: -rw-r--r-- 7,422 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?xml version="1.0"?>

<!--

   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

-->

<!-- ========================================================================= -->
<!-- author vincent.hardy@eng.sun.com                                          -->
<!-- version $Id$ -->
<!-- ========================================================================= -->

<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
  <header>
    <title>Architecture overview</title>
  </header>

  <body>
    <p>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 <a href="http://opensource.objectsbydesign.com/batik/index.html">Object by Design</a>
      or <a href="http://www.yworks.com/products/yDoc/showcase/batik-1.5/">yWorks</a>.</p>
    <p>The Batik modules are of one of three types:
      application modules, core modules and low level modules.
      The following figure illustrates these three module types.</p>
    <div class="figure"><img src="images/HighLevelArchitecture.png" alt="Batik Architecture" />
    </div>
    <p><a href="#applicationComponents">Application modules</a> illustrate how to use
      the core modules and let users evaluate the Batik software by experimenting
      with its features.</p>
    <p>The <a href="#coreComponents">Core modules</a> are the heart of Batik and the primary deliverables for the 
      projects. These are the modules developers use to manipulate, generate, create, 
      convert, render and view SVG content.</p>
    <p>Finally, the <a href="#lowLevelComponents">Low level modules</a> are used internally by the core modules to 
      accomplish their work. These modules are not typically used by developers directly.</p> 

    <section id="applicationComponents">
      <title>Application modules</title>
      <p>As mentioned earlier, the application modules illustrate the functionality that Batik
        offers. </p>
      <p>For example, the <a href="site:browser">SVG browser</a> is built using several
        Batik core modules (such as the <code>JSVGCanvas</code> GUI component and the <code>ImageTranscoder</code>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).</p>
      <p>The <a href="site:pretty-printer">SVG pretty printer</a> 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.</p>
      <p>The <a href="site:font-converter">SVG font converter</a> 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 TrueType Font format to the SVG font format.</p>
      <p>Finally, the <a href="site:rasterizer">SVG rasterizer</a> shows how to leverage the     
        <a href="site:transcoder">transcoder API</a> to convert to and from SVG content.</p> 
      <p>
        Note that even though the application modules are meant to be useful 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.</p>
    </section>

    <section id="coreComponents">
      <title>Core modules</title>
      <p>The Batik core modules are the heart of the Batik architecture. They can be used individually
        or in combination for various purposes, and the <a href="#applicationComponents">application modules</a>
        offer some usage examples.
      </p>
      <ul>
        <li>The <a href="site:generator">SVG generator</a> is a module containing
          <code><a href="../javadoc/org/apache/batik/svggen/SVGGraphics2D.html">SVGGraphics2D</a></code>
          class, that lets all Java applications or applets 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.</li>
        <li><a href="site:dom-api">SVG DOM</a> an implementation of the SVG DOM API defined
          in the SVG recommendation. It lets the programmer manipulate SVG documents in a Java program.</li>
        <li>The <a href="site:swing">Swing components</a> module includes, primarily, the
          <code><a href="../javadoc/org/apache/batik/swing/JSVGCanvas.html">JSVGCanvas</a></code>
          class, a UI component that can display SVG content and let the user
          interact with that content (zoom, pan, rotate, select text, etc.).</li>
        <li>The <strong>Bridge</strong> module is rarely used directly. It is responsible for creating 
          and maintaining an appropriate object corresponding to an SVG element. The bridge converts an
          SVG document into the internal representation Batik uses for graphics (GVT, the 
          Graphic Vector Toolkit).</li>
        <li>The <a href="site:transcoder">transcoder</a> is a module that provides a generic API for 
          transcoding an input to an output. This module transcodes an input stream or a document 
          into a particular ouput format, used for converting SVG documents to other types.</li>
      </ul>
    </section>

    <section id="lowLevelComponents">
      <title>Low level modules</title>
      <p>The low level modules are not expected to be used directly by developers using the Batik
        API. Rather, they support the operation of the core modules. The low level modules
        include:</p>
      <ul>
        <li>The <strong>Graphic Vector Toolkit</strong> (GVT) module, which represents a view of the DOM tree
          that is more suitable for for rendering and event handling purposes. This module describes 
          DOM tree in terms of a tree of Java graphics objects.</li>
        <li>The <strong>Renderer</strong> module 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 deemed necessary and does not have to be raster based.</li>
        <li>The <a href="site:parsers">SVG parser</a> module contains parser classes for complex 
          SVG attributes such as the <code>transform</code> or <code>color</code> attributes. Higher level modules 
          rely on the SVG parser module.</li>
      </ul>
    </section>
  </body>
</document>