Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support drawing svg subsets #10

@ruuda

Description

@ruuda

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.

What would be required to implement this:

  • Add the ffi wrappers for rsvg_render_handle_cairo_sub and rsvg_handle_has_sub in src/rsvg.rs.
  • Change elements::Element::Svg to include an optional svg element id, and maybe define a wrapper struct so it can be named.
  • Add a variant of builtins::image that supports subset selection, perhaps image_subset(fname: string, element_id: string).
  • Expose the new function in runtime::Env::new. (Handling of builtins needs some refactoring, but for now that is where builtins are exposed.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions