[wxPython-users] wxGraphicsContext and printing

Sébastien Ramage sebastien.ramage at gmail.com
Sat Jun 9 07:19:35 PDT 2007


thanks you, it works !

I have do this :

bmp =3D wx.EmptyBitmap(width, height)
dc =3D wx.MemoryDC(bmp)
dc.SelectObject(bmp)
self.DoDrawing(dc)

printerDC.DrawBitmap(bmp, 0,0)

Seb





2007/6/8, Robin Dunn <robin at alldunn.com>:
>
> S=E9bastien Ramage wrote:
> > yes it can be a good alternative
> > can you give me a example of the use of wx.MemoryDC ? because I've tried
> > to render into a memoryDC and then blit it on the printerdc but it
> > didn't work
> >
>
> You can try using DrawBitmap instead of blitting.  Maybe something like
> this:
>
>
>         bmp =3D wx.EmptyBitmap(width, height)
>         dc =3D wx.MemoryDC(bmp)
>         self.DoDrawing(dc)
>         del dc
>
>         printerDC.DrawBitmap(bmp, 0,0)
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org  Java give you jitters?  Relax with wxPython!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200706=
09/27b1b007/attachment.htm


More information about the wxpython-users mailing list