Closed 50U10FCA7 closed 9 months ago
tree.root.transform
This transform is ignored. Transform on root elements of subroots do not impact rendering. Weird API, I know. mask.root.transform
would not work either, and so on.
You have to pass a transform to resvg::render
. The master branch of resvg
would not allow you to modify the tree anyway.
@RazrFalcon Thanks for reply.
You have to pass a transform to
resvg::render
. The master branch ofresvg
would not allow you to modify the tree anyway.
Is it still possible to reassemble the tree in the current master? At least size
and view_box
should be able to change to render cropped/scaled images as mentioned in examples.
No, you can't modify the tree anymore. But a crop still can be implemented by passing a smaller pixmap.
So, because such behavior is correct and expected, closing this issue as solved.
Description
Transform matrix of a root element is not applied since 0.38 version. It's possible to pass it manually to
transform
argument ofresvg::render
, but the reason of this change is not clear for me.Examples
Original file:
Crop and scale in
0.37
ver:The result:
Crop and scale in
0.39
ver:The result: