Module document

Source
Expand description

Main SVG document structure.

Structsยง

AcquiredNode
AcquiredNodes
Detects circular references between nodes, and enforces referencing limits.
Document
A loaded SVG file and its derived data.
DocumentBuilder
Used to build a tree of SVG nodes while an XML document is being read.
LoadOptions
Loading options for SVG documents.
NodeStack
Keeps a stack of nodes and can check if a certain node is contained in the stack
RenderingOptions
Document-level rendering options.
Resources ๐Ÿ”’
Set of external resources (other SVG documents, or raster images) referenced by an SVG.

Enumsยง

NodeId
Identifier of a node
Resource
Any kind of resource loaded while processing an SVG document: images, or SVGs themselves.

Functionsยง

content_type_for_image ๐Ÿ”’
human_readable_url ๐Ÿ”’
Formats a URL for human consumption, as in error messages. This is to reduce very long data: URLs to an abbreviated version.
image_format ๐Ÿ”’
Decides whether the specified MIME type is supported as a raster image format.
image_loading_error_from_cairo ๐Ÿ”’
Converts a cairo::Error that happened while wrapping a decoded raster image into a LoadingError augmented with the imageโ€™s URL.
load_image_resource_from_bytes ๐Ÿ”’
Decodes BinaryData that is presumed to be a raster image.
load_image_with_image_rs ๐Ÿ”’
load_resource ๐Ÿ”’
Loads the entire contents of a URL, sniffs them, and decodes them as a Resource for an SVG or raster image.
load_svg_resource_from_bytes ๐Ÿ”’
Parses BinaryData that is known to be an SVG document, using librsvg itself.
unit_rectangle ๐Ÿ”’