Layout Managers for Scalable Vector Graphics

Martin Rotard   and   Thomas Ertl

Visualization and Interactive Systems Institute
University of Stuttgart
Universitaetsstrasse 38
70569 Stuttgart
{rotard, ertl}

In Scalable Vector Graphics (SVG) shapes or groups have to be positioned in absolute coordinates. As an alternative they can be placed relative to the size of the entire canvas. For the author of a SVG graphics it is more comfortable to use a What You See Is What You Get (WYSIWYG) editor, where the placement is implicitly given, instead of calculating each position manually. Another method is writing a script that determines the positions, but this is rather time-consuming. Especially in business graphics or user interface design shapes are placed in a strict horizontal or vertical manner. Layout managers would help the author to position the shapes or groups relative to another element.

In this paper we present layout managers for flow layout, where the shapes are arranged in a horizontal or in a vertical series, and for grid layout, where the area is split into a number of columns. The layout managers can be combined and they are easy to integrate into SVG. The layout is not based on constraints, which makes the configuration and usage simple. In order to determine the position of the shape or group the bounding box has to be calculated. As an outlook we present an approach on how this layout managers could be realized using SVG's XML Binding Language (sXBL).