Skip to main content

Class SvgSource

Namespace: VelloSharp.Avalonia.Svg
Assembly: VelloSharp.Avalonia.Svg.dll

Wraps a Vello-backed SVG and mirrors the legacy loading helper surface.

[TypeConverter(typeof(SvgSourceTypeConverter))]
public sealed class SvgSource : IDisposable

Inheritance

objectSvgSource

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

SvgSource(Uri?)

public SvgSource(Uri? baseUri)

Parameters

baseUri Uri?

SvgSource(IServiceProvider)

public SvgSource(IServiceProvider services)

Parameters

services IServiceProvider

Properties

Css

public string? Css { get; init; }

Property Value

string?

EnableThrowOnMissingResource

public static bool EnableThrowOnMissingResource { get; set; }

Property Value

bool

Entities

public Dictionary<string, string>? Entities { get; init; }

Property Value

Dictionary<string, string>?

Path

[Content]
public string? Path { get; init; }

Property Value

string?

Size

public Size Size { get; }

Property Value

Size

Sync

public object Sync { get; }

Property Value

object

Vello

public VelloSvg? Vello { get; }

Property Value

VelloSvg?

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Load(string, Uri?, SvgParameters?)

public static SvgSource Load(string path, Uri? baseUri = null, SvgParameters? parameters = null)

Parameters

path string

baseUri Uri?

parameters SvgParameters?

Returns

SvgSource

LoadFromStream(Stream, SvgParameters?)

public static SvgSource LoadFromStream(Stream stream, SvgParameters? parameters = null)

Parameters

stream Stream

parameters SvgParameters?

Returns

SvgSource

LoadFromSvg(string, SvgParameters?)

public static SvgSource LoadFromSvg(string svg, SvgParameters? parameters = null)

Parameters

svg string

parameters SvgParameters?

Returns

SvgSource

ReLoad(SvgParameters?)

public void ReLoad(SvgParameters? parameters = null)

Parameters

parameters SvgParameters?