[Gambas-user] Printing

Rob sourceforge-raindog2 at ...94...
Sat Sep 6 20:59:12 CEST 2003


On Saturday 06 September 2003 12:56, Rob wrote:
> You can treat the Printer object as a drawing object, more or
> less.

I realize now that this is kinda vague since drawing to graphic 
devices isn't entirely the same as it is with VB.  With Gambas, 
currently you must

Draw.Begin(Printer)

to start drawing to the printer, and then

Draw.End

to finish drawing and spool the job.

One side effect of doing it this way (in particular, the Draw 
methods all being static) is that once you're sending data to 
the printer, you can't draw on anything else until you want to 
finish your print job (or at least a page of it, if you're 
clever about it.)  Benoit, is there any way the Draw class 
members can be made not static so one can have multiple drawing 
objects open at once?  I know you've talked about having Printer 
made less dependent on Qt somehow, but just being able to go 
drawPrinter.Begin(Printer) and 
drawScreen.Begin(myFancyProgressIndicatorThingy) and write to 
them simultaneously would be a wonderful thing ;)

Finally, the documentation out there for Printer and Draw on the 
Gambas-wiki is not entirely up to date with the current Gambas 
version.  In particular, Printer now has a lot of properties 
that correspond to the variables the user can set in the Setup 
dialog, and for instance Draw.Text is now Draw.Text(text,x,y) 
instead of Draw.Text(x,y,text).  I've made a lot of progress on 
my new Perl-based automated export (which will allow me to 
export docs from current and future versions of Gambas without 
rewriting it every time, as long as gbi -f doesn't change its 
output format ;) ) but not quite ready to roll out the new set 
of docs yet.  Maybe this afternoon I can make some headway on 
that.

Rob





More information about the User mailing list