
dumb newbie api graphics question...
1440 twips per inch and (on my printer) ~4.8 twips per pixel, so twips per
inch divided by twips per pixel gives pixels per inch.
Dim tppx As Double, tppy As Double
Dim inchx%, inchy%
Printer.Print "" 'init printer device
tppx = Printer.TwipsPerPixelX
tppy = Printer.TwipsPerPixelY
inchx = 1440 \ tppx
inchy = 1440 \ tppy
Rectangle Printer.hdc, 0, 0, inchx, inchy
Printer.EndDoc
Printer.Scalemode does not seem to matter.
HTH
Quote:
> I've just started experimenting with graphical API functions, and I'm
> comparing them with VB graphical commands.
> What scalemode does the API work in? Pixels, twips, points?
> How many units per inch? For printer applications, for example, what
> value would X be to draw a 1 inch square on the printer with the
> function
> retval=rectangle(printer.hdc,0,0,X,X)
> Sorry for having to ask such a mundane question.. I've already searched
> several websites for an answer without luck...
> Thanks in advance,
> Carl
> Sent via Deja.com http://www.deja.com/
> Before you buy.