spakin / SimpInkScr

Simple Inkscape Scripting
https://inkscape.org/~pakin/%E2%98%85simple-inkscape-scripting
GNU General Public License v3.0
320 stars 31 forks source link

Stars made with simpleinkscr are skewed when save as svg #66

Closed jumalakarhu closed 1 year ago

jumalakarhu commented 1 year ago

Stars made with simpleinkscript are skewed in browsers when svg file is either saved in inkscape or with inkex.command.write_svg(svg_root...). Funny thing is that if stars are exported as svg in inkscape or stars are transformed (moved etc) then render is ok. Stars made in inkscape are ok all the way.

I would also like to thank you for making this script. I'm teaching programming for high school kids and their assignment now is to make a Christmas card and most cards have stars :). This is a way for them to be creative with programming and get a ready to use product which is not possible with Turtle. Too often examples in basic programming are math/physics. This assignment also gives me an oppurtunity to talk about open source, version control with github and how to search for help. A lot of boxes ticked with a lot of fun :) star_skewed star_moved_ok

spakin commented 1 year ago

Stars made with simpleinkscript are skewed in browsers when svg file is either saved in inkscape or with inkex.command.write_svg(svg_root...). Funny thing is that if stars are exported as svg in inkscape or stars are transformed (moved etc) then render is ok. Stars made in inkscape are ok all the way.

I was able to reproduce this. It looks like Inkscape 1.2 added some options to the star-drawing API that solve the problem. I'll soon commit a modification to Simple Inkscape Scripting that uses the new API when available.

I would also like to thank you for making this script. I'm teaching programming for high school kids and their assignment now is to make a Christmas card and most cards have stars :). This is a way for them to be creative with programming and get a ready to use product which is not possible with Turtle. Too often examples in basic programming are math/physics. This assignment also gives me an oppurtunity to talk about open source, version control with github and how to search for help. A lot of boxes ticked with a lot of fun :)

I'm glad you find it useful!