Class Svg
- Namespace
- Gtk
- Assembly
- Gtk-4.0.dll
public class Svg : Object, Paintable, SymbolicPaintable, NativeObject, IDisposable, GTypeProvider, InstanceFactory
- Inheritance
-
Svg
- Implements
- Inherited Members
Constructors
Svg(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public Svg(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
Svg(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Svg(CreationData data)
Parameters
dataCreationData
Svg(SvgHandle)
protected Svg(SvgHandle handle)
Parameters
handleSvgHandle
Fields
ErrorSignal
Signal Descriptor for OnError.
public static readonly Signal<Svg, Svg.ErrorSignalArgs> ErrorSignal
Field Value
FeaturesPropertyDefinition
public static readonly Property<SvgFeatures, Svg> FeaturesPropertyDefinition
Field Value
InvalidateContentsSignal
Signal Descriptor for OnInvalidateContents.
public static readonly Signal<Paintable> InvalidateContentsSignal
Field Value
InvalidateSizeSignal
Signal Descriptor for OnInvalidateSize.
public static readonly Signal<Paintable> InvalidateSizeSignal
Field Value
PlayingPropertyDefinition
public static readonly Property<bool, Svg> PlayingPropertyDefinition
Field Value
ResourcePropertyDefinition
public static readonly Property<string?, Svg> ResourcePropertyDefinition
Field Value
StatePropertyDefinition
public static readonly Property<uint, Svg> StatePropertyDefinition
Field Value
WeightPropertyDefinition
public static readonly Property<double, Svg> WeightPropertyDefinition
Field Value
Properties
Features
public SvgFeatures Features { get; set; }
Property Value
Playing
public bool Playing { get; set; }
Property Value
Resource
public string? Resource { get; set; }
Property Value
State
public uint State { get; set; }
Property Value
Weight
public double Weight { get; set; }
Property Value
Methods
ComputeConcreteSize(double, double, double, double, out double, out double)
public void ComputeConcreteSize(double specifiedWidth, double specifiedHeight, double defaultWidth, double defaultHeight, out double concreteWidth, out double concreteHeight)
Parameters
specifiedWidthdoublespecifiedHeightdoubledefaultWidthdoubledefaultHeightdoubleconcreteWidthdoubleconcreteHeightdouble
GetCurrentImage()
public Paintable GetCurrentImage()
Returns
GetFeatures()
[Version("4.22")]
public SvgFeatures GetFeatures()
Returns
GetFlags()
public PaintableFlags GetFlags()
Returns
GetGType()
public static Type GetGType()
Returns
GetIntrinsicAspectRatio()
public double GetIntrinsicAspectRatio()
Returns
GetIntrinsicHeight()
public int GetIntrinsicHeight()
Returns
GetIntrinsicWidth()
public int GetIntrinsicWidth()
Returns
GetState()
[Version("4.22")]
public uint GetState()
Returns
GetStateNames(out uint)
[Version("4.22")]
public string[]? GetStateNames(out uint length)
Parameters
lengthuint
Returns
- string[]
GetWeight()
[Version("4.22")]
public double GetWeight()
Returns
InvalidateContents()
public void InvalidateContents()
InvalidateSize()
public void InvalidateSize()
LoadFromBytes(Bytes)
[Version("4.22")]
public void LoadFromBytes(Bytes bytes)
Parameters
bytesBytes
LoadFromResource(string)
[Version("4.22")]
public void LoadFromResource(string path)
Parameters
pathstring
New()
[Version("4.22")]
public static Svg New()
Returns
NewFromBytes(Bytes)
[Version("4.22")]
public static Svg NewFromBytes(Bytes bytes)
Parameters
bytesBytes
Returns
NewFromPointer(nint, bool)
Creates a new managed Svg instance for a given pointer.
public static Svg NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewFromResource(string)
[Version("4.22")]
public static Svg NewFromResource(string path)
Parameters
pathstring
Returns
NewWithProperties(ConstructArgument[])
Creates a new Svg and sets the properties specified by the construct arguments.
public static Svg NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
Pause()
[Version("4.22")]
public void Pause()
Play()
[Version("4.22")]
public void Play()
Serialize()
[Version("4.22")]
public Bytes Serialize()
Returns
SetFeatures(SvgFeatures)
[Version("4.22")]
public void SetFeatures(SvgFeatures features)
Parameters
featuresSvgFeatures
SetFrameClock(FrameClock)
[Version("4.22")]
public void SetFrameClock(FrameClock clock)
Parameters
clockFrameClock
SetState(uint)
[Version("4.22")]
public void SetState(uint state)
Parameters
stateuint
SetWeight(double)
[Version("4.22")]
public void SetWeight(double weight)
Parameters
weightdouble
Snapshot(Snapshot, double, double)
public void Snapshot(Snapshot snapshot, double width, double height)
Parameters
SnapshotSymbolic(Snapshot, double, double, RGBA[])
[Version("4.6")]
public void SnapshotSymbolic(Snapshot snapshot, double width, double height, RGBA[] colors)
Parameters
SnapshotWithWeight(Snapshot, double, double, RGBA[], double)
[Version("4.22")]
public void SnapshotWithWeight(Snapshot snapshot, double width, double height, RGBA[] colors, double weight)
Parameters
WriteToFile(string)
[Version("4.22")]
public bool WriteToFile(string filename)
Parameters
filenamestring
Returns
Events
OnError
public event SignalHandler<Svg, Svg.ErrorSignalArgs> OnError
Event Type
OnInvalidateContents
public event SignalHandler<Paintable> OnInvalidateContents
Event Type
OnInvalidateSize
public event SignalHandler<Paintable> OnInvalidateSize