DemaConsulting.Rendering.Svg
0.1.0-beta.4
Prefix Reserved
dotnet add package DemaConsulting.Rendering.Svg --version 0.1.0-beta.4
NuGet\Install-Package DemaConsulting.Rendering.Svg -Version 0.1.0-beta.4
<PackageReference Include="DemaConsulting.Rendering.Svg" Version="0.1.0-beta.4" />
<PackageVersion Include="DemaConsulting.Rendering.Svg" Version="0.1.0-beta.4" />
<PackageReference Include="DemaConsulting.Rendering.Svg" />
paket add DemaConsulting.Rendering.Svg --version 0.1.0-beta.4
#r "nuget: DemaConsulting.Rendering.Svg, 0.1.0-beta.4"
#:package DemaConsulting.Rendering.Svg@0.1.0-beta.4
#addin nuget:?package=DemaConsulting.Rendering.Svg&version=0.1.0-beta.4&prerelease
#tool nuget:?package=DemaConsulting.Rendering.Svg&version=0.1.0-beta.4&prerelease
Rendering
General-purpose diagram layout and rendering for .NET. Describe a diagram as a graph, lay it out with a pluggable algorithm, and render it to SVG, PNG, JPEG, or WEBP. The design is inspired by the Eclipse Layout Kernel (ELK): layout and rendering are configured through an open, extensible property system, and new algorithms, renderers, and options are added additively.
Packages
The library is split into focused packages so consumers take only what they need:
| Package | Purpose |
|---|---|
DemaConsulting.Rendering |
Layout model: the LayoutTree IR, the property system, and the input LayoutGraph |
DemaConsulting.Rendering.Abstractions |
SPI: ILayoutAlgorithm/IRenderer, registries, Theme, notation metrics |
DemaConsulting.Rendering.Layout |
Layout algorithms: the layered pipeline and LayeredLayoutAlgorithm |
DemaConsulting.Rendering.Svg |
SVG renderer with zero external dependencies |
DemaConsulting.Rendering.Skia |
SkiaSharp raster renderers (PNG, JPEG, WEBP) with an embedded Noto Sans font |
Package dependencies form an acyclic graph: Abstractions and Layout depend on the model;
Svg and Skia depend on the model and Abstractions; the model depends on nothing.
Installation
dotnet add package DemaConsulting.Rendering.Layout
dotnet add package DemaConsulting.Rendering.Svg
Usage
using System.IO;
using DemaConsulting.Rendering;
using DemaConsulting.Rendering.Abstractions;
using DemaConsulting.Rendering.Layout;
using DemaConsulting.Rendering.Svg;
// Describe the diagram as a graph of sized boxes and directed edges.
var graph = new LayoutGraph();
var a = graph.AddNode("a", width: 80, height: 40);
var b = graph.AddNode("b", width: 80, height: 40);
graph.AddEdge("a-b", a, b);
// Lay it out, then render the placed tree to SVG.
var tree = new LayeredLayoutAlgorithm().Apply(graph, new LayoutOptions());
using var output = File.Create("diagram.svg");
new SvgRenderer().Render(tree, new RenderOptions(Themes.Light), output);
See the user guide for configuration options and extension points.
API Reference
Every package ships its full API reference as compact, AI-friendly Markdown in an api/ folder
inside the NuGet package, generated from the XML documentation comments by ApiMark. Start at
api/api.md (the index) and drill into the per-namespace and per-type pages for signatures,
remarks, and usage examples.
Gallery
A rendering gallery showcases what the library can produce — every bundled layout
algorithm, orthogonal edge routing, all three themes, and both the SVG and PNG output paths. Each
image is generated by the gallery test project directly from the public API, so the gallery doubles
as an end-to-end rendering smoke test. Regenerate it with ./gallery.ps1.
Extensibility
- New layout algorithms implement
ILayoutAlgorithmand register under a new id. - New output formats implement
IRendererwith a distinct media type. - New configuration options are declared as typed
LayoutProperty<T>keys carried in an open property bag, so adding an option never changes an existing method signature.
Documentation
Generated documentation includes build notes, a user guide, a code quality report, requirements, requirement justifications, and a requirements-to-test trace matrix.
Contributing
Contributions are welcome. See CONTRIBUTING.md for development setup, coding standards, and the pull request process.
License
Copyright (c) DEMA Consulting. Licensed under the MIT License. See LICENSE for details.
By contributing to this project, you agree that your contributions will be licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- DemaConsulting.Rendering (>= 0.1.0-beta.4)
- DemaConsulting.Rendering.Abstractions (>= 0.1.0-beta.4)
-
net8.0
- DemaConsulting.Rendering (>= 0.1.0-beta.4)
- DemaConsulting.Rendering.Abstractions (>= 0.1.0-beta.4)
-
net9.0
- DemaConsulting.Rendering (>= 0.1.0-beta.4)
- DemaConsulting.Rendering.Abstractions (>= 0.1.0-beta.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-beta.4 | 117 | 7/5/2026 |
| 0.1.0-beta.3 | 50 | 7/3/2026 |
| 0.1.0-beta.2 | 156 | 7/2/2026 |
| 0.1.0-beta.1 | 46 | 7/2/2026 |