Drawingarea print

Post your Gambas programming questions here.
Post Reply
bill-lancaster
Posts: 190
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Drawingarea print

Post by bill-lancaster »

This may be a bit obvouse but is there a simple way of printing a drawing area?
Thanks
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Drawingarea print

Post by cogier »

You can't just print what's on the screen, you will need to Paint the details to the Printer. Have a look at the attached that draws in a DrawingArea and then to the printer. Note the differences in the routines. It should print your name on an A4 sheet.

Image
Test2-0.0.3.tar.gz
(11.77 KiB) Downloaded 217 times
bill-lancaster
Posts: 190
Joined: Tuesday 26th September 2017 3:17pm
Location: NW England

Re: Drawingarea print

Post by bill-lancaster »

Thanks Cogier, I was in too much of a rush and should have been more explicit.
So I draw a lot of detail in drawing area using the draw_event. Then draw the identical details in the print_event in order to print it.
It seems a bit inelegant. It there one process that will perform both operations?
Post Reply