Scalable Vector Graphics

Scalable Vector Graphics (SVG) is an XML markup language for describing two-dimensional vector graphics, both static and animated. It is an open standard created by the World Wide Web Consortium, which is also responsible for standards like HTML and XHTML.

Contents

Overview

SVG allows three types of graphic objects:

  1. vector graphic shapes (e.g. paths consisting of straight lines and curves, and areas bounded by them)
  2. raster graphics images / digital images
  3. text

Graphical objects can be grouped, styled, transformed and composited into previously rendered objects. Text can be in any XML namespace suitable to the application, which enhances searchability and accessibility of the SVG graphics. The feature set includes nested transformations, clipping paths, alpha masks, filter effects, template objects and extensibility.

SVG drawings can be dynamic and interactive. The Document Object Model (DOM) for SVG, which includes the full XML DOM, allows straightforward and efficient vector graphics animation via ECMAScript or SMIL. A rich set of event handlers such as onmouseover and onclick can be assigned to any SVG graphical object. Because of its compatibility and leveraging of other Web standards, features like scripting can be done on SVG elements and other XML elements from different namespaces simultaneously within the same web page.

If storage space is an issue, SVG images are sometimes saved with gzip compression, in which case they may be called "SVGZ files". Because XML contains a lot of redundant data, XML tends to compress very well and these files can be much smaller.

Mobile profiles

Because of industry demand with SVG 1.1 two mobile profiles were introduced: SVG Tiny (SVGT) and SVG Basic (SVGB). These are subsets of the full SVG standard, mainly intended for user agents with limited capabilities. In particular, SVG Tiny was defined for highly restricted mobile devices such as cellphones, and SVG Basic was defined for higher level mobile devices, such as PDAs.

Neither mobile profile includes support for the full DOM, while only SVG Basic has optional support for scripting, but because they are fully compatible subsets of the full standard most SVG graphics can still be rendered by devices which only support the mobile profiles.

The competing software Macromedia Flash Lite by Macromedia supports SVG Tiny since version 1.1.

Development history

SVG was developed in a long process after Macromedia and Microsoft introduced Vector Markup Language (VML) whereas Adobe Systems and Sun Microsystems submitted a competing format known as PGML.

  • SVG 1.0 became a W3C Recommendation on 2001-09-04.
  • SVG 1.1 became a W3C Recommendation on 2003-01-14.
  • SVG Tiny and SVG Basic (the Mobile SVG Profiles) became W3C Recommendations on 2003-01-14.
  • SVG 1.2 is currently a W3C Working Draft.

Support for SVG in browsers and other applications

The use of SVG on the web is in its infancy. There is a great deal of inertia from the long-time use of completely raster formats, but also browser support is patchy, with users of most browsers having to install a plugin. Web sites which serve SVG images typically also provide the images in a raster format, either automatically by HTTP content negotiation or allowing the user to directly choose the file. Alternative images are usually automatically rasterised using a library such as ImageMagick, which provides a quick but incomplete implementation of SVG or Batik, which implements all of SVG, but is slower.

Some wikis have experimented with SVG support; it has been speculated that since SVG is a text-based format, a wiki might allow edits to SVG images in a fashion similar to editing a standard article. However, the benefits of editing images in this way are disputed. It is generally considered that even trivial editing is better achieved using a separate graphics package because it is difficult to visualise exactly how changes to the XML will appear on the final image. Current wikis mostly do not support either the display or editing of SVG images, partly because of the lack of full browser support, but also because rasterization using Batik is CPU-intensive and requires Sun's Java Runtime Environment, which is not free (as in freedom). In the spirit of being open, many wikis refuse to use non-free software, for example Jimbo Wales speaks about this in his weblog [1] (http://blog.jimmywales.com/index.php/archives/2004/10/21/free-knowledge-requires-free-software-and-free-file-formats/). SVG support would be valuable to a wiki, especially for articles that require diagrams, so the situation may change in future, when ImageMagick is expanded to cover more of the SVG standard.

Plugin support

In most browsers, such as Internet Explorer, a plugin is needed to see SVG images in the browser window. Currently available SVG plugins include Adobe SVG Viewer (http://www.adobe.com/svg/viewer/install/main.html) and Corel SVG Viewer (http://www.corel.com/servlet/Satellite?pagename=Corel/Downloads/Details&id=1047022177437).

Native support

There are several advantages to native support. For example there is no need for a plug-in, SVG can be mixed with other formats in a single document, and scripting between different document formats is a lot more reliable.

The Mozilla SVG Project is working to bring native SVG support to Mozilla [2] (http://www.mozilla.org/projects/svg/). Partial SVG support will be included in Mozilla Firefox 1.1. An overview of which modules are supported, in progress, and not yet supported can be found on the Mozilla + SVG Status (http://www.mozilla.org/projects/svg/status.html) page.

The KDE project's Konqueror web browser also has a fairly complete SVG implementation called KSVG (http://svg.kde.org). Since they share the KHTML rendering engine, support will likely filter down to Apple's Safari browser in future. Elsewhere in KDE the format is finding greater use, and from version 3.4 onwards SVG wallpapers are supported.

The Opera web browser (since 8.0 Beta 3) offers SVG support based on the SVG 1.1 Tiny standard. Partial SVG is also natively supported in the Amaya web browser.

Java programs can make use of the Batik SVG Toolkit (http://xml.apache.org/batik/) to render, generate, and manipulate SVG graphics.

Tools

Most of the major drawing software packages such as Adobe Illustrator and Corel Draw support SVG export. OpenOffice.org Draw 1.1 and up can also export SVG files whilst SVGmaker (http://www.svgmaker.com) creates SVG from standard Windows programs including the ubiquitous Office suite. Sodipodi and Inkscape are two other (open source, multi-platform) tools that use the SVG format. Sketsa (http://www.kiyut.com/products/sketsa/index.html) is another native SVG Graphics Editor.

Similarly to XML, SVG has different kinds of standard parsers to read and write. An example of such technology is Batik (http://xml.apache.org/batik/) from Apache. Batik supplies a set of standard modules like SVG Parser, SVG Generator and SVG DOM.

The SVG Scene toolkit (http://networkimprov.net/airwrx/awscene.html) enables developers to create application views by constructing an SVG content model, or scene (also called a canvas). A scene may be displayed simultaneously in multiple windows, possibly on separate clients. Rendering of the SVG is done via Cairo (http://cairographics.org/) and Pango (http://pango.org/), which in turn support diverse targets, e.g. Windows, MacOS, Postscript, Xlib.

Projects that use SVG include Together, JFreeChart (http://www.jfree.org/jfreechart/), and Compuware's OptimalJ (http://www.compuware.com/products/optimalj/).

Free tools

  • Inkscape (Website (http://www.inkscape.org/)), Sodipodi Fork with a greater focus on implementing the SVG standards and a different user interface.
  • Skencil (Website (http://www.skencil.org/)) SVG Editor, written almost entirely in Python
  • Sodipodi (Website (http://www.sodipodi.com/)), Drawing application Unix and Windows, does not support animations

See also

External links

Demos

Software

Tutorials

Articles

SVG clipart

da:Scalable Vector Graphics de:Scalable Vector Graphics es:Scalable Vector Graphics fr:Scalable Vector Graphics it:Scalable Vector Graphics nl:Scalable Vector Graphics ja:SVG pl:SVG pt:SVG sl:SVG fi:SVG sv:SVG zh:SVG

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools