ipmsvg

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFromIPM

func GenerateFromIPM(doc *model.IpmGraph) ([]byte, error)

GenerateFromIPM generates SVG from IPM model by running layout internally. Convenience wrapper that composes layout generation with SVG rendering.

func Render

func Render(graph *layout.Graph) ([]byte, error)

Render returns a minimal SVG preview for a layout graph. Convenience wrapper for Generator.Generate().

Types

type Generator

type Generator struct {
}

Generator produces minimal SVG previews from layout graphs.

Stub rendering is NOT an option: an edge whose Visibility the layout classified "stubbed" always renders as a numbered stub pair (short segment + fade + pair-number badge at each end, the full edge kept hidden as class "edge-full" for hover reveal). The flat SVG and the canvas agree on what is hidden — classify once, consume everywhere.

func NewGenerator

func NewGenerator() (*Generator, error)

NewGenerator creates a new SVG generator.

func (*Generator) Generate

func (g *Generator) Generate(graph *layout.Graph) ([]byte, error)

Generate returns a minimal SVG preview for a layout graph. Implements styling from gl:docs/dev/layout-gen/layout-alg.md (events, things, concepts sections)

func (*Generator) GenerateWithHints

func (g *Generator) GenerateWithHints(graph *layout.Graph, hints nodehints.GraphHints) ([]byte, error)

GenerateWithHints is like Generate but overlays per-node decoration symbols from the provided hints map. Nodes absent from hints render normally. pkg/ipmsvg has no knowledge of what decorations mean — it only draws them.

Jump to

Keyboard shortcuts

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