XML width/height 100% changes document size

Discuss SVG code, accessible via the XML Editor.
Ringster
Posts: 7
Joined: Fri Apr 27, 2012 1:49 am

XML width/height 100% changes document size

Postby Ringster » Wed May 23, 2012 3:53 am

The following is happening...

I have a graphic 800 x 240 pixels

I change document properties to fit selection

I go to the xml editor
change
width 800 to 100%
height 240 to 100%
and add
viewport 0 0 800 240
on return to my graphic the document size is now completely different.

I have done this operation on quite a few images before without problems.

(Only thing new in my graphic itself is that I've used clone/tiling, just thought I'd mention it in case it was a known buggy feature!)

Ringster
Posts: 7
Joined: Fri Apr 27, 2012 1:49 am

Re: XML width/height 100% changes document size

Postby Ringster » Wed May 23, 2012 4:14 am

Just to add

The svgs are on the index page of http://www.gamemorize.com

The problem is with the first one, resize your window and refresh and you'll see how the second one resizes correctly but not the first one.

Before uploading I changed the xml width/height in notepad. But there is still some problem...

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: XML width/height 100% changes document size

Postby brynn » Wed May 23, 2012 5:29 am

Hhhm....resize to selection has been buggy, over the years. Or it may be more precise to say that using it can create a certain bug. Someone who understands XML will have to look at your SVG file to be sure. But I suspect the problem you describe could be related a known bug.

What happens if you try the same thing, except try it on a document where you do not use resize to selection/content?

Ringster
Posts: 7
Joined: Fri Apr 27, 2012 1:49 am

Re: XML width/height 100% changes document size

Postby Ringster » Wed May 23, 2012 5:45 am

Hey there!

After I go in and set the XML I come out to find I have a MASSIVE document page size!

I also resized the doc properties manually.

I'm just reinstalling inkscape...

Ringster
Posts: 7
Joined: Fri Apr 27, 2012 1:49 am

Re: XML width/height 100% changes document size

Postby Ringster » Wed May 23, 2012 6:04 am

Right on I'm the case!

I'm going through the xml and lo and behold the page size that 100% by 100% gives me is the size of the original clone tile I used (I happened to have been working with a massive inkscape window (each clone was 1000 x 724 pixels... now how on earth am I going to fix this!!!!!!!!

EDIT
No i'm not on the case, the results are being replicated without cloning tiles, I'm baffled. What I was doing fine two weeks ago I can't now...

Ringster
Posts: 7
Joined: Fri Apr 27, 2012 1:49 am

Re: XML width/height 100% changes document size

Postby Ringster » Wed May 23, 2012 6:47 am

HERE'S THE ANSWER

- I'm stupid

HINT (for who wants error sorting practice)
- Read again what little code I actually wrote
Yes man is lesser than even Inkscape in progress



ANSWER
viewBox not viewport (i'd been looking into them a lot last week... well that's my excuse)

Sorry for troubling any of you, thanks for your help Brynn!

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: XML width/height 100% changes document size

Postby brynn » Wed May 23, 2012 9:47 am

You're welcome. I'm glad you got it sorted out :D


Return to “SVG / XML Code”