d2sketch

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BG_COLOR = color.N7
	FG_COLOR = color.N1
)

Variables

This section is empty.

Functions

func Arrowheads

func Arrowheads(connection d2target.Connection, srcAdj, dstAdj *geo.Point) (string, error)

func Class

func Class(shape d2target.Shape) (string, error)

func Connection

func Connection(connection d2target.Connection, path, attrs string) (string, error)

func DefineFillPatterns

func DefineFillPatterns(buf *bytes.Buffer, diagramHash string)

DefineFillPatterns adds reusable patterns that are overlayed on shapes with fill. This gives it a subtle streaky effect that subtly looks hand-drawn but not distractingly so.

func DoubleOval

func DoubleOval(shape d2target.Shape, diagramHash string) (string, error)

func DoubleRect

func DoubleRect(shape d2target.Shape, diagramHash string) (string, error)

func Oval

func Oval(shape d2target.Shape, diagramHash string) (string, error)

func Paths

func Paths(shape d2target.Shape, diagramHash string, paths []string) (string, error)

TODO need to personalize this per shape like we do in Terrastruct app

func Rect

func Rect(shape d2target.Shape, diagramHash string) (string, error)

func Table

func Table(shape d2target.Shape) (string, error)

TODO cleanup

Types

This section is empty.

Jump to

Keyboard shortcuts

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