PreviousUpNext

15.4.1037  src/lib/std/dot/dot-graphtree-traits.pkg

## dot-graphtree-traits.pkg
#
# Define the per-graph, per-node and per-edge
# information maintained by the dot-graphtree
# graphs used to hold raw graphs read from foo.dot
# files, before planar layout is done.

# Compiled by:
#     src/lib/std/standard.lib

# Compare to:
#     src/lib/std/dot/planar-graphtree-traits.pkg

                                                                                

# This package is used in:
#     src/lib/std/dot/dot-graphtree.pkg

stipulate
    package g2d =  geometry2d;                                                          # geometry2d                    is from   src/lib/std/2d/geometry2d.pkg
herein

    package   dot_graphtree_traits
    : (weak)  Dot_Graphtree_Traits                                                      # Dot_Graphtree_Traits          is from   src/lib/std/dot/dot-graphtree-traits.api
    {
        Shape = ELLIPSE | BOX | DIAMOND;

        Graph_Info
            =
            { name:  String,
              scale: Float,
              bbox:  g2d::Size                  # bbox may be "bounding box"
            };

        Node_Info
            =
            { center:  g2d::Point,
              size:    g2d::Size,
              shape:   Shape,
              label:   String
            } ;

        Edge_Info
            =
            { points: List( g2d::Point ),
              arrow:  g2d::Point
            };

        default_graph_info
            =
            { name  =>  "",
              scale =>  1.0,
              bbox  =>  { wide=>0, high=>0 }
            };

        default_node_info
            =
            { center =>  g2d::point::zero,
              size   =>  { wide=>0, high=>0 },
              shape  =>  ELLIPSE,
              label  =>  ""
            };

        default_edge_info
            =
            { points =>  [],
              arrow  =>  g2d::point::zero
            };
    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext