Platforms to show: All Mac Windows Linux Cross-Platform

Back to ReSVGMBS class.

ReSVGMBS.Constructor(data as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Creates SVG from data.

data: SVG data. Can contain SVG string or gzip compressed data. Must not be nil.

Raises exceptions in case of errors.

See also:

ReSVGMBS.Constructor(data as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Creates SVG from data.

data: SVG data. Can contain SVG string or gzip compressed data. Must not be empty.

Raises exceptions in case of errors.

See also:

ReSVGMBS.Constructor(file as FolderItem)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Creates SVG from file.
Example
// we load this file
Var file As FolderItem = SpecialFolder.Desktop.Child("test.svg")

Var p As New ReSVGMBS(file)

// and render them in their normal size:
Var pic As picture = p.RenderToPicture(p.Width, p.Height)

// show in the window
Window1.Backdrop = pic

For the files, .svg and .svgz files are supported.

Raises exceptions in case of errors.

See also:

ReSVGMBS.ImageBox(byref x as double, byref y as double, byref width as double, byref height as double) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Queries the image bounding box.

Can be smaller or bigger than a view box.

Returns true on success and sets passed variables.
Return false if an image has no elements.

ReSVGMBS.NodeBox(id as string, byref x as double, byref y as double, byref width as double, byref height as double) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Returns node's bounding box by ID.

tree Render tree.

id: Node's ID.

Returns false if a node with such an ID does not exist.
returns false if ID is an empty string.

Returns true on success and sets passed variables.

ReSVGMBS.NodeExists(id as string) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Returns true if a renderable node with such an ID exists.

Return false if a node doesn't exist or ID isn't a UTF-8 string.
Return false if a node exists, but not renderable.

ReSVGMBS.Render(width as Integer, Height as Integer, pixmap as Ptr, FitToType as Integer = 0, FitToValue as single = 0.0, transform as Ptr = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Renders the SVG onto the pixmap.

FitToType: Specifies into which region SVG should be fit.
transform: A root SVG transform. Can be used to position SVG inside the pixmap. If nil, we use identity transform.
width: Pixmap width.
height: Pixmap height.
pixmap: Pixmap data. Should have width * height * 4 bytes in size and contain premultiplied RGBA8888 pixels.

ReSVGMBS.RenderNode(ID as string, width as Integer, Height as Integer, pixmap as Ptr, FitToType as Integer = 0, FitToValue as single = 0.0, transform as Ptr = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Renders the SVG onto the pixmap.

id: Node's ID. Must not be "".
FitToType: Specifies into which region SVG should be fit.
transform: A root SVG transform. Can be used to position SVG inside the pixmap. If nil, we use identity transform.
width: Pixmap width.
height: Pixmap height.
pixmap: Pixmap data. Should have width * height * 4 bytes in size and contain premultiplied RGBA8888 pixels.

ReSVGMBS.RenderNodeToPicture(ID as string, width as Integer, Height as Integer, FitToType as Integer = 0, FitToValue as single = 0.0, transform as Ptr = nil) as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Renders the SVG as picture.

id: Node's ID. Must not be "".
FitToType: Specifies into which region SVG should be fit.
transform: A root SVG transform. Can be used to position SVG inside the picture. If nil, we use identity transform.
width: picture width.
height: picture height.

On success, we return the picture with the pixels.
Not supported for macOS 32-bit.

ReSVGMBS.RenderToFile(file as FolderItem, FitToType as Integer = 0, FitToValue as single = 0.0)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Renders SVG to file.

Only for macOS 32-bit.

ReSVGMBS.RenderToPicture(width as Integer, Height as Integer, FitToType as Integer = 0, FitToValue as single = 0.0, transform as Ptr = nil) as Picture

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Renders the SVG as picture.

FitToType: Specifies into which region SVG should be fit.
transform: A root SVG transform. Can be used to position SVG inside the picture. If nil, we use identity transform.
width: picture width.
height: picture height.

On success, we return the picture with the pixels.
Not supported for macOS 32-bit.

ReSVGMBS.ViewBox(byref x as double, byref y as double, byref width as double, byref height as double) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SVG MBS Images Plugin 23.0 ✅ Yes ✅ Yes ✅ Yes ❌ No Desktop, Console & Web
Queries the image viewbox.

Returns true on success and sets passed variables.

The items on this page are in the following plugins: MBS Images Plugin.


The biggest plugin in space...