TIP: Fixing SVG viewbox

Tips and tricks you want to share with other users. Tutorials, user submitted documentation, etc.

Moderator: andrew

TIP: Fixing SVG viewbox

Postby hungerburg » Tue Sep 17, 2013 3:21 pm

This tip may be handy for people, that use QCAD to export drawings for display on the web or for print publishing.

Say, you want to make several drawings of different size objects, so that when exported to SVG the objects appear in the same place of a fixed background plane, eg. centered around the CAD origin, regardless how far they extend in any direction. And NOT draw a border around the object. The clue is, to influence, how QCAD calculates the *viewbox* of the exported SVG drawing, and that is after all quite easy:

Just put two points on all the drawings at the outermost top/bottom and left/right coordinates, that you want the plane to span (think of diagonally opposing corners of a bordering rectangle) -- the same place in all the drawings -- and voilà, when exported to SVG the viewbox will be made so, that the points are inside, even if "export Points" is set to false in the export dialogue. No border after all.
User avatar
hungerburg
Senior Member
 
Posts: 125
Joined: Fri May 28, 2010 7:35 pm

Return to QCAD 3 Tips and Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest