dot

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const HALIGN_CENTER = "CENTER"
View Source
const HALIGN_LEFT = "LEFT"
View Source
const HALIGN_RIGHT = "RIGHT"
View Source
const HALIGN_TEXT = "TEXT"
View Source
const VALIGN_BOTTOM = "BOTTOM"
View Source
const VALIGN_MIDDLE = "MIDDLE"
View Source
const VALIGN_TOP = "TOP"

Variables

View Source
var DefaultFontConfig = FontConfig{
	Face:  "Courier",
	Size:  10,
	Color: "gray20",
}

Functions

This section is empty.

Types

type EdgeOptions

type EdgeOptions struct {
	Font  FontConfig
	Color string
}

func (EdgeOptions) String

func (e EdgeOptions) String() string

type FontConfig

type FontConfig struct {
	Face  string
	Size  int
	Color string
}

func (FontConfig) String

func (f FontConfig) String() string

func (FontConfig) Write

func (f FontConfig) Write(s string) string

type HorizontalAlignment

type HorizontalAlignment string

type Options

type Options struct {
	Font    FontConfig
	Color   string
	Rankdir string

	Table      TableOptions
	Labels     TableCellOptions
	Properties TableCellOptions
	Edges      EdgeOptions
}

func DefaultOptions

func DefaultOptions() Options

type Renderer

type Renderer struct {
	Options          Options
	NodeSelectorFunc func(*lpg.Node) bool
	EdgeSelectorFunc func(*lpg.Edge) bool
}

func (Renderer) EdgeRenderer

func (r Renderer) EdgeRenderer(fromID, toID string, edge *lpg.Edge, w io.Writer) (bool, error)

func (Renderer) NodeBoxRenderer

func (r Renderer) NodeBoxRenderer(ID string, node *lpg.Node, wr io.Writer) (bool, error)

func (Renderer) NodeTableRenderer

func (r Renderer) NodeTableRenderer(ID string, node *lpg.Node, wr io.Writer) (bool, error)

func (Renderer) Render

func (r Renderer) Render(g *lpg.Graph, graphName string, out io.Writer) error

type TableCellOptions

type TableCellOptions struct {
	Align       HorizontalAlignment `dot:"ALIGN"`
	Balign      HorizontalAlignment `dot:"BALIGN"`
	BGColor     string              `dot:"BGCOLOR"`
	Border      string              `dot:"BORDER"`
	CellPadding string              `dot:"CELLPADDING"`
	CellSpacing string              `dot:"CELLSPACING"`
	Color       string              `dot:"COLOR"`
	ColSpan     int                 `dot:"COLSPAN"`
	HRef        string              `dot:"HREF"`
	Port        string              `dot:"PORT"`
	RowSpan     int                 `dot:"ROWSPAN"`
	Style       string              `dot:"STYLE"`
	Target      string              `dot:"TARGET"`
	Valign      VerticalAlignment   `dot:"VALIGN"`
	Font        FontConfig
}

func (TableCellOptions) String

func (t TableCellOptions) String() string

type TableOptions

type TableOptions struct {
	Align       HorizontalAlignment `dot:"ALIGN"`
	BGColor     string              `dot:"BGCOLOR"`
	Border      string              `dot:"BORDER"`
	CellBorder  string              `dot:"CELLBORDER"`
	CellPadding string              `dot:"CELLPADDING"`
	CellSpacing string              `dot:"CELLSPACING"`
	Color       string              `dot:"COLOR"`
	Columns     int                 `dot:"COLUMNS"`
	HRef        string              `dot:"HREF"`
	ID          string              `dot:"ID"`
	Port        string              `dot:"PORT"`
	Rows        int                 `dot:"ROWS"`
	Sides       int                 `dot:"SIDES"`
	Style       string              `dot:"STYLE"`
	Target      string              `dot:"TARGET"`
	Title       string              `dot:"TITLE"`
	Valign      VerticalAlignment   `dot:"VALIGN"`
}

func (TableOptions) String

func (t TableOptions) String() string

type VerticalAlignment

type VerticalAlignment string

Jump to

Keyboard shortcuts

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