I am new to inkscape and vector drawings and I am trying to sort out how things and drawn with respect to each other.
My basic problem that I am having is this. I have a drawing that I am slowly making by hand. I set the size of the canvas to be 1200x800 and decided I wanted to increase it. When I did this none of the graphics scaled with it. I was then trying to add his picture inside a webpage as svg format. I know its not IE compatible but I was trying to test with FF and worry about IE later. Manually adjusting the width and height inside the XML format changed the size of what was displayed but not the size of the graphics inside. So if I set the width and height below the canvas size I had based the design around I would end up with only a portion of the picture showing.
I am wondering how do I make shapes and lines formatted relative to the canvas size when I make them. In my head if that happens then when I adjust the canvas size the graphics will adjust with it and make it easy to post whatever size I need on the test website.
Thanks for the help in advance.
Vector Relativity
Re: Vector Relativity
The Canvas does not AUTO-ADJUST the objects within the canvas area.
having noted this here is one approach that may get you what you want:
1. leave the canvas alone, use the selector tool (F1 or spacebar) and select all your objects. for the next step you would use the Tool Controls Bar H: W: (1200x800) number fields to change the scale (size) of your objects uniformly. Note the Bottom Left corner of the selection queue will stay in place. Leaving all the items selected open the >File >Document Properties Menu (Shift + Ctrl + D) then select the "Fit page to selection" button..
You may want to use this same menu to add 5 pixels to the width/height of your page border. After you add this 5 pixel border cushion simply select all your items and Align (Shift + Ctrl + A) using "Relative to: PAGE (pull down option) this 'relative' option is at the very top of the Align menu. Now align "Center objects horizontally" and "Center objects vertically".. done
having noted this here is one approach that may get you what you want:
1. leave the canvas alone, use the selector tool (F1 or spacebar) and select all your objects. for the next step you would use the Tool Controls Bar H: W: (1200x800) number fields to change the scale (size) of your objects uniformly. Note the Bottom Left corner of the selection queue will stay in place. Leaving all the items selected open the >File >Document Properties Menu (Shift + Ctrl + D) then select the "Fit page to selection" button..
You may want to use this same menu to add 5 pixels to the width/height of your page border. After you add this 5 pixel border cushion simply select all your items and Align (Shift + Ctrl + A) using "Relative to: PAGE (pull down option) this 'relative' option is at the very top of the Align menu. Now align "Center objects horizontally" and "Center objects vertically".. done
Re: Vector Relativity
wakemaster39 wrote:In my head if that happens then when I adjust the canvas size the graphics will adjust with it and make it easy to post whatever size I need on the test website.
You are looking for the 'viewBox' attribute which allows to create SVG files that fill the browser window (stretched or proportionally) and/or resize when the browser window dimensions are changed. Inkscape does not have a user interface to add the 'viewBox' attribute: you will have to either use its built-in XML Editor to add it or (in the upcoming version Inkscape 0.48) save the file as 'Optimized SVG' which will have the option to add it.
Search for earlier topics about 'viewBox' in this forum or see for example "Scaling in Web Pages".
-
- Posts: 2
- Joined: Mon Jun 28, 2010 7:23 am
Re: Vector Relativity
Thanks for the help. I will try following the viewBow suggestions and see if I can get it working nicely. It looks promising but then again it always does on a local server before you have hundreds of other configurations looking at the broken code you didn't catch.