Open ruuda opened 7 years ago
From Reddit: it would be nice to add the ability to render subsets of an svg file.
Rsvg does support this with rsvg_render_handle_cairo_sub and rsvg_handle_has_sub, it would not be very difficult to expose this.
rsvg_render_handle_cairo_sub
rsvg_handle_has_sub
What would be required to implement this:
src/rsvg.rs
elements::Element::Svg
builtins::image
image_subset(fname: string, element_id: string)
runtime::Env::new
From Reddit: it would be nice to add the ability to render subsets of an svg file.
Rsvg does support this with
rsvg_render_handle_cairo_sub
andrsvg_handle_has_sub
, it would not be very difficult to expose this.What would be required to implement this:
rsvg_render_handle_cairo_sub
andrsvg_handle_has_sub
insrc/rsvg.rs
.elements::Element::Svg
to include an optional svg element id, and maybe define a wrapper struct so it can be named.builtins::image
that supports subset selection, perhapsimage_subset(fname: string, element_id: string)
.runtime::Env::new
. (Handling of builtins needs some refactoring, but for now that is where builtins are exposed.)