Index: trunk/sources/HeuristicLab.Visualization/CompositeShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/CompositeShape.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/CompositeShape.cs	(revision 1234)
@@ -8,7 +8,7 @@
     protected RectangleD boundingBox = RectangleD.Empty;
 
-    public virtual void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
+    public virtual void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
       foreach (IShape shape in shapes) {
-        shape.Draw(graphics, viewport, clippingArea);
+        shape.Draw(graphics, parentViewport, parentClippingArea);
       }
     }
Index: trunk/sources/HeuristicLab.Visualization/Grid.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/Grid.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/Grid.cs	(revision 1234)
@@ -3,9 +3,9 @@
 namespace HeuristicLab.Visualization {
   public class Grid : WorldShape {
-    public override void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
+    public override void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
       shapes.Clear();
 
       foreach (double y in AxisTicks.GetTicks(YAxis.PixelsPerInterval,
-                                              viewport.Height,
+                                              parentViewport.Height,
                                               ClippingArea.Height,
                                               ClippingArea.Y1)) {
@@ -18,5 +18,5 @@
 
       foreach (double x in AxisTicks.GetTicks(XAxis.PixelsPerInterval,
-                                              viewport.Width,
+                                              parentViewport.Width,
                                               ClippingArea.Width,
                                               ClippingArea.X1)) {
@@ -41,5 +41,5 @@
       shapes.Add(lineZeroY);
 
-      base.Draw(graphics, viewport, clippingArea);
+      base.Draw(graphics, parentViewport, parentClippingArea);
     }
   }
Index: trunk/sources/HeuristicLab.Visualization/HorizontalLineShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/HorizontalLineShape.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/HorizontalLineShape.cs	(revision 1234)
@@ -21,17 +21,10 @@
     }
 
-
-    /// <summary>
-    /// Draws the HorizontalLineShape.
-    /// </summary>
-    /// <param name="graphics">graphics handle to draw to</param>
-    /// <param name="viewport">rectangle in value-coordinates to display</param>
-    /// <param name="clippingArea">rectangle in screen-coordinates to draw</param>
-    public override void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
+    public override void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
       minLineShape.X1 = ClippingArea.X1;
       minLineShape.X2 = ClippingArea.X2;
       maxLineShape.X1 = ClippingArea.X1;
       maxLineShape.X2 = ClippingArea.X2;
-      base.Draw(graphics, viewport, clippingArea);
+      base.Draw(graphics, parentViewport, parentClippingArea);
     }
 
Index: trunk/sources/HeuristicLab.Visualization/IShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/IShape.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/IShape.cs	(revision 1234)
@@ -2,6 +2,34 @@
 
 namespace HeuristicLab.Visualization {
+  /// <summary>
+  /// This is the base interface that has to be implemented by all shapes.
+  /// 
+  /// View port
+  ///   The view port is the available drawing area on the screen.
+  ///   It is specified in the GDI coordinate system.
+  /// 
+  /// Clipping area
+  ///   The clipping area is the range of values visible on the view port.
+  ///   Values outside this area will not be visible (they "get clipped").
+  ///   It can either be inherited from the parent, or it can be overriden
+  ///   to create distorted realities (see world shapes).
+  ///   It is specified in a world coordinate system.
+  /// 
+  /// Bounding box
+  ///   The bounding box is the location and the size of a shape on its parent.
+  ///   It is specified in the parent's world coordinate system.
+  /// </summary>
   public interface IShape {
-    void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea);
+    /// <summary>
+    /// Draws the shape
+    /// </summary>
+    /// <param name="graphics">The Graphics object used to draw the shape</param>
+    /// <param name="parentViewport">The parent's view port</param>
+    /// <param name="parentClippingArea">The parent's clipping area</param>
+    void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea);
+
+    /// <summary>
+    /// The shape's bounding box
+    /// </summary>
     RectangleD BoundingBox { get; }
   }
Index: trunk/sources/HeuristicLab.Visualization/LineShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/LineShape.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/LineShape.cs	(revision 1234)
@@ -57,8 +57,8 @@
     /// </summary>
     /// <param name="graphics">graphics handle to draw to</param>
-    /// <param name="viewport">rectangle in value-coordinates to display</param>
-    /// <param name="clippingArea">rectangle in screen-coordinates to draw</param>
-    public void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
-      Rectangle screenRect = Transform.ToScreen(boundingBox, viewport, clippingArea);
+    /// <param name="parentViewport">rectangle in value-coordinates to display</param>
+    /// <param name="parentClippingArea">rectangle in screen-coordinates to draw</param>
+    public void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
+      Rectangle screenRect = Transform.ToScreen(boundingBox, parentViewport, parentClippingArea);
 
       graphics.DrawLine(GetPen(), screenRect.Left, screenRect.Bottom, screenRect.Right, screenRect.Top);
Index: trunk/sources/HeuristicLab.Visualization/RectangleShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/RectangleShape.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/RectangleShape.cs	(revision 1234)
@@ -25,6 +25,6 @@
     }
 
-    public void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
-      Rectangle screenRect = Transform.ToScreen(rectangle, viewport, clippingArea);
+    public void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
+      Rectangle screenRect = Transform.ToScreen(rectangle, parentViewport, parentClippingArea);
 
       graphics.DrawRectangle(GetPen(), screenRect);
Index: trunk/sources/HeuristicLab.Visualization/TextShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/TextShape.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/TextShape.cs	(revision 1234)
@@ -68,7 +68,7 @@
     #region IShape Members
 
-    public void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
-      int screenX = Transform.ToScreenX(x, viewport, clippingArea);
-      int screenY = Transform.ToScreenY(y, viewport, clippingArea);
+    public void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
+      int screenX = Transform.ToScreenX(x, parentViewport, parentClippingArea);
+      int screenY = Transform.ToScreenY(y, parentViewport, parentClippingArea);
 
       SizeF size = graphics.MeasureString(text, font);
Index: trunk/sources/HeuristicLab.Visualization/Transform.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/Transform.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/Transform.cs	(revision 1234)
@@ -2,13 +2,24 @@
 
 namespace HeuristicLab.Visualization {
+  /// <summary>
+  /// GDI (or screen) coordinate system
+  ///   The GDI coordinate system is specified in pixels. X goes from left to right
+  ///   and Y goes from top to bottom.
+  /// 
+  /// World coordinate system
+  ///   A world coordinate system can be freely specified. X goes from left to
+  ///   right and Y goes from bottom to top.
+  /// 
+  /// The transformation between world- and screen-coordinate systems is done using
+  /// a view port and a clipping area.
+  /// </summary>
   public static class Transform {
-
     /// <summary>
-    /// Screen to world transformations
+    /// Transforms a rectangle in screen coordinates to world coordinates
     /// </summary>
-    /// <param name="rect"></param>
-    /// <param name="viewport"></param>
-    /// <param name="clippingArea"></param>
-    /// <returns></returns>
+    /// <param name="rect">The rectangle in screen coordinates that should be transformed</param>
+    /// <param name="viewport">The target view port</param>
+    /// <param name="clippingArea">The target clipping area</param>
+    /// <returns>The rectangle rect transformed to world coordinates</returns>
     public static RectangleD ToWorld(Rectangle rect, Rectangle viewport, RectangleD clippingArea) {
       double x1 = ToWorldX(rect.Left, viewport, clippingArea);
@@ -19,4 +30,11 @@
     }
 
+    /// <summary>
+    /// Transforms a 2d point in screen coordinates to world coordinates
+    /// </summary>
+    /// <param name="point">The point in screen coordinates that should be transformed</param>
+    /// <param name="viewport">The target view port</param>
+    /// <param name="clippingArea">The target clipping area</param>
+    /// <returns>The point transformed to world coordinates</returns>
     public static PointD ToWorld(Point point, Rectangle viewport, RectangleD clippingArea) {
       double x = ToWorldX(point.X, viewport, clippingArea);
@@ -25,8 +43,22 @@
     }
 
+    /// <summary>
+    /// Transforms a point on the X-axis in screen coordinates to world coordinates
+    /// </summary>
+    /// <param name="x">The point on the X-axis in screen coordinates that should be transformed</param>
+    /// <param name="viewport">The target view port</param>
+    /// <param name="clippingArea">The target clipping area</param>
+    /// <returns>The point transformed to world coordinates</returns>
     public static double ToWorldX(int x, Rectangle viewport, RectangleD clippingArea) {
       return clippingArea.X1 + clippingArea.Width/viewport.Width*(x - viewport.Left);
     }
 
+    /// <summary>
+    /// Transforms a point on the Y-axis in screen coordinates to world coordinates
+    /// </summary>
+    /// <param name="y">The point on the Y-axis in screen coordinates that should be transformed</param>
+    /// <param name="viewport">The target view port</param>
+    /// <param name="clippingArea">The target clipping area</param>
+    /// <returns>The point transformed to world coordinates</returns>
     public static double ToWorldY(int y, Rectangle viewport, RectangleD clippingArea) {
       return clippingArea.Y1 - clippingArea.Height/viewport.Height*(y - viewport.Bottom);
@@ -34,10 +66,10 @@
 
     /// <summary>
-    /// World to screen transformations
+    /// Transforms a rectangle in world coordinates to screen coordinates
     /// </summary>
-    /// <param name="rect"></param>
-    /// <param name="viewport"></param>
-    /// <param name="clippingArea"></param>
-    /// <returns></returns>
+    /// <param name="rect">The rectangle in world coordinates that should be transformed</param>
+    /// <param name="viewport">The target view port</param>
+    /// <param name="clippingArea">The target clipping area</param>
+    /// <returns>The rectangle rect transformed to screen coordinates</returns>
     public static Rectangle ToScreen(RectangleD rect, Rectangle viewport, RectangleD clippingArea) {
       int left = ToScreenX(rect.X1, viewport, clippingArea);
@@ -48,4 +80,11 @@
     }
 
+    /// <summary>
+    /// Transforms a 2d point in world coordinates to screen coordinates
+    /// </summary>
+    /// <param name="point">The point in world coordinates that should be transformed</param>
+    /// <param name="viewport">The target view port</param>
+    /// <param name="clippingArea">The target clipping area</param>
+    /// <returns>The point transformed to screen coordinates</returns>
     public static Point ToScreen(PointD point, Rectangle viewport, RectangleD clippingArea) {
       int x = ToScreenX(point.X, viewport, clippingArea);
@@ -54,8 +93,22 @@
     }
 
+    /// <summary>
+    /// Transforms a point on the X-axis in world coordinates to screen coordinates
+    /// </summary>
+    /// <param name="x">The point on the X-axis in world coordinates that should be transformed</param>
+    /// <param name="viewport">The target view port</param>
+    /// <param name="clippingArea">The target clipping area</param>
+    /// <returns>The point transformed to screen coordinates</returns>
     public static int ToScreenX(double x, Rectangle viewport, RectangleD clippingArea) {
       return (int)(viewport.Left + viewport.Width/clippingArea.Width*(x - clippingArea.X1));
     }
 
+    /// <summary>
+    /// Transforms a point on the Y-axis in world coordinates to screen coordinates
+    /// </summary>
+    /// <param name="y">The point on the Y-axis in world coordinates that should be transformed</param>
+    /// <param name="viewport">The target view port</param>
+    /// <param name="clippingArea">The target clipping area</param>
+    /// <returns>The point transformed to screen coordinates</returns>
     public static int ToScreenY(double y, Rectangle viewport, RectangleD clippingArea) {
       return (int)(viewport.Bottom - viewport.Height/clippingArea.Height*(y - clippingArea.Y1));
Index: trunk/sources/HeuristicLab.Visualization/WorldShape.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/WorldShape.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/WorldShape.cs	(revision 1234)
@@ -4,6 +4,10 @@
 
 namespace HeuristicLab.Visualization {
+  /// <summary>
+  /// World shapes are composite shapes that have their own coordinate system
+  /// which is independent from their parent's coordinate system.
+  /// </summary>
   public class WorldShape : IShape {
-    private RectangleD clippingArea;
+    private RectangleD clippingArea; // own clipping area
     private RectangleD boundingBox;
 
@@ -13,4 +17,6 @@
       : this(new RectangleD(0, 0, 1, 1), new RectangleD(0, 0, 1, 1)) {}
 
+    /// <param name="clippingArea">The new clipping area of this world shape</param>
+    /// <param name="boundingBox">The location and the size of this world shape in the parent's coordinate system</param>
     public WorldShape(RectangleD clippingArea, RectangleD boundingBox) {
       this.clippingArea = clippingArea;
@@ -18,13 +24,17 @@
     }
 
-    public virtual void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
+    public virtual void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
       GraphicsState gstate = graphics.Save();
 
-      Rectangle innerViewport = Transform.ToScreen(boundingBox, viewport, clippingArea);
+      // calculate our drawing area on the screen using our location and
+      // size in the parent (boundingBox), the parent's viewport and the
+      // parent's clipping area
+      Rectangle viewport = Transform.ToScreen(boundingBox, parentViewport, parentClippingArea);
 
-      graphics.SetClip(innerViewport);
+      graphics.SetClip(viewport);
 
       foreach (IShape shape in shapes) {
-        shape.Draw(graphics, innerViewport, this.clippingArea);
+        // draw child shapes using our own clipping area
+        shape.Draw(graphics, viewport, clippingArea);
       }
 
@@ -37,4 +47,8 @@
     }
 
+    /// <summary>
+    /// The world shape's own clipping area.
+    /// This overrides the clipping area of the parent shape.
+    /// </summary>
     public RectangleD ClippingArea {
       get { return clippingArea; }
Index: trunk/sources/HeuristicLab.Visualization/XAxis.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/XAxis.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/XAxis.cs	(revision 1234)
@@ -13,8 +13,8 @@
     }
 
-    public override void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
+    public override void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
       shapes.Clear();
 
-      foreach (double x in AxisTicks.GetTicks(PixelsPerInterval, viewport.Width,
+      foreach (double x in AxisTicks.GetTicks(PixelsPerInterval, parentViewport.Width,
                                               ClippingArea.Width,
                                               ClippingArea.X1)) {
@@ -26,5 +26,5 @@
       }
 
-      base.Draw(graphics, viewport, clippingArea);
+      base.Draw(graphics, parentViewport, parentClippingArea);
     }
   }
Index: trunk/sources/HeuristicLab.Visualization/YAxis.cs
===================================================================
--- trunk/sources/HeuristicLab.Visualization/YAxis.cs	(revision 1233)
+++ trunk/sources/HeuristicLab.Visualization/YAxis.cs	(revision 1234)
@@ -13,8 +13,8 @@
     }
 
-    public override void Draw(Graphics graphics, Rectangle viewport, RectangleD clippingArea) {
+    public override void Draw(Graphics graphics, Rectangle parentViewport, RectangleD parentClippingArea) {
       shapes.Clear();
 
-      foreach (double y in AxisTicks.GetTicks(PixelsPerInterval, viewport.Height,
+      foreach (double y in AxisTicks.GetTicks(PixelsPerInterval, parentViewport.Height,
                                               ClippingArea.Height,
                                               ClippingArea.Y1)) {
@@ -26,5 +26,5 @@
       }
 
-      base.Draw(graphics, viewport, clippingArea);
+      base.Draw(graphics, parentViewport, parentClippingArea);
     }
   }
