[Lazarus] Printer margins

Jesus Reyes jesusrmx at yahoo.com.mx
Tue Jun 10 19:55:37 CEST 2008


> Indeed. The cause of the bug is that people under Delphi use
> Windows
> API to get the margins, and here we need a cross-platform solution
> which currently doesn't exist.

At this point we are not trying to implement windows api in other
platforms, we currently have a high level mechanism to abstract the
api and it's crossplatform, that's why I think we don't need a
lowlevel one.

> 
> Under Mac OS X only 1 dialog makes everything.
> 
> Ummm .... 2 dialogs that can set the paper .... where should the
> margin properties go?
> 

I'm a little confused, it seems there are two kinds of margins:
printer's physical limits (we call it here workable area) and user
artificial margis. I thought you were talking about first kind, but
now I think you are talking about second one. 

What do you expect a hypotethical margins feature to do?,
specifically in canvas, currently margins are just information which
you can use (when available, remember that printable area is printer
driver specific setup, some don't even specify one) it doesn't have
any effect in canvas drawing

> Also, I just thougth now that we also need to get the default paper
> even if we don't use any dialog.

Printer.PaperSize.DefaultPaper

> 
> So maybe a function in Printers or something like that could return
> the margins?
> 

Printer.paperSize.PaperRect.WorkRect; // that's printable area (if
set)

> thanks,
> -- 
> Felipe Monteiro de Carvalho

Jesus Reyes A.


      ____________________________________________________________________________________
Yahoo! Deportes Beta
¡No te pierdas lo último sobre el torneo clausura 2008! Entérate aquí http://deportes.yahoo.com



More information about the Lazarus mailing list