linebender / resvg

An SVG rendering library.
Apache License 2.0
2.84k stars 229 forks source link

Cannot mutate/alter usvg::Tree #719

Closed tylers-epilog closed 8 months ago

tylers-epilog commented 9 months ago

There are several ways in which it seems that I can no longer mutate usvg::Tree objects.

  1. Cannot insert children into nodes anymore.
  2. Cannot change path stroke/fill.

There may be others, but I can't enumerate them all at the moment.

My question/concern is this: What is the new way to do this now that everything in usvg seems to be read-only? Am I supposed to build an entirely new tree if I want to modify an attribute or a node's children? Or perhaps are there new methods to do this that I'm not seeing?

Thanks!

LaurenzV commented 9 months ago

See here: https://github.com/RazrFalcon/resvg/issues/710, and in particular: https://github.com/RazrFalcon/resvg/issues/710#issuecomment-1953021277

tylers-epilog commented 9 months ago

Thanks @LaurenzV! I'll take a look at that. It's a lot to digest.

RazrFalcon commented 8 months ago

Duplicate of #710