graphify

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 3 Imported by: 1

README

graphify

This repository contains visualization tools for github.com/nulab/autog.

SVG

Draws autog's graph.Layout to an SVG file. Example usage:

package main

import (
	"os"

	"github.com/nulab/autog"
	"github.com/vibridi/graphify"
)

func main() {
	layout := autog.Layout(/* args */)

	f, err := os.Create("output.svg")
	if err != nil {
		// handle error
    }
	graphify.DrawSVG(layout, f)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DrawSVG

func DrawSVG(layout graph.Layout, w io.Writer, options ...SvgOption)

Types

type SvgOption

type SvgOption func(*svg.Options)

func WithCanvasPadding

func WithCanvasPadding(padding int) SvgOption

func WithDrawSplines

func WithDrawSplines() SvgOption

func WithFontSize

func WithFontSize(size int16) SvgOption

func WithHighlightReversedEdges

func WithHighlightReversedEdges() SvgOption

func WithPrintNodePosition

func WithPrintNodePosition() SvgOption

func WithSVGElements

func WithSVGElements(elements []SvgStringer) SvgOption

func WithShowTimestamp

func WithShowTimestamp() SvgOption

func WithSkipVirtualNodes

func WithSkipVirtualNodes() SvgOption

Currently this option does nothing because autog's output layout doesn't distinguish virtual nodes from regular nodes.

type SvgStringer

type SvgStringer = svg.Stringer

Directories

Path Synopsis
internal
svg

Jump to

Keyboard shortcuts

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