Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotated placeimage broken #267

Closed
yha opened this issue Aug 1, 2023 · 2 comments
Closed

rotated placeimage broken #267

yha opened this issue Aug 1, 2023 · 2 comments
Labels
stale stale/inactive/superseded

Comments

@yha
Copy link

yha commented Aug 1, 2023

Placing an svg after rotate often clips the svg or draws nothing, and sometimes messes up subsequent draws as well.
Some examples with this file:
strip-tmp

s = readsvg("strip-tmp.svg")
@svg let
    rotate(-0.2)
    placeimage(s)
end 200 200

tmp

@svg for angle in 1.2:-0.2:-1.2
    @layer let
        rotate(angle)
        placeimage(s; centered=true)
        translate(50, 0)
        text(string(angle))
    end
end 800 800

tmp

@cormullion
Copy link
Member

It appears that the Rsvg.handle_render_cairo() call inside placesvg() modifies the coordinate system in such a way that, although it's enclosed in @layer ...end, changes can "leak" out into surrounding code and upset subsequent graphics.

You could try enclosing the placeimage() in another @layer ... end to see if that can really isolate the changes introduced by the Rsvg action...

@stale
Copy link

stale bot commented Aug 10, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale stale/inactive/superseded label Aug 10, 2023
@stale stale bot closed this as completed Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale stale/inactive/superseded
Projects
None yet
Development

No branches or pull requests

2 participants