Class SvgImageSource
- Namespace
- Forma
- Assembly
- Forma.dll
Stores an immutable, preflight-validated SVG source without graphics-device ownership.
public sealed class SvgImageSource : ScalableImageSource, IEquatable<SvgImageSource>
- Inheritance
-
SvgImageSource
- Implements
- Inherited Members
Properties
ContentIdentity
Gets the stable identity used by scalable-image caches.
public override string ContentIdentity { get; }
Property Value
ElementCount
public int ElementCount { get; }
Property Value
IntrinsicSize
Gets the source's logical intrinsic size.
public override Vector2 IntrinsicSize { get; }
Property Value
- Vector2
LocalReferenceCount
public int LocalReferenceCount { get; }
Property Value
PreserveAspectRatio
public string PreserveAspectRatio { get; }
Property Value
SourceLength
public int SourceLength { get; }
Property Value
ViewBox
public RectangleF? ViewBox { get; }
Property Value
Methods
Equals(SvgImageSource)
public bool Equals(SvgImageSource other)
Parameters
otherSvgImageSource
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
FromFile(string, SvgLoadOptions)
Loads and validates an SVG from a file, copying its bytes into the returned source.
public static SvgImageSource FromFile(string path, SvgLoadOptions options = null)
Parameters
pathstringoptionsSvgLoadOptions
Returns
FromManifestResource(Assembly, string, SvgLoadOptions)
Loads and validates an SVG from an assembly manifest resource.
public static SvgImageSource FromManifestResource(Assembly assembly, string logicalName, SvgLoadOptions options = null)
Parameters
assemblyAssemblylogicalNamestringoptionsSvgLoadOptions
Returns
FromMemory(ReadOnlyMemory<byte>, SvgLoadOptions)
Copies and validates SVG bytes from caller-owned memory.
public static SvgImageSource FromMemory(ReadOnlyMemory<byte> source, SvgLoadOptions options = null)
Parameters
sourceReadOnlyMemory<byte>optionsSvgLoadOptions
Returns
FromStream(Stream, SvgLoadOptions)
Reads and validates an SVG without taking ownership of the input stream.
public static SvgImageSource FromStream(Stream source, SvgLoadOptions options = null)
Parameters
sourceStreamoptionsSvgLoadOptions
Returns
GetHashCode()
public override int GetHashCode()
Returns
OpenStream()
Opens a read-only stream over a private copy of the validated source.
public Stream OpenStream()