W3C home > Mailing lists > Public > www-svg@w3.org > June 2001

Re: question on spec

From: Wendell Piez <wapiez@mulberrytech.com>
Date: Wed, 27 Jun 2001 11:14:26 +0100
Message-Id: <5.0.2.1.0.20010627103157.02765da0@earthlink.net>
To: "Jon Ferraiolo" <jferraio@Adobe.COM>
Cc: www-svg@w3.org
Hi Jon,

Thanks for being so responsive!

Let me frame the question another way:

What is a "user unit" and what is its relation to a "px" measurement 
(irrespective of whether the px is an actual pixel size, or an abstract 
measurement as it evidently needs to be, sometimes)?

Alternatively, what is the difference between:

<rect x="0" y="0" width="90" height="90"/>

and

<rect x="0" y="0" width="90px" height="90px"/>

or does 7.10 define them to be the same?

It does seem to me that a case can be made that the ratio between pixels 
and absolute measures such as inches, should be system-dependent. In this 
case, there'd be a big difference between

<rect x="0" y="0" width="90px" height="90px"/>

and

<rect x="0" y="0" width="1in" height="1in"/>

But this isn't what 7.10 is now saying. Rather, it states that the relation 
between px and (say) inches is fixed at 90px/in (and so 90 user units / 
inch). Thus, an SVG "inch" is defined as 90px (90 user units). If this is 
the case, then an inch is not always an inch, and the line "Note that use 
of px units or any other absolute unit identifiers can cause inconsistent 
visual results" makes good sense. But the rationale offered for that 
statement, "since the size of '1px' may map to a different number of user 
units on different systems" does not. Rather, it would be because 1px is 
simply not the same size on different systems. But 1px is still one user unit.

I guess that either (a) SVG should simply define that 1in = 90px, etc. (it 
following that "absolute" measures are in fact system-dependent (for 
example on a 120dpi system an "inch" would be 0.75 inches), or (b) SVG 
should define the relation between px and the absolute measures as 
system-dependent. It could be that (at least in this context, I can't speak 
to the whole spec) the concept of "user unit" is getting in the way here -- 
there seems to be some implicit notion that a user unit is *always* 1/90 
in, but a pixel is *not*, but this contradicts the stated definitions.

For now, I guess I'll simply say "an unlabelled measure, e.g. width='100', 
gives user units, which are actually pixels, and system-dependent; 
'absolute' units are defined relative to user units, and thus cannot be 
assumed to correspond to 'real' inches and centimeters". This describes 
what the viewers are actually doing, doesn't it?

Anyway, thanks for your feedback, and for confirming that you are working 
on the language. And if I'm getting something wrong here, please let me know!

Regards,
Wendell

At 12:00 AM 6/27/01, you wrote:
>Wendell,
>
>There will be some clarifications in the Proposed Recommendation of the 
>SVG specification in this area. Some clarifications have already been done 
>(by not yet made public), but based on your comments below, I think 
>additional minor cleanup would help reduce confusion.
>
>There are really two situations for "px" units:
>
>1) On the outermost 'svg' element, you can define the instrinsic 
>width/height of the graphic in "px" units. In this use case, a "px" is 
>generally an system-dependent unit of measure. On many systems, a "px" 
>will map to one device pixel, and different devices have different 
>resolutions, so "px" might cause different sizes rendering on different 
>systems. Also, on very high-res monitors or on printers, a "px" might be 
>an abstract measurement typically in the range of 1/72 to 1/120 inch, 
>again possibly causes different rendering sizes on different systems.
>
>This case is the reason for the words: "...use of px units ... can cause 
>inconsistent visual results on different viewing environments since the 
>size of '1px' may map to a different number of user units on different 
>systems..." But now that you bring this up, I think some additional 
>rewording may be warranted.
>
>2) Otherwise, "A px unit and a user unit are defined to be equivalent in SVG."
>
>Jon Ferraiolo
>SVG Editor
>jferraio@adobe.com
>
>At 03:59 PM 6/26/01 +0100, Wendell Piez wrote:
>>Hi,
>>
>>How do I reconcile the statement in the SVG CR, section 7.10, "Units":
>>
>>"A px unit and a user unit are defined to be equivalent in SVG."
>>
>>with the statement, below it, that
>>
>>"...use of px units ... can cause inconsistent visual results on 
>>different viewing environments since the size of '1px' may map to a 
>>different number of user units on different systems..."
>>
>>Is a 'user unit' a px, or ain't it? what am I missing?
>>
>>Thanks,
>>Wendell
>>
>>
>>
>>======================================================================
>>Wendell Piez                            mailto:wapiez@mulberrytech.com
>>Mulberry Technologies, Inc.                http://www.mulberrytech.com
>>17 West Jefferson Street                    Direct Phone: 301/315-9635
>>Suite 207                                          Phone: 301/315-9631
>>Rockville, MD  20850                                 Fax: 301/315-8285
>>----------------------------------------------------------------------
>>   Mulberry Technologies: A Consultancy Specializing in SGML and XML
>>======================================================================


======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
Received on Wednesday, 27 June 2001 11:22:45 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:20 GMT