spakin / SimpInkScr

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

Error in y-position #132

Closed dov closed 7 months ago

dov commented 7 months ago

I tried one of your sample script, but the resulting circle ended up in the wrong y-position.

What I did:

  1. Opened the (empty) attached document simple-inkscape-script-position.svg
  2. Open the Simple Inkscape Scripting extension
  3. Added the following script from your documentation and pressed Apply.
    circle((canvas.width/2, canvas.height/2), 50)

**Expected result:***

The circle should appear in the center of the canvas.

Actual result:

The circle appeared "above" the canvas, see attached screenshot. simple-inkscape-script-position

simple-inkscape-script-position

dov commented 7 months ago

Oh, I found it. I had a global

  <g
     inkscape:label="Layer 1"
     inkscape:groupmode="layer"
     id="layer1"
     transform="translate(0,-744.56693)" />

Node in my (template) document. Not sure why. But once I removed it, everything works as expected.