[wxPython-users] Animation glitch in Windows, but not under Linux

Jasper Stolte jasperstolte at gmail.com
Fri Aug 3 12:54:50 PDT 2007


Wow, that did the trick!

Thank you for the quick and perfectly accurate reply.
Kind regards,

Jasper Stolte


On 8/3/07, Robin Dunn <robin at alldunn.com> wrote:
>
> Jasper Stolte wrote:
> > Hi guys, I've got a bit of a problem.
>
> > So what exactly goes wrong? I'm using the motion event of the mouse to
> > draw onto a bitmap with a MemoryDC. Then I call RefreshRect to cause a
> > paint event. On the paint event I have a BufferedPaintDC drawing the
> > bitmap to the screen. In Linux, this works fine, but under windows there
> > are sometimes (minor) horizontal artifacts in the rect I'm updating..
>
> You are seeing the rectangle being cleared before it is being drawn
> again.  If you change your RefreshRect() calls to pass False for the
> eraseBackground parameter then it should go away.  Since you are drawing
> the whole rectangle anyway there is no need to clear it first.  You
> don't see it on Linux because the refreshes are buffered there, so the
> erase and the draw end up getting handled at the same time.
>
> --
> 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/200708=
03/a614fc85/attachment.htm


More information about the wxpython-users mailing list