Documentation
¶
Index ¶
- Constants
- func Colorlookup(s string) (r int, g int, b int)
- type Color
- type Diagram
- func (dia *Diagram) AddConnection(from, to string, label string) error
- func (dia *Diagram) AddDirectionalConnection(from, to string, label string) error
- func (dia *Diagram) AddElemenets(name ...string)
- func (dia *Diagram) ProcessData(data []byte)
- func (dia *Diagram) Render()
- func (dia *Diagram) SetDebug(debug bool)
- func (dia *Diagram) SetElementLabelFont(font Font)
- func (dia *Diagram) SetFontDir(dir string)
- func (dia *Diagram) SetLabelFont(font Font)
- func (dia *Diagram) SetTitle(title string)
- func (dia *Diagram) SetTitleFont(font Font)
- type Font
Constants ¶
View Source
const ( // RECT sets elemenet type to rectangle RECT int = 0 // DECISION sets elemenet type to decision node DECISION = 1 // CIRCLE sets elemenet type to circle CIRCLE = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Color ¶
type Color struct {
Red, Green, Blue int
}
Color is a RGB set of ints; for a nice picker see https://www.w3schools.com/colors/colors_picker.asp
type Diagram ¶
type Diagram struct {
// contains filtered or unexported fields
}
Diagram represents a diagram
func (*Diagram) AddConnection ¶
AddConnection adds a connection (renders as a line) between two elemenets
func (*Diagram) AddDirectionalConnection ¶
AddDirectionalConnection adds a connection (renders as an arrowed line) between two elemenets
func (*Diagram) AddElemenets ¶
AddElemenets sets the `elemenet` array on the Diagram object
func (*Diagram) ProcessData ¶ added in v0.21.3
ProcessData generates image from ZML data
func (*Diagram) Render ¶
func (dia *Diagram) Render()
Render generates an image from a `Diagram` object
func (*Diagram) SetElementLabelFont ¶
SetElementLabelFont sets font to use for labels
func (*Diagram) SetLabelFont ¶
SetLabelFont sets font to use for labels
func (*Diagram) SetTitleFont ¶
SetTitleFont sets font to use for the title
Click to show internal directories.
Click to hide internal directories.