Table of Contents

Class SVGDocument

Namespace
Xui.Runtime.Software
Assembly
Xui.Runtime.Software.dll

Renders a view tree to a standalone SVG document without creating a window or accepting input.

public sealed class SVGDocument
Inheritance
SVGDocument
Inherited Members

Remarks

This is intended for documentation, static web graphics, and deterministic component rendering. It performs the same measure, arrange, and render passes that a root view receives during a window render. Time is supplied to the layout pass, but no animation or input events are generated.

Supply FontUris whenever layout depends on a bundled font. The optional FontResolver controls whether those fonts are treated as installed, linked from the web, or embedded in the resulting SVG.

Properties

Content

The view tree to lay out and render.

public View? Content { get; set; }

Property Value

View

FontResolver

Controls how resolved font faces are represented in the SVG.

public SvgDrawingContext.SvgFontResolver FontResolver { get; set; }

Property Value

SvgDrawingContext.SvgFontResolver

FontUris

Font sources used for text measurement and optional SVG font emission. Defaults to no fonts.

public IEnumerable<Uri> FontUris { get; set; }

Property Value

IEnumerable<Uri>

NumericFormat

Controls deterministic numeric formatting in the generated SVG.

public SvgDrawingContext.NumericFormat NumericFormat { get; set; }

Property Value

SvgDrawingContext.NumericFormat

Size

The SVG viewport size. Defaults to 800 by 600 logical pixels.

public Size Size { get; set; }

Property Value

Size

Time

The deterministic time supplied as the current layout time. Defaults to zero.

public TimeSpan Time { get; set; }

Property Value

TimeSpan

Methods

ToSVG()

Lays out Content and returns a complete SVG document.

public string ToSVG()

Returns

string