Documentation ¶
Overview ¶
Package dot provides an abstraction for painlessly building and printing graphviz dot-files
Index ¶
- type EdgeDescription
- type Element
- type Graph
- func (graph *Graph) AddComment(text string)
- func (graph *Graph) AddEdge(v1 *VertexDescription, v2 *VertexDescription, directed bool, style string)
- func (graph *Graph) AddNewLine()
- func (graph *Graph) AddSubGraph(sGraph *Graph)
- func (graph *Graph) AddVertex(v *VertexDescription)
- func (graph *Graph) Write(w io.Writer) error
- type Literal
- type VertexDescription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EdgeDescription ¶
type EdgeDescription struct { From VertexDescription To VertexDescription Directed bool Style string }
EdgeDescription is an element containing all the information needed to fully describe a dot-file edge
type Element ¶
Element captures the information of a dot-file element, typically corresoponding to one line of the file
type Graph ¶
Graph is the graphviz dot-file graph representation.
func (*Graph) AddComment ¶
AddComment interprets the given argument as the text of a comment and schedules the comment to be written in the output dotfile
func (*Graph) AddEdge ¶
func (graph *Graph) AddEdge(v1 *VertexDescription, v2 *VertexDescription, directed bool, style string)
AddEdge constructs an edgedescription connecting the two vertices given as parameters and schedules this element to be written in the output dotfile
func (*Graph) AddNewLine ¶
func (graph *Graph) AddNewLine()
AddNewLine schedules a newline to be written in the output dotfile
func (*Graph) AddSubGraph ¶
AddSubGraph schedules a newline to be written in the output dotfile.
func (*Graph) AddVertex ¶
func (graph *Graph) AddVertex(v *VertexDescription)
AddVertex schedules the vertexdescription to be written in the output dotfile
type Literal ¶
type Literal struct {
Line string
}
Literal is an element consisting of the corresponding literal string printed in the dot-file
type VertexDescription ¶
type VertexDescription struct { ID string // string attributes Label string Group string Color string Style string ColorScheme string FontColor string FontName string Shape string // int attributes Peripheries int }
VertexDescription is an element containing all the information needed to fully describe a dot-file vertex
func NewVertexDescription ¶
func NewVertexDescription(id string) VertexDescription
NewVertexDescription returns a new VertexDescription with the given ID.