SVG

From GridInfo

Jump to: navigation, search

Adapted from the corresponding wikipedia article

Scalable Vector Graphics (SVG) is an XML markup language for describing two-dimensional vector graphics, both static and animated (either declarative or scripted). 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:

  • Vector graphic shapes (e.g. paths consisting of straight lines and curves, and areas bounded by them)
  • Raster graphics images / digital images
  • 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. For example, 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 can be saved with gzip compression, in which case they may be called "SVGZ files". Because XML contains verbose text, it tends to compress very well and these files can be much smaller. Often however the original vector-file (SVG) is already smaller than the rasterised version.

Browser support

Browsers with plugins

The use of SVG on the web is in its infancy, and also browser support is patchy. In browsers such as Internet Explorer and Safari, a plugin is needed to view SVG content. The most widely available SVG plugin on the desktop is from Adobe Systems (the Adobe SVG Viewer) which supports most of SVG 1.0/1.1. The current version of Safari ships with the plugin, while Internet Explorer users must separately download it.

Native support

There are several advantages to native support, among which are no need for the installation of a plugin, the ability to freely mix SVG with other formats in a single document, and rendering scripting between different document formats considerably more reliable. At this time all major browsers have committed to some level of SVG support except for Internet Explorer. See Comparison of layout engines for further details.

  • The Opera web browser (since 8.0) has support for the SVG 1.1 Tiny specification. Opera 9 will include SVG 1.1 Basic support.
  • Browsers based on the Gecko layout engine version 1.8 (such as Firefox 1.5, Camino 1.0 and SeaMonkey internet suite 1.0), all have incomplete support for the SVG 1.1 Full specification. The Mozilla site has an overview of the modules which are supported in Firefox 1.5 and an overview of the modules which are in progress in the development version of Firefox.
  • Apple's Safari browser, has also recently begun to port KSVG2 into WebCore, initiating work on incorporating native support of SVG into Safari. Nightly builds of Safari now include SVG support.
  • KDE's Konqueror has a fairly complete SVG plugin called KSVG. KSVG2 is slated to be rolled into KDE 4 core which could make it native rendering for Konqueror some time in the future. Elsewhere in KDE the format is finding greater use, and from version 3.4 onwards SVG wallpapers are supported
  • The Gnome project has had integrated SVG support throughout the desktop since 2000.

Links from a recent NIEeS workshop

Personal tools