dumb newbie api graphics question... 
Author Message
 dumb newbie api graphics question...

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.*-*-*.com/
Before you buy.



Tue, 29 Oct 2002 03:00:00 GMT  
 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.



Thu, 31 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Newbie: dumb question, very dumb....

2. Newbie API Graphics Question

3. Newbie dumb question - Creating Macros?

4. Dumb Newbie Question

5. A few dumb newbie questions...

6. Another Dumb Newbie Question :-)

7. dumb newbie question regarding listview control

8. Dumb VB File Save question from a Newbie

9. Yet Another Dumb Ass Newbie Question

10. Dumb question (no newbie)!

11. Really dumb textbox newbie question..

12. Dumb newbie question about newline chars

 

 
Powered by phpBB® Forum Software