Crate facet_svg_legacy

Crate facet_svg_legacy 

Source
Expand description

Facet-derived types for SVG parsing and serialization.

This crate provides strongly-typed SVG elements that can be deserialized from XML using facet-xml.

§Example

use facet_svg_legacy::Svg;

let svg_str = r#"<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
    <rect x="10" y="10" width="80" height="80" fill="blue"/>
</svg>"#;

let svg: Svg = facet_xml_legacy::from_str(svg_str).unwrap();

Re-exports§

pub use facet_xml_legacy;

Structs§

Circle
SVG circle element (<circle>)
Defs
SVG defs element (<defs>)
Desc
SVG description element (<desc>)
Ellipse
SVG ellipse element (<ellipse>)
Group
SVG group element (<g>)
Image
SVG image element (<image>)
Line
SVG line element (<line>)
Path
SVG path element (<path>)
PathData
Structured SVG path data
PathDataProxy
Proxy type for PathData - serializes as a string
Point
A single point in SVG coordinates
Points
Structured SVG points list (for polygon/polyline)
PointsProxy
Proxy type for Points - serializes as a string
Polygon
SVG polygon element (<polygon>)
Polyline
SVG polyline element (<polyline>)
Rect
SVG rect element (<rect>)
Style
SVG style element (<style>)
Svg
Root SVG element
Symbol
SVG symbol element (<symbol>)
Text
SVG text element (<text>)
Title
SVG title element (<title>)
Use
SVG use element (<use>)

Enums§

PathCommand
A single SVG path command
SvgNode
Any SVG node we care about

Constants§

SVG_NS
SVG namespace URI