// Generated API outline. Implementation bodies omitted. #nullable enable using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using System.Threading; using System; using nfloat = System.Runtime.InteropServices.NFloat; using static Xui.Core.Math2D.Constants; namespace Xui.Core.Canvas.Symbols { using Xui.Core.Canvas.Composition.Commands; using Xui.Core.Math2D; /// /// Immutable, shareable drawing instructions. Recorded placements retain this exact definition, /// even when its key is subsequently updated. Storage is reclaimed when the last reference dies. /// public sealed class SymbolContent { /// The local clip and native recording bounds. public Rect Bounds { get; } /// Number of recorded instructions, useful for diagnostics. public int CommandCount { get; } /// /// Portable vector replay. Paint defaults belong to the definition; transform, clip, /// and brightness come from the placement. Save/Restore isolates changes to drawing state. /// The current path is consumed, as with other path drawing operations. /// public void Replay(IContext context); } } namespace Xui.Core.Canvas.Symbols { using Xui.Core.Math2D; /// Identity and local drawing bounds of a reusable symbol. public readonly struct SymbolOptions { /// A stable reference, never a boxed value or a serialized identifier. public required object Key { get; init; } /// Local drawing bounds, including strokes. Content is clipped to these bounds. public required Rect Bounds { get; init; } /// True replaces the definition; false (the default) reuses it when available. public bool HasUpdates { get; init; } } } namespace Xui.Core.Canvas.Symbols { /// A stack-only definition scope. Do not copy a live scope. Dispose before placing the symbol. public ref struct SymbolScope { /// Whether the caller must supply drawing instructions. public bool NeedsDrawing { get; } /// The definition canvas; drawing here never draws into the surrounding scene. public IContext Context { get; } /// Abandons a failed definition, preserving the previous completed content. public void Cancel(); /// Publishes balanced drawing instructions as immutable reusable content. public void Dispose(); } }