// Generated API outline. Implementation bodies omitted. #nullable enable using G16 = ushort; using RGBA = uint; using System.ComponentModel; using System.Diagnostics; using nfloat = System.Runtime.InteropServices.NFloat; namespace Xui.Runtime.Software.Actual { using System.Buffers.Binary; using System.Collections.Concurrent; using System.IO; using System.Threading.Tasks; using System; using Xui.Core.Actual; using Xui.Core.Canvas; using Xui.Core.Math2D; /// An image handle retaining the original PNG bytes for SVG embedding. public sealed class SoftwareImage : IImage { public Size Size { get; } public void Load(string uri); public async Task LoadAsync(string uri); public void LoadPixels(int width, int height, ReadOnlySpan bgra32Data); } /// Cached packaged PNG resources for deterministic, self-contained SVG rendering. public sealed class SoftwareImagePipeline : IImagePipeline { public SoftwareImagePipeline(string? baseDirectory = null); public IImage CreateImage(); } } namespace Xui.Runtime.Software.Actual { using Catalog = Xui.Runtime.Software.Font.Catalog; using Xui.Core.Canvas; /// /// A lightweight backed by the software font /// . Used to provide text hit-testing for pointer events /// without needing a full drawing context. /// public sealed class SoftwareTextMeasureContext : ITextMeasureContext { public SoftwareTextMeasureContext(Catalog catalog); public TextMetrics MeasureText(string text); public void SetFont(Xui.Core.Canvas.Font font); } } namespace Xui.Runtime.Software.Actual { using System.Collections.Generic; using System; using Xui.Core.Canvas.Composition.Graphics; using Xui.Core.Canvas; public sealed partial class SvgDrawingContext { /// /// Emits an explicit SVG group, even with no transform or drawing. A new export always /// needs content, independently of HasUpdates and any other context's native cache. /// public CompositionGroup Group(scoped in GroupOptions options); /// /// Closes the innermost group. Called by ; /// prefer disposing the returned scope over calling this directly. /// public void EndGroup(); } } namespace Xui.Runtime.Software.Actual { using System.Collections.Generic; using System; using Xui.Core.Canvas; using Xui.Core.Math2D; public sealed partial class SvgDrawingContext { } } namespace Xui.Runtime.Software.Actual { using System.Collections.Generic; using System.IO; using System.Text; using System; using Xui.Core.Canvas.Symbols; using Xui.Core.Canvas; using Xui.Core.Math2D; public sealed partial class SvgDrawingContext { /// Writes one vector definition and a use element for each placement. public void DrawSymbol(SymbolContent content); } } namespace Xui.Runtime.Software.Actual { using System.Collections.Generic; using System.Collections; using System.IO; using System.Linq; using System.Runtime.InteropServices.Marshalling; using System.Runtime.InteropServices; using System.Text; using System; using Xui.Core.Canvas.Filter; using Xui.Core.Canvas; using Xui.Core.Curves2D; using Xui.Core.Math2D; using Xui.Runtime.Software.Font; public sealed partial class SvgDrawingContext : IContext, IDisposable { public void SetFilter(); public void SetFilter(Brightness brightness); public nfloat GlobalAlpha { get; set; } public LineCap LineCap { get; set; } public LineJoin LineJoin { get; set; } public nfloat LineWidth { get; set; } public nfloat MiterLimit { get; set; } public nfloat LineDashOffset { get; set; } public TextAlign TextAlign { get; set; } public TextBaseline TextBaseline { get; set; } /// Characters and adjacent pairs rendered for each resolved font face. public IReadOnlyDictionary FontUsage { get; } public SvgDrawingContext(Size canvasSize, Stream output, IEnumerable fontUris, SvgFontResolver? resolver = null, NumericFormat? numericFormat = null, bool keepOpen = false); /// Creates an SVG context with lazily loaded application font resources. public SvgDrawingContext(Size canvasSize, Stream output, IFontSource fontSource, SvgFontResolver? resolver = null, NumericFormat? numericFormat = null, bool keepOpen = false); public SvgDrawingContext(Size canvasSize, Stream output, bool keepOpen = false); public SvgDrawingContext(Size canvasSize, Stream output, Catalog? catalog, SvgFontResolver? resolver = null, NumericFormat? numericFormat = null, bool keepOpen = false); public void Dispose(); public abstract class NumericFormat { public abstract string Format(nfloat number); public static NumericFormat Default { get; } } /// /// Delegate-based resolver that provides how a specific font should be handled in an SVG. /// public class SvgFontResolver { public static readonly SvgFontResolver Default; /// Embed only used glyphs and kerning pairs from each resolved font face. public static readonly SvgFontResolver Embedded; public virtual Resolved Resolve(FontFace face, Uri? uri); } public record struct Resolved(SvgFontMode Mode, Uri? WebUri); /// /// Determines how to emit fonts inside an SVG. /// public enum SvgFontMode { /// Assume the font is installed in the system; only use font-family="...". System, /// Emit a link to an external font using @font-face with a resolved URI. WebLink, /// Embed the font data as base64 using a data URI inside @font-face. Embedded } } }