From: Tony G. <Ton...@Su...> - 2003-05-26 15:12:11
|
Sorry for the delay, but I've been busy with GNOME Print (and with the non-xmlroff part of my job). Jesper Stigberg wrote at 8 May 2003 22:15:28 +0200: > Tony Graham wrote: > > Jesper Stigberg wrote at 8 May 2003 14:39:29 +0200: ... > > > 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? > > A logical unit can be mapped to twips, pixels, mm, etc or a unit of > your own. > > ex: > move_to(0,0); /* (x,y), in logical units */ > line_to(0,20); > > this could draw a 20 pixel or a 20 twips long line, depending on > what a logical unit is mapped to. So what, then, is the problem with using points as the logical unit? (I'm not decreeing that you have to use points, I'm just trying to sort out the implications.) > I don't know what a logical pixel is, a twip is, as far as I know, > 1/1440 of an inch. That's what I get for dashing off a reply. I meant that a twip is not actually the resolution of your display but some known small distance that is convenient for computation. Rather like a Pango unit, I suppose, although it's the rubbery nature of Pango units that's causing the current exchange. 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 |