ohmtech-rdi / eurorack-blocks

Software to Hardware Prototyping for Eurorack using C++, Max/Gen~ or Faust
Other
293 stars 19 forks source link

Fix image draw scaling and positioning problem #649

Closed ohmtech-rdi closed 6 months ago

ohmtech-rdi commented 6 months ago

This PR fixes the way image are drawn in the context. Inkscape is working internally at 96dpi for pt to mm management, and Illustrator only save SVG in pt, and assumes 72 dpi. By using the context width and view box in cairo, we can apply a scale that will make it work for different versions and import options of Illustrator and Inkscape.

Finally, this also means we can just use native Illustrator SVG file directly.

To do: