I have a programme that draws a chart in a drawingarea using paint.begin etc.
How can I clear the drawingarea for a different form of chart.
drawingarea.clear doesn't do it and I can't see a paint method.
Also,is there a convenient way to print the drawingarea image to a printer?
Any advice would be appreciated
DrawingArea help needed
-
- Posts: 197
- Joined: Tuesday 26th September 2017 3:17pm
- Location: NW England
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: DrawingArea help needed
Have a look at the attached example that draws and clears a DrawingArea.
Have a look at ChartExample in the Gambas Farm, that uses a DrawingArea but no drawing is needed.
I'm not sure about printing yet!
Let us know how you get on.
Have a look at ChartExample in the Gambas Farm, that uses a DrawingArea but no drawing is needed.
I'm not sure about printing yet!
Let us know how you get on.
- cogier
- Site Admin
- Posts: 1129
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: DrawingArea help needed
Unfortunately it doesn't tell you how to print the contents of a DrawingArea.
Re: DrawingArea help needed
As you paint to the DrawingArea you simultaneously draw to the printer, or you can draw to an image, and draw the image to the drawingarea and the printer...
Re: DrawingArea help needed
And on a side note:
With cairo you can even draw to PDF or SVG: http://gambaswiki.org/wiki/comp/gb.cairo
With cairo you can even draw to PDF or SVG: http://gambaswiki.org/wiki/comp/gb.cairo
Re: DrawingArea help needed
Europaeus sum !
Amare memorentes atque deflentes ad mortem silenter labimur.
Amare memorentes atque deflentes ad mortem silenter labimur.
-
- Posts: 197
- Joined: Tuesday 26th September 2017 3:17pm
- Location: NW England
Re: DrawingArea help needed
Thanks for all the suggestions - am happily printing and modifying drawing area