Re: Bug 274 - POW, printer margins on Win32

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

Mike Nordell ( 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

> 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
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

> 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  -  -

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