Re: Printing graphics question

new topic     » goto parent     » topic index » view thread      » older message » newer message

don cole wrote:


> I think you meant:

Yes, my syntax was wrong. I was coding from the hip blink

Now I've got some time to actually run it before posting, here is 
what I really meant ...

atom pdc
 atom sdc
 pdc = getDC(Printer)
 sdc = getDC(Screen)
 FacX =   w32Func( xGetDeviceCaps, {pdc, LOGPIXELSX})/
          w32Func(xGetDeviceCaps,{sdc,  LOGPIXELSX} )
 
 FacY = w32Func(xGetDeviceCaps,{pdc, LOGPIXELSY}) /
        w32Func(xGetDeviceCaps,{sdc, LOGPIXELSY} )
 releaseDC(Screen)
 releaseDC(Printer)

This code above is to be run *after* you have chosen the printer.

You scale you video pixels thus ...

PrinterX = floor(VideoX * FacX) PrinterY = floor(VideoY * FacY)


The missing EndPage() was the problem.

Oh good. I really should do that automatically when the endDoc() is called.

I would still like to get formula down.
Shouldn't it be CWindow_Print_Preview not Screen?

It doesn't matter. Both get the device capabilities of the *video* card being used.

Derek Parnell Melbourne, Australia }}}

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu