From: Tony G. <Ton...@Su...> - 2003-05-08 16:46:42
|
Jesper Stigberg wrote at 8 May 2003 14:39:29 +0200: > Tony Graham wrote: ... > > I have started a Wiki page to collect in one place all the possibly > > differing interpretations of device units from XSL, Pango, and > > FreeType (although I haven't got to FreeType yet). You are welcome to > > annotate it. > > Great. What do gnome-print use as a unit? So far I've found that the PDF and PostScript outputs use different units. GNOME Print is under-documented, so there may be something that I'm missing. See pangogp-to-pdf.c in pangopdf/examples. > > What do you do in your rendering application if you want to scale the > > rendered image, e.g. reduce it so a whole page appears in the window? > > > > A bit simplified. > > In the win32 GDI (graphics device interface), all drawing, > text-output etc is done through a device-context using > logical-units. What appears on the screen is measured in > device-units. A device-unit==scale*logical-unit ( this mapping is > done by the OS ). So by changing the scale you can get a zoom > effect without changing the coordinates etc in your drawing code, > or use the same code to render to a printer. And the logical unit is a 'twip', i.e., a logical pixel? Regards, Tony Graham ------------------------------------------------------------------------ XML Technology Center - Dublin Sun Microsystems Ireland Ltd Phone: +353 1 8199708 Hamilton House, East Point Business Park, Dublin 3 x(70)19708 |