I have a drawing project which flickers out of control.

It is in REALBasic 2006 Release 1 running on a Mac OS 10.4.2 system.

There is a window sized for the whole monitor and a canvas taking up that
whole window. The canvas is told to draw with a timer that is currently
firing with a period of 50. Increasing the period to, 500, for example, does
not eliminate the flicker. The canvas' Paint method is empty.

There is a separate object that first draws vertical lines in varying shades
of gray across about 1/10 the width of the window into directly into a
Picture.

The Canvas' draw routine in response to the timer is like so:

theCanvas.Graphics.DrawPicture( separateObject.pictureObject,
theChangingXPosition, 0 )

The above line is in a loop where " theChangingXPosition" increases in the
loop, animating the picture.

The picture is drawn with "lines" of intense flicker that seems to scroll
down the height of the screen as the picture.

I use theCanvas.GraphicsClearRect to erase the screen for the next "frame",
but removing it does not affect the flicker.

There have been references to "refresh" commands causing flicker, but I
cannot find this word anywhere in my project.

(Previously, I was drawing multiple pictures into one big picture offscreen
and then drawing that whole picture in the canvas, but that flickered just
the same. I removed this offscreen code as I saw references to the fact that
drawing is automatically double-buffered in OS X.)

Any thoughts on why I am having this intense flicker?

-Maurice


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to