Xui.Core.Canvas.Symbols
Assembly: Xui.Core · C# declarations · Assembly overview
Types
class SymbolContent
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
{
public Rect Bounds { get; }
public int CommandCount { get; }
public void Replay(IContext context);
}
Rect SymbolContent.Bounds
public Rect Bounds { get; }
The local clip and native recording bounds.
int SymbolContent.CommandCount
public int CommandCount { get; }
Number of recorded instructions, useful for diagnostics.
SymbolContent.~SymbolContent()
Returns pooled storage after all retained placements are released.
void SymbolContent.Replay(IContext context)
public void Replay(IContext context);
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.
readonly struct SymbolOptions
Identity and local drawing bounds of a reusable symbol.
public readonly struct SymbolOptions
{
public required object Key { get; init; }
public required Rect Bounds { get; init; }
public bool HasUpdates { get; init; }
}
Rect SymbolOptions.Bounds
public required Rect Bounds { get; init; }
Local drawing bounds, including strokes. Content is clipped to these bounds.
bool SymbolOptions.HasUpdates
public bool HasUpdates { get; init; }
True replaces the definition; false (the default) reuses it when available.
object SymbolOptions.Key
public required object Key { get; init; }
A stable reference, never a boxed value or a serialized identifier.
ref struct SymbolScope
A stack-only definition scope. Do not copy a live scope. Dispose before placing the symbol.
public ref struct SymbolScope
{
public bool NeedsDrawing { get; }
public IContext Context { get; }
public void Cancel();
public void Dispose();
}
void SymbolScope.Cancel()
public void Cancel();
Abandons a failed definition, preserving the previous completed content.
IContext SymbolScope.Context
public IContext Context { get; }
The definition canvas; drawing here never draws into the surrounding scene.
void SymbolScope.Dispose()
public void Dispose();
Publishes balanced drawing instructions as immutable reusable content.
bool SymbolScope.NeedsDrawing
public bool NeedsDrawing { get; }
Whether the caller must supply drawing instructions.