linebender / piet

An abstraction for 2D graphics.
Apache License 2.0
1.24k stars 93 forks source link

piet-svg: fix missing transform, clip when drawing image #512

Closed flxzt closed 2 years ago

flxzt commented 2 years ago

Unless I misread how piet works, I think there was a missing apply of the transform and clip path when drawing an image. This should fix it. :)

xStrom commented 2 years ago

@derekdreery you did the initial implementation of draw_image for piet-svg in #475. Does this fix here look reasonable to you?

derekdreery commented 2 years ago

Sort answer: yes.

Longer answer: I can't remember all the details of my implementation, but this PR certainly looks reasonable. Let's merge it and if there are issues they'll surface as people use the lib. Sorry I don't have more time to look at it more thoroughly.