Frequently Asked Questions

Frequently Asked Questions

Frequently Asked Questions Table of contents 1 Questions............................................................................................................................2 1.1 1. General questions...................................................................................................... 2 1.2 2. Getting started with Apache Batik/SVG................................................................... 6 1.3 3. Troubleshooting Apache Batik..................................................................................7 1.4 4. How do I contribute to Batik Development?...........................................................12 PDF created by Apache FOP http://xmlgraphics.apache.org/fop/ Frequently Asked Questions Questions 1. General questions 1.1. What is Batik? Batik is a Java(tm) technology based toolkit for applications or applets that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such as viewing, generation or manipulation. It is the ambition of this project to give developers a set of core modules which can be used together or individually to support specific SVG solutions. Examples of modules are an SVG parser, an SVG generator and an SVG DOM implementations. Another ambition of the Batik project is to make it highly extensible (for example, Batik allows the developer to handle custom SVG tags). Even though the goal of the project is to provide a set of core modules, one of the deliveries is a full fledged SVG Browser implementation which validates the various modules and their inter-operability. Batik provides building blocks that developers can assemble in various ways in their Java technology applications or applets to generate, parse, view or convert SVG contents. For example, Batik contains a Swing component that can add SVG viewing capability to all Java technology applications or applets. Batik can also be used to generate SVG on a client or on a server, and Batik can convert SVG content into other formats such as JPEG, PNG or Tiff or other formats ( transcoder API). Batik's goal is to make it easy for developers to handle SVG content for many purposes, client-side or server-side, as illustrated in the diagram. 1.2. What is SVG? SVG (Scalable Vector Graphics) is an open-standard language for describing two-dimensional (2D) graphics in XML. It is a Recommendation from the W3C. SVG lets you describe rich images with features such as gradients, transparency, filter effects and animation. SVG has three types of graphic objects: shapes (e.g., paths consisting of straight lines and curves), images and text. Graphical objects can be grouped, styled, transformed and composited (e.g., drawn with transparency). SVG has a large set of static features which includes nested transformations, clipping paths, masking and filter effects. In addition, SVG images can be dynamic and interactive. A rich set of event handlers such as Page 2 PDF created by Apache FOP http://xmlgraphics.apache.org/fop/ Frequently Asked Questions 'onmouseover' and 'onclick' can be assigned to any SVG graphical object. These handlers can invoke scripts, which, in response to an event, can dynamically modify the SVG graphic through the SVG Document Object Model (DOM) API, allowing, for example scripts to change the color or location of graphical elements in reaction to events. SVG graphical elements can be animated through scripting. Alternatively, animation sequences can be expressed directly in XML because SVG leverages the SMIL specification for multimedia, another W3C specification. 1.3. What can I do with Batik? Batik contains several core modules which can be used independently or jointly to generate SVG content (see the SVG Generator, an SVG DOM implementation documentation) view SVG content (see the JSVGCanvas) or convert to and from the SVG format (see the SVG Transcoders tutorial). In addition, Batik contains low level modules such as an object oriented Graphic Vector Toolkit (GVT), a set of low level parsers(SVG Parser) specific to the SVG syntax and a set of extensions to the Java 2D API (such as sophisticated fill types and filter effects). Finally, Batik comes with packaged applications to help developers get familiar with the code and be quickly able to use the various modules: an Squiggle (in the org.apache.batik.apps.svgbrowser package) an SVG rasterizer (in the org.apache.batik.apps.rasterizer package), a Font converter (in the org.apache.batik.apps.ttf2svg package) and an SVG pretty printer (in the org.apache.batik.apps.svgpp package). Squiggle the SVG browser (here) can display SVG documents and lets the user zoom, pan and rotate any SVG document, view the SVG source, link between SVG documents, view a tree representation of the SVG DOM and more. One important component of the SVG viewer is the org.apache.batik.swing.JSVGCanvas component which can be plugged in any Java application or applet to provide SVG viewing capability. The SVG rasterizer (here) lets the user convert SVG files to raster formats such as JPEG, PNG or Tiff . It contains an extensible mechanism so that arbitrary raster formats can be added. For example, the rasterizer lets you create one SVG file with a special effect (e.g., shadows, gradients, etc...), turn it into an PNG image, then modify the SVG source (e.g., modify a piece of text or a color), and generate another PNG image from it. This way, you can easily generate a series of images sharing a common theme or look and feel to post on a web site (note that the rasterizer can also be used on a web server to do this conversion automatically). Page 3 PDF created by Apache FOP http://xmlgraphics.apache.org/fop/ Frequently Asked Questions The SVG Font Converter(here) lets the user easily create an SVG Font for a set of characters from a True Type Font file. That SVG Font definition can be embedded in a document using the characters. This allows users to create SVG documents that are self contained and do not rely on system fonts, and guarantees that the SVG file will be displayed exactly as it was authored on all platforms. The SVG Pretty Printer(here) is a convenience tool to pretty print an SVG document, which means that you can reformat any existing SVG document to produce a properly formatted and highly legible version. These applications show that Batik can be used client side (the browser can be used on any client machine) and server side (the rasterizer can be used to serve SVG images to client machines that do not have SVG support). Squiggle the SVG browser and the rasterizer are examples of some of the types of applications Batik allows. Batik's architecture allows the modules to be used in many different ways so other applications are possible, such as using the transcoders (to other vector formats, such as PDF, for example). Furthermore, the Graphic Vector Toolkit could be used to render other graphic formats such as XHTML. 1.4. Why do we have such a project at Apache? Apache's mission is to allow the web to be an open environment and to remain an open environment. Batik as an open source implementation of a key format for today's and tomorrow's web fits well in this mission. 1.5. How does Batik relate to other Apache projects? Batik is used in Cocoon for server side rasterization of SVG images. In addition, the Batik is used in the FOP project to convert SVG images to PDF format. 1.6. How did it start? Batik started out because several teams doing SVG related projects decided to join efforts with the idea that the whole will be greater than the sum of the parts. The following companies or institutions are part of the team that contributed and/or created the initial Batik project, during the fall of 2000: • CSIRO • ILOG • Koala Team • Eastman Kodak Company Page 4 PDF created by Apache FOP http://xmlgraphics.apache.org/fop/ Frequently Asked Questions • Sun Microsystems, Inc. In addition, the Batik project is supported by IBM. We encourage anyone to participate. As with all ASF project, all efforts are volunteer-based. We are looking for individuals to work with us on fulfilling our goals for Batik in the spirit of collaborative open-source software development. 1.7. Where is Batik going? What is next? The SVG implementation is not complete (status), and there is more work to do to achieve a fully functional viewer. Batik 1.1 supports all the static SVG features, linking and a limited support for scripting. Work has started on dynamic features. Scripting support with the 1.5 beta releases, and declarative animation (known as SMIL animation) will be supported in the 2.0 release. The type of applications (e.g., transcoding applications) that can or will be added to Batik depends on contributions and feedback. 1.8. How can I create and author SVG content? Well, you can always use a plain text editor such as vi or xemacs, but there are many graphic authoring packages that can export SVG documents and that will let you author SVG content visually. You can get a list of tools exporting SVG from the SVG implementation section of the SVG Home page on the W3C web site. You can also imagine building a tool on top of Batik: feel free to contribute! Authoring is one way of creating SVG content, and graphic authoring packages are useful for that purpose. However, there are many types of graphics which can be generated, such as stock quotes, statistical data, etc. For these types of graphics, there are many ways to generate SVG content. For example, if your data (say stock information) is contained in an XML document, you could use XSLT to transform your XML data into SVG. If your data comes from a database and you retrieve that data in a servlet on a Web server (e.g., using JDBC), you could use the Java binding for the DOM API to generate an SVG document from the data base data.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us