You must create a new oglcanvas-like class which use a wx.MemoryDC()
instead the default wx.ScrolledWindow used by ShapeCanvas in
wx.lib.ogl.
I've done that in a project, If I can get some spare time I can
provide you a code example.
···
2010/2/9 joe <etaoinbe@yahoo.com>:
I have code that generates a drawing on a oglcanvas. How can I save
this to a jpg file ?
It doesn't need to be that complex. You should be able to just do
canvas.GetDiagram().Redraw(dc)
Where dc is a wx.MemoryDC that has a bitmap of the right size selected into it. Then delete the dc and save the bitmap to a file.
···
On 2/9/10 7:42 AM, Daniele Esposti wrote:
2010/2/9 joe<etaoinbe@yahoo.com>:
I have code that generates a drawing on a oglcanvas. How can I save
this to a jpg file ?
You must create a new oglcanvas-like class which use a wx.MemoryDC()
instead the default wx.ScrolledWindow used by ShapeCanvas in
wx.lib.ogl.
I've done that in a project, If I can get some spare time I can
provide you a code example.
I have code that generates a drawing on a oglcanvas. How can I save
this to a jpg file ?
You must create a new oglcanvas-like class which use a wx.MemoryDC()
instead the default wx.ScrolledWindow used by ShapeCanvas in
wx.lib.ogl.
I've done that in a project, If I can get some spare time I can
provide you a code example.
It doesn't need to be that complex. You should be able to just do
canvas\.GetDiagram\(\)\.Redraw\(dc\)
Where dc is a wx.MemoryDC that has a bitmap of the right size selected into
it. Then delete the dc and save the bitmap to a file.