Re: Writing SVG code for editing with Sodipodi
Lauris Kaplinski <[email protected]>
| Newsgroups | gmane.comp.graphics.sodipodi |
|---|---|
| Message-ID | <[email protected]> |
Hello! AFAIK unit specifiers are allowed everywhere, except inside path definitions <path d="..."> The base coordinate system for SVG are pixels, that are defined exactly as 1/96th of an inch. The easiest way to set up different base coordinate system is by usingn viewbox. <svg width="300mm" height="300mm" viewBox="0 0 300 300" ... This defines page as 300mmx300mm, and base units as 0-300 for both width and height (and thus the happen to be millimeters :-) Then you should just use unitless values everywhere. Actually this is just workaround in SVG, because in reality you are redefining base coordinate system, keeping all relative ratios between units intact. So if you now specify any length using units now, the length will be scaled up a lot. So just use unitless values. Best wishes, Lauris Kaplinski Pierre Abbat kirjutas P, 25.01.2004 kell 18:22: > I wrote a two-line program that generated a lemniscate and pasted the code > into a <path> element in a Sodipodi file. Since the width and height are in > millimeters I thought the coordinates would be in millimeters. They weren't. > The lemniscate was too small. I then edited it so that it looked like > M-87.4619707139396mm 42.4024048078213mm > M-88.2947592858927mm 41.4518786277521mm > M-89.1006524188368mm 40.4508497187474mm > and tried again. The lemniscate went flat. I removed the millimeters and > scaled it and put it in the middle of the 300*300mm square. The center is now > at 531.4961,531.4961. What unit is Sodipodi using, and how do I tell it that > the coordinates are in millimeters? > > phma ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn