Class Handle
- Namespace
- Rsvg
- Assembly
- Rsvg-2.0.dll
public class Handle : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
Handle
- Implements
- Inherited Members
Constructors
Handle(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 Handle(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
Handle(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Handle(CreationData data)
Parameters
dataCreationData
Handle(HandleHandle)
protected Handle(HandleHandle handle)
Parameters
handleHandleHandle
Fields
BaseUriPropertyDefinition
public static readonly Property<string?, Handle> BaseUriPropertyDefinition
Field Value
DescPropertyDefinition
public static readonly Property<string?, Handle> DescPropertyDefinition
Field Value
DpiXPropertyDefinition
public static readonly Property<double, Handle> DpiXPropertyDefinition
Field Value
DpiYPropertyDefinition
public static readonly Property<double, Handle> DpiYPropertyDefinition
Field Value
EmPropertyDefinition
public static readonly Property<double, Handle> EmPropertyDefinition
Field Value
ExPropertyDefinition
public static readonly Property<double, Handle> ExPropertyDefinition
Field Value
FlagsPropertyDefinition
public static readonly Property<HandleFlags, Handle> FlagsPropertyDefinition
Field Value
HeightPropertyDefinition
public static readonly Property<int, Handle> HeightPropertyDefinition
Field Value
MetadataPropertyDefinition
public static readonly Property<string?, Handle> MetadataPropertyDefinition
Field Value
TitlePropertyDefinition
public static readonly Property<string?, Handle> TitlePropertyDefinition
Field Value
WidthPropertyDefinition
public static readonly Property<int, Handle> WidthPropertyDefinition
Field Value
Properties
BaseUri
public string? BaseUri { get; set; }
Property Value
Desc
public string? Desc { get; }
Property Value
DpiX
public double DpiX { get; set; }
Property Value
DpiY
public double DpiY { get; set; }
Property Value
Em
public double Em { get; }
Property Value
Ex
public double Ex { get; }
Property Value
Flags
public HandleFlags Flags { get; }
Property Value
Height
public int Height { get; }
Property Value
Metadata
public string? Metadata { get; }
Property Value
Title
public string? Title { get; }
Property Value
Width
public int Width { get; }
Property Value
Methods
Close()
public bool Close()
Returns
GetBaseUri()
[Version("2.8")]
public string GetBaseUri()
Returns
GetDesc()
[Version("2.4")]
public string? GetDesc()
Returns
GetDimensions(out DimensionData)
[Version("2.14")]
public void GetDimensions(out DimensionData dimensionData)
Parameters
dimensionDataDimensionData
GetDimensionsSub(out DimensionData, string?)
[Version("2.22")]
public bool GetDimensionsSub(out DimensionData dimensionData, string? id)
Parameters
dimensionDataDimensionDataidstring
Returns
GetGType()
public static Type GetGType()
Returns
GetGeometryForElement(string?, out Rectangle, out Rectangle)
[Version("2.46")]
public bool GetGeometryForElement(string? id, out Rectangle outInkRect, out Rectangle outLogicalRect)
Parameters
Returns
GetGeometryForLayer(string?, Rectangle, out Rectangle, out Rectangle)
[Version("2.46")]
public bool GetGeometryForLayer(string? id, Rectangle viewport, out Rectangle outInkRect, out Rectangle outLogicalRect)
Parameters
Returns
GetIntrinsicDimensions(out bool, out Length, out bool, out Length, out bool, out Rectangle)
[Version("2.46")]
public void GetIntrinsicDimensions(out bool outHasWidth, out Length outWidth, out bool outHasHeight, out Length outHeight, out bool outHasViewbox, out Rectangle outViewbox)
Parameters
outHasWidthbooloutWidthLengthoutHasHeightbooloutHeightLengthoutHasViewboxbooloutViewboxRectangle
GetIntrinsicSizeInPixels(out double, out double)
[Version("2.52")]
public bool GetIntrinsicSizeInPixels(out double outWidth, out double outHeight)
Parameters
Returns
GetMetadata()
[Version("2.9")]
public string? GetMetadata()
Returns
GetPixbuf()
public Pixbuf? GetPixbuf()
Returns
GetPixbufAndError()
[Version("2.59")]
public Pixbuf? GetPixbufAndError()
Returns
GetPixbufSub(string?)
[Version("2.14")]
public Pixbuf? GetPixbufSub(string? id)
Parameters
idstring
Returns
GetPositionSub(out PositionData, string?)
[Version("2.22")]
public bool GetPositionSub(out PositionData positionData, string? id)
Parameters
positionDataPositionDataidstring
Returns
GetTitle()
[Version("2.4")]
public string? GetTitle()
Returns
HasSub(string)
[Version("2.22")]
public bool HasSub(string id)
Parameters
idstring
Returns
InternalSetTesting(bool)
public void InternalSetTesting(bool testing)
Parameters
testingbool
New()
public static Handle New()
Returns
NewFromData(Span<byte>)
[Version("2.14")]
public static Handle? NewFromData(Span<byte> data)
Parameters
Returns
NewFromFile(string)
[Version("2.14")]
public static Handle? NewFromFile(string filename)
Parameters
filenamestring
Returns
NewFromGfileSync(File, HandleFlags, Cancellable?)
[Version("2.32")]
public static Handle? NewFromGfileSync(File file, HandleFlags flags, Cancellable? cancellable)
Parameters
fileFileflagsHandleFlagscancellableCancellable
Returns
NewFromPointer(nint, bool)
Creates a new managed Handle instance for a given pointer.
public static Handle NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewFromStreamSync(InputStream, File?, HandleFlags, Cancellable?)
[Version("2.32")]
public static Handle? NewFromStreamSync(InputStream inputStream, File? baseFile, HandleFlags flags, Cancellable? cancellable)
Parameters
inputStreamInputStreambaseFileFileflagsHandleFlagscancellableCancellable
Returns
NewWithFlags(HandleFlags)
[Version("2.36")]
public static Handle NewWithFlags(HandleFlags flags)
Parameters
flagsHandleFlags
Returns
NewWithProperties(ConstructArgument[])
Creates a new Handle and sets the properties specified by the construct arguments.
public static Handle NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
ReadStreamSync(InputStream, Cancellable?)
[Version("2.32")]
public bool ReadStreamSync(InputStream stream, Cancellable? cancellable)
Parameters
streamInputStreamcancellableCancellable
Returns
RenderCairo(Context)
[Version("2.14")]
public bool RenderCairo(Context cr)
Parameters
crContext
Returns
RenderCairoSub(Context, string?)
[Version("2.14")]
public bool RenderCairoSub(Context cr, string? id)
Parameters
Returns
RenderDocument(Context, Rectangle)
[Version("2.46")]
public bool RenderDocument(Context cr, Rectangle viewport)
Parameters
Returns
RenderElement(Context, string?, Rectangle)
[Version("2.46")]
public bool RenderElement(Context cr, string? id, Rectangle elementViewport)
Parameters
Returns
RenderLayer(Context, string?, Rectangle)
[Version("2.46")]
public bool RenderLayer(Context cr, string? id, Rectangle viewport)
Parameters
Returns
SetBaseGfile(File)
[Version("2.32")]
public void SetBaseGfile(File baseFile)
Parameters
baseFileFile
SetBaseUri(string)
[Version("2.9")]
public void SetBaseUri(string baseUri)
Parameters
baseUristring
SetCancellableForRendering(Cancellable?)
[Version("2.59.0")]
public void SetCancellableForRendering(Cancellable? cancellable)
Parameters
cancellableCancellable
SetDpi(double)
[Version("2.8")]
public void SetDpi(double dpi)
Parameters
dpidouble
SetDpiXY(double, double)
[Version("2.8")]
public void SetDpiXY(double dpiX, double dpiY)
Parameters
SetSizeCallback(SizeFunc?)
public void SetSizeCallback(SizeFunc? sizeFunc)
Parameters
sizeFuncSizeFunc
SetStylesheet(Span<byte>)
[Version("2.48")]
public bool SetStylesheet(Span<byte> css)
Parameters
Returns
Write(Span<byte>)
public bool Write(Span<byte> buf)