[Gambas-user] Printing and Drawing in GB3
Rolf-Werner Eilert
eilert-sprachen at ...221...
Tue Nov 20 12:46:12 CET 2012
Am 20.11.2012 11:45, schrieb Charlie Reinl:
> Am Dienstag, den 20.11.2012, 10:58 +0100 schrieb Rolf-Werner Eilert:
>> Hi,
>>
>> just to make sure I haven't overseen anything... In GB2 I could use Draw
>> to draw into a DrawingArea or Picture or Printer object. In GB3 for a
>> Printer, I have to use Paint instead, and Printer is completely event
>> driven (_Begin, _Draw, _End)?
>>
>> This would mean re-writing my printer-preview and printing functions
>> completely, because they are set to one of DrawingArea (for preview) or
>> Printer before the thing starts, and then just print into these using
>> Draw. The core functions don't care about what they draw in.
>>
>> If I understand it right, I now have to make a difference between
>> preview and paper printing, so I have to make all those functions twice.
>>
>> Please confirm or correct me if I'm wrong.
>>
>> Regards
>>
>> Rolf
>
> Salut Rolf,
>
> to avoid that, you can save the DrawingAreas to disk, glue them with
> "convert" to a PDF-Doc and send it to "evince" or any other PDF Viewer.
>
> Or use the example I sent you some days ago.
>
Ok, but I guess basically I am right here: it needs refurbishing the
whole thing, not only a few parts. That's what I wanted to know before I
start into any direction.
Yes, your example will help a lot here :-) My "printing engine" I
developed for my students database uses printing forms which function
like HTML blended with some simple commands. It will take some
re-organizing the stuff because the new way of printing in GB3 wants a
different order. If there was a way to spare that work... But at least I
can leave the preview functions (Form Editor and Printing Preview) as
they are because they use Draw.
I have a second project now where this engine could be of help, but it
will have to be adapted to it anyway. So I will try that first and take
back the result to the database project when it's running on the new one.
Regards
Rolf
More information about the User
mailing list