Skip to main content
← Back to kicad-monkey Rust Docs kicad-monkey Rust Crate API Reference

Crate kicad_monkey_svg

Crate kicad_monkey_svg 

Source
Expand description

Deterministic SVG serializer for KiCad Plotter-IR documents.

Renders typed KiCad footprint, symbol, board, and schematic-page Plotter-IR documents directly into reproducible SVG with validated styling, layer filtering, viewport fitting, and source-identity preservation.

Structs§

SvgArtifact
Rendered SVG document together with resolved viewport, bounds, and telemetry.
SvgBounds
Axis-aligned bounding box of visible rendered geometry in nanometres.
SvgColor
Validated canonical uppercase #RRGGBB or #RRGGBBAA sRGB hex color.
SvgError
Structured error returned by SVG context validation or rendering.
SvgFitOptions
Parameters controlling ViewportPolicy::Fit automatic viewport sizing.
SvgMetrics
Deterministic work and size counters reported on every SvgArtifact.
SvgRenderContextA1
Unvalidated SVG presentation policy; call SvgRenderContextA1::validate before rendering.
SvgRenderContextBuilder
Fluent builder for constructing an SvgRenderContextA1.
SvgStyleOverride
Partial style override merged in precedence order during SVG emission.
SvgViewport
Explicit SVG viewBox rectangle in integer nanometres.
SvgVisibility
Visibility toggles for schematic symbol pin annotations.
ValidatedSvgRenderContextA1
Validated, immutable SVG render context shared across direct typed renderers.

Enums§

LayerPattern
Case-sensitive KiCad layer selector (*, exact name, *.Suffix, or <unlayered>).
LayerSelection
Layer inclusion filter applied to PCB and footprint SVG renders.
PlotterOperationKind
Plotter-IR drawing operation kind addressable by style overrides.
SvgBackground
Canvas background fill policy for an emitted SVG document.
SvgErrorKind
Machine-readable category for an SvgError.
SvgFillMode
Shape fill override policy.
SvgIdentityMode
Controls whether source UUID/object identity attributes are emitted on SVG elements.
SvgLineStyle
Stroke dash-pattern override policy.
SvgPrimitiveClass
Source-owned primitive categories; shape alone does not identify a pad’s role.
SvgProfile
SVG rendering profile governing element structure and styling semantics.
SvgSemanticRole
High-level CAD semantic role used to apply theme-level style overrides.
SvgWarning
Non-fatal diagnostic warning attached to an SvgArtifact.
ViewportPolicy
Policy selecting either an explicit viewBox or automatic fit-to-content framing.

Functions§

render_board_document_svg
Render a standalone typed PCB Plotter-IR document with all layers visible.
render_board_svg
Render a projected PCB Plotter-IR artifact with full copper-stack layer filtering.
render_footprint_svg
Render a validated KiCad footprint Plotter-IR document directly to SVG.
render_schematic_page_svg
Render a projected hierarchical schematic page artifact with occurrence identity preserved.
render_schematic_svg
Render a standalone typed schematic Plotter-IR document directly to SVG.
render_symbol_svg
Render a validated KiCad symbol Plotter-IR document directly to SVG.