I upload SVG of square into Scratch.mit.edu, it was not position at central (x: 0, y:…
- User
I upload SVG of square into Scratch.mit.edu, it was not position at central (x: 0, y: 0), how to get square positioned to center in Inkscape?
- Assistant
I upload SVG of square into Scratch.mit.edu, it was not position at central (x: 0, y: 0), how to get square positioned to center in Inkscape?
When you import an SVG into Scratch, the sprite's "center" corresponds to its (x: 0, y: 0) coordinate in the Scratch coordinate system. If your square is not centered at (0, 0) when imported, it means the object's actual drawing in the SVG is not positioned around the SVG's origin (0,0), or the SVG's viewBox/frame is not centered around the square.
To fix this in Inkscape so that the square is centered at the origin (0,0) when imported into Scratch, follow these steps:
Open your SVG in Inkscape.
Select the square:
Check the object’s position:
Object > Transform > Move tab).Set the square’s center at (0,0) in the SVG coordinate system:
To do this:
Object > Transform...).Unfortunately, Inkscape doesn't show the object's center coordinates directly, but you can do this by:
Method A: Using the “Select Tool” toolbar (easier in newer Inkscape versions):
Method B: Manual alignment
Set the SVG page to fit the object with center at origin (optional but recommended):
Go to File > Document Properties (Shift + Ctrl + D).
Under the Custom Size section, set Width and Height as needed or clip to your object size.
To center the canvas view, you can:
Then, adjust the viewBox or the canvas so that the origin (0,0) lies at the center of your square.
Save the SVG and import into Scratch.
If you want, I can provide a step-by-step example or a screenshot guide as well. Let me know!
Not yet included in a published release.