Discuss Scratch

TheBestLettuce
Scratcher
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?
Auroura_WoIf
Scratcher
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
Scratcher
65 posts

SVG files load off-center

Auroura_WoIf wrote:

I don't know if this will work but you could try manually centering it in the editor
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
Auroura_WoIf
Scratcher
1000+ posts

SVG files load off-center

TheBestLettuce wrote:

Auroura_WoIf wrote:

I don't know if this will work but you could try manually centering it in the editor
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
And they definitely use a
go to x: (0) y: (0)
block so the sprite itself is centered on the stage?
TheBestLettuce
Scratcher
65 posts

SVG files load off-center

Auroura_WoIf wrote:

TheBestLettuce wrote:

Auroura_WoIf wrote:

I don't know if this will work but you could try manually centering it in the editor
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
And they definitely use a
go to x: (0) y: (0)
block so the sprite itself is centered on the stage?
Yep. The costume itself is off center.
cheddargirl
Scratch Team
1000+ posts

SVG files load off-center

TheBestLettuce wrote:

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?
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.

Last edited by cheddargirl (Sept. 21, 2018 00:21:05)

TheBestLettuce
Scratcher
65 posts

SVG files load off-center

cheddargirl wrote:

TheBestLettuce wrote:

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?
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.
One of the files I uploaded is a square but it still didn't work
cheddargirl
Scratch Team
1000+ posts

SVG files load off-center

TheBestLettuce wrote:

cheddargirl wrote:

TheBestLettuce wrote:

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?
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.
One of the files I uploaded is a square but it still didn't work
Do you have a screenshot of how the square looks on the canvas like when it's uploaded in Scratch?

Powered by DjangoBB