edge

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(g *dot.Graph, fromNodeID, toNodeID string, attrs ...Attribute) error

New add to dot.Graph a new connection line between two components.

Types

type Attribute

type Attribute func(*dot.Edge)

Attribute is a function that apply a property to an edge.

func Color

func Color(color string) Attribute

Color set the color for an edge line.

func Dashed

func Dashed(dashed bool) Attribute

Dashed set the edge line dashed.

func Dir

func Dir(dir string) Attribute

Dir sets the ege direction, values: both, forward, back, none.

func FontName

func FontName(name string) Attribute

FontName specify the font used for text.

func FontSize

func FontSize(size float32) Attribute

FontSize specify the font size, in points, used for text.

func Highlight

func Highlight(enable bool) Attribute

Highlight makes the line thicker.

func Label

func Label(num int, text string) Attribute

Label is the edge caption. If 'htm' is true the caption is treated as HTML code.

func LabelAngle added in v0.8.0

func LabelAngle(angle float32) Attribute

LabelAngle along with labeldistance, determine where the headlabel (taillabel) are placed with respect to the head (tail) in polar coordinates. The origin in the coordinate system is the point where the edge touches the node. The ray of 0 degrees goes from the origin back along the edge, parallel to the edge at the origin. The angle, in degrees, specifies the rotation from the 0 degree ray, with positive angles moving counterclockwise and negative angles moving clockwise.

func LabelDistance added in v0.8.0

func LabelDistance(dist float32) Attribute

LabelDistance adjusts the distance that the headlabel(taillabel) is from the head(tail) node.

func MinLen added in v0.8.0

func MinLen(len float32) Attribute

MinLen sets the minimum edge length (rank difference between head and tail).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL