render

package
v1.0.69 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package render implements a deterministic, network-free semantic SVG preview for DWS OpenNodes V1.

Index

Constants

View Source
const (
	Version        = "opennodes-svg-v1"
	DefaultPadding = 24.0
)

Variables

This section is empty.

Functions

func SortedWarningCodes

func SortedWarningCodes(warnings []Warning) []string

SortedWarningCodes is useful to callers that need a compact stable summary.

Types

type Bounds

type Bounds struct {
	X      float64 `json:"x"`
	Y      float64 `json:"y"`
	Width  float64 `json:"width"`
	Height float64 `json:"height"`
}

type Result

type Result struct {
	SVG              []byte
	Bounds           Bounds
	Fidelity         string
	NodeCount        int
	RenderedCount    int
	ExactCount       int
	ApproximateCount int
	PlaceholderCount int
	Warnings         []Warning
}

func SVG

func SVG(source *opennodes.Source) (*Result, error)

type Warning

type Warning struct {
	Code     string `json:"code"`
	NodeID   string `json:"nodeId,omitempty"`
	NodeType string `json:"nodeType,omitempty"`
	Message  string `json:"message"`
	Fidelity string `json:"fidelity"`
}

Jump to

Keyboard shortcuts

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