[Xr] Default scaling matrix

Bill Spitzak spitzak at d2.com
Wed May 21 23:56:00 PDT 2003


An idea I had on the uwin.org list.

1. To do exact device-independent scaling of the output, instead of having 
some call that returns "dpi", have a call similar to XrDefaultMatrix() and 
XrIdentityMatrix() that sets a matrix that is scaled to a known dimension,
probably 1/72 of an inch to match Postscript, though maybe it should be 1mm 
(do *not* supply more than one call as somebody will mess up their driver and 
get the relative scales wrong) This is no big deal but it seems a lot cleaner 
to me as it does not involve a return value, and anybody who wants to know 
the real dpi can read the matrix.

2. On a related note, is the Identity matrix device-specific? What I mean are 
devices where it is convienent for the location 0,0 to be somewhere other 
than the lower-left corner, and the x and y directions may be reversed or 
swapped. In that case is the identity matrix not the math identity? 
Alternatively, are these sort of transformations required to be done 
invisibly inside the driver, or conversely is the identity matrix allowed to 
orient the output in any direction?

-- 
                   ,~,~,~,~ ~ ~ ~ ~
     /\_       _|_========___         Bill Spitzak
 ~~~/\/\\~~~~~~\____________/~~~~~~~~ spitzak at d2.com




More information about the cairo mailing list