W3C home > Mailing lists > Public > www-svg@w3.org > February 2000

Re: Path Coordinates

From: Chris Lilley <chris@w3.org>
Date: Fri, 25 Feb 2000 21:01:14 +0100
Message-ID: <38B6DF8A.5741D581@w3.org>
To: "A. J. Wilson" <wilsonsne@home.com>
CC: www-svg@w3.org

"A. J. Wilson" wrote:
> I am attempting to manually code some SVG paths and, as far as I can
> tell, all coordinates that can be specified in the path cannot use unit
> designators.


>  Do you see this as a shortcoming?

Yes, there are cases where it would add value, but on the other hand
viewports seem to deal in practice with what people would otherwise use
units in paths for.
> I am specifically trying to set up a page size (SVG viewport) that
> mimics a 8" x 11.5" sheet of paper.  After that I want to draw paths
> on the paper and have it rendered correctly both on a  monitor and on a
> printer.

OK, you can do that.

> It seems that specifying path coordinates in pixel values defeats my
> purpose,
> because I do not know the resolution of the output device in advance.
> What am I missing?

Two things. 

One, pixels have a particular meaning (se CSS2 spec) which is not the same
as the 1/600 or 1/720 inch dots that your printer makes. 

Two, one user coordinate=one CSS pixel is the *initial* state of the
mapping from user space to device space; you can alter this and most
graphics do alter it.

For example, suppose you have map data in lattitude and longitude. You can
use this data directly in SVG, by setting the viewBox appropriately. (Note
for cartographers: these are affine transformations - mapping form
arbitrary 3D spherical coordinate systems to arbitrary 2D coordinates is
not supported)

Received on Friday, 25 February 2000 15:01:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:47 UTC