d2svg

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MPL-2.0 Imports: 27 Imported by: 29

Documentation

Overview

d2svg implements an SVG renderer for d2 diagrams. The input is d2exporter's output

Index

Constants

View Source
const (
	DEFAULT_PADDING            = 100
	MIN_ARROWHEAD_STROKE_WIDTH = 2
)

Variables

View Source
var LinkIcon string
View Source
var TooltipIcon string

Functions

func Render

func Render(diagram *d2target.Diagram, opts *RenderOpts) ([]byte, error)

TODO minify output at end

func RenderText added in v0.1.4

func RenderText(text string, x, height float64) string

Types

type DiagramObject added in v0.1.0

type DiagramObject interface {
	GetID() string
	GetZIndex() int
}

type RenderOpts added in v0.1.3

type RenderOpts struct {
	Pad    int
	Sketch bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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