Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » SVG files load off-center
- TheBestLettuce
-
65 posts
SVG files load off-center
My browser / operating system: Windows NT 10.0, Chrome 68.0.3440.106, Flash 31.0 (release 0)
I'm trying to upload some vector SVG files onto my scratch game but when the load on, the drawings are off-center. When I make the SVG file in Inkscape, I make sure to move the drawing to the center of the page (0,0) before I export it. How can I fix this?
I'm trying to upload some vector SVG files onto my scratch game but when the load on, the drawings are off-center. When I make the SVG file in Inkscape, I make sure to move the drawing to the center of the page (0,0) before I export it. How can I fix this?
- Auroura_WoIf
-
1000+ posts
SVG files load off-center
I don't know if this will work but you could try manually centering it in the editor
- TheBestLettuce
-
65 posts
SVG files load off-center
I could do that and I've been doing that ever since I discovered this problem, but the game I'm making requires sprites to be exactly centered, I can't do that by hand I don't know if this will work but you could try manually centering it in the editor
- Auroura_WoIf
-
1000+ posts
SVG files load off-center
And they definitely use aI could do that and I've been doing that ever since I discovered this problem, but the game I'm making requires sprites to be exactly centered, I can't do that by hand I don't know if this will work but you could try manually centering it in the editor
go to x: (0) y: (0)block so the sprite itself is centered on the stage?
- TheBestLettuce
-
65 posts
SVG files load off-center
Yep. The costume itself is off center.And they definitely use aI could do that and I've been doing that ever since I discovered this problem, but the game I'm making requires sprites to be exactly centered, I can't do that by hand I don't know if this will work but you could try manually centering it in the editorgo to x: (0) y: (0)block so the sprite itself is centered on the stage?
- cheddargirl
-
1000+ posts
SVG files load off-center
Is the drawing an irregular shape? If so, you could try putting in a rectangle (one that is larger than the image, preferably 480 px long and 360 px tall) in the back and centered at 0,0 before exporting. This should force Scratch to center the object upon upload, and then you can delete the rectangle afterwards. My browser / operating system: Windows NT 10.0, Chrome 68.0.3440.106, Flash 31.0 (release 0)
I'm trying to upload some vector SVG files onto my scratch game but when the load on, the drawings are off-center. When I make the SVG file in Inkscape, I make sure to move the drawing to the center of the page (0,0) before I export it. How can I fix this?
Last edited by cheddargirl (Sept. 21, 2018 00:21:05)
- TheBestLettuce
-
65 posts
SVG files load off-center
One of the files I uploaded is a square but it still didn't workIs the drawing an irregular shape? If so, you could try putting in a rectangle (one that is larger than the image, preferably 480 px long and 360 px tall) in the back and centered at 0,0 before exporting. This should force Scratch to center the object upon upload, and then you can delete the rectangle afterwards. My browser / operating system: Windows NT 10.0, Chrome 68.0.3440.106, Flash 31.0 (release 0)
I'm trying to upload some vector SVG files onto my scratch game but when the load on, the drawings are off-center. When I make the SVG file in Inkscape, I make sure to move the drawing to the center of the page (0,0) before I export it. How can I fix this?
- cheddargirl
-
1000+ posts
SVG files load off-center
Do you have a screenshot of how the square looks on the canvas like when it's uploaded in Scratch?One of the files I uploaded is a square but it still didn't workIs the drawing an irregular shape? If so, you could try putting in a rectangle (one that is larger than the image, preferably 480 px long and 360 px tall) in the back and centered at 0,0 before exporting. This should force Scratch to center the object upon upload, and then you can delete the rectangle afterwards. My browser / operating system: Windows NT 10.0, Chrome 68.0.3440.106, Flash 31.0 (release 0)
I'm trying to upload some vector SVG files onto my scratch game but when the load on, the drawings are off-center. When I make the SVG file in Inkscape, I make sure to move the drawing to the center of the page (0,0) before I export it. How can I fix this?
- Discussion Forums
- » Bugs and Glitches
-
» SVG files load off-center