\chapter{Grid Coordinate Mappers}
\label{Chapter Grid Coordinate Mapper}

Grid coordinate mappers are used in order to transform a
grid layout of a graph into a real layout
(which is represented by a layout interface).
Each grid layout algorithm has a module
option {\it mapper}, which determines the
grid coordinate mapper used for the transformation
of the grid layout.

AGD offers a collection of different grid
coordinate mappers, each designed for
specific purposes. The default is usually
{\it MaxAllMapper} since it can be applied with
all algorithms, i.e., it preserves angles,
what is required by planar straight line
algorithms. One disadvantage of {\it MaxAllMapper}
is that it wastes a lot of space if the sizes
of the nodes differ much from each other.

In this case, {\it MaxEachMapper} is the better
choice. However, it does not preserve angles.
It works best with orthogonal layout algorithms
and {\it MixedModelLayout}.

The other two mappers, {\it FixedGridMapper}
and {\it FixedSizeMapper}, are useful, when
the actual size of rows and columns is given
in advance, e.g., if you work in a graph editor
with an enabled grid. The difference between both is
that {\it FixedGridMapper} only enlarges nodes,
whereas {\it FixedSizeMapper} can also make
nodes smaller.

\input extract/GridCoordinateMapper.tex
\newpage
\input extract/MaxAllMapper.tex
\newpage
\input extract/MaxEachMapper.tex
\newpage
\input extract/FixedGridMapper.tex
\newpage
\input extract/FixedSizeMapper.tex
\newpage


\chapter{Grid Layouts}
\label{Chapter Grid Layout Infos}

The class \avar{GridLayout} represents grid layouts
of graphs, which are, e.g., produced by a grid layout
algorithm.

The abstract class \avar{GridLayoutInfo} realizes a
generic access to grid layouts. This makes it possible
to maintain an implicit representation of the actual
grid layout, e.g., the grid layout is produced for
a manipulated copy of the graph and the respective
implementation of \avar{GridLayoutInfo}
(in this case \avar{GraphCopyGLI}) knows, how to transform
it to a grid layout of the original graph. These classes
are used by grid coordinate mappers.

This mechanism is also extended to cluster graphs. The class
{\it CGGridLayout\/} represents grid layouts of cluster
graphs and {\it CGGridLayoutInfo\/} the corresponding info
class. Such info classes are used by the call function of
{\it GridCoordinateMapper} for cluster graphs.
 
\input extract/GridLayout.tex
\input extract/GridLayoutInfo.tex
\input extract/GraphGLI.tex
\input extract/GraphCopyGLI.tex
\newpage
\input extract/CGGridLayout.tex
\input extract/CGGridLayoutInfo.tex
\input extract/ClusterGraphGLI.tex
