Re: Bug 274 - POW, printer margins on Win32


Subject: Re: Bug 274 - POW, printer margins on Win32
From: Alan De Smet (chaos@highprogrammer.com)
Date: Sat May 06 2000 - 19:00:36 CDT


Mike Nordell (tamlin@algonet.se) wrote:
> What exactly is wrong with the spacing as it is now, without applying my
> patch? Is it too far to the left or to the right?

The text it about .2in too far to the right, and about .18in too
far down. This corresponds with the PHYSICALOFFSET[XY] for my
printer.

> If my patch did shift it the wrong way, how about changing sign for the
> SetViewportOrgEx points?

Your patch didn't move the output at all. As far as I can tell,
(almost) everything in gr_Win32Graphics is working device
coordinate space ("pixels"). The definition of SetViewportOrgEx
at http://msdn.microsoft.com/library/psdk/gdi/cordspac_6b08.htm
indicates that SVOE indicates which device point maps to logical
point 0,0. Since by the time we've entered gr_Win32Graphics
we're working in device points, we never use the Logical->Device
mapping.

> I'm 100% sure that the manual shifting you've tried is not needed. I'm
> almost 100% sure it will only be a call to SetViewportOrgEx.

I suspect that a "more correct" solution would be to use
SetViewportOrgEx so that 0,0 really means upper left on the page,
then doing all interactions with gr_Win32Graphics in some other
logical units. Hmmm, offhand (I'm away from the source at the
moment), it looked like most of AbiWord was doing internal
measurements in 1/1440ths of an inch. We could have
gr_Win32Graphics through all devices (for simplicity) into
MM_TWIPS and always return 1440 for the device resolution. I
don't know what larger ramifications this would have.

-- 
Alan De Smet  -  chaos@highprogrammer.com  -  http://highprogrammer.com/alan



This archive was generated by hypermail 2b25 : Sat May 06 2000 - 19:00:38 CDT