[Gambas-user] Printing
Ken Schrock
schrockk at ...137...
Wed May 21 16:11:09 CEST 2003
On Tuesday 20 May 2003 3:15 am, Benoit Minisini wrote:
> Le Lundi 19 Mai 2003 06:52, Ken Schrock a écrit :
> > I see reading properties, doing new page, showing setup dialog
> > But I don't see a way to get a handle or printer object
> > How does one actually print (printer-graphically)?
>
> Draw.Begin(Printer)
>
> Draw.Rect(...)
> Draw.Text(...)
> ...
>
> Printer.NewPage
>
> Draw...
>
> Draw.End(Printer)
>
> I tested it once a long time ago. So tell me if you have problems, bugs,
> strange behaviour with the Printer class.
Well, it is a little strange...
I started with a test on a form
DIM mypic AS Picture
mypic = NEW Picture
mypic.load("/root/Projects/testdraw/gambas.gif")
Draw.begin(ME)
Draw.rect(100, 100, 200, 200)
Draw.line(120,120,280,280)
Draw.picture(mypic)
Draw.end()
And that works fine
If I then simply do
Draw.Begin(Printer)
It says "Unknown identifier: Printer..." during syntax check
If I then try
DIM foobar AS Printer
Draw.Begin(foobar)
It says "Null Object" at runtime
However, if I do
DIM foobar AS Printer
Draw.Begin(Printer)
It then works ???
However, it cuts about 35 pixels off the top
Also, is there a way to grab the entire Form client area
(Or the entire window for that matter) and print it?
> Regards,
--
Using Lindows
More information about the User
mailing list