[Xr] Default scaling matrix
Carl Worth
cworth at east.isi.edu
Thu May 22 13:14:59 PDT 2003
On May 21, Bill Spitzak wrote:
> 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
I like this idea. The most simple thing to do might be to have an
XrDefaultMatrixExact() that has the same basic scale factor as
XrDefaultMatrix() but without the rounding. That way, as device
resolution increases, the difference between XrDefaultMatrix and
XrDefaultMatrixExact decreases.
> 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?
The default matrix is intended to be device-independent, (but for the
goofy rounding for lower resolution devices). It does imply an
origin, (actually the upper-left corner, not the lower-left).
As far as the origin/orientation of device space after XrIdentityMatrix,
I hadn't given this much thought yet, (there are likely many similar
issues that will come up as soon as we implement a backend that
differs significantly from the current render and image backends).
But, since XrIdentityMatrix is device-dependent in terms of the scale,
it seems it should go all the way and be device-dependent in terms of
the origin as well. In other words, XrIdentityMatrix should deliver as
advertised and install a mathematical identity matrix, (no
transformation of coordinates from user space to device space).
Seem reasonable?
-Carl
--
Carl Worth
USC Information Sciences Institute cworth at isi.edu
More information about the cairo
mailing list