If you are using Rb 2005 +, make sure you have set the erasebackgound
flag of the graphics object to true.
- Tom
On 04/03/2006, at 4:08 AM, Maurice Volaski wrote:
Thank you for your responses.
To answer the questions:
I don't know. There really does not seem to be enough information,
like what platform are you building the project for? From your email
it looks like OS X, but I don't understand why you would get any
flicker running under OS X.
It is indeed OS X.
Do you have the Window.Composite property True or False?
False.
I guess your paint event code does something that triggers another
paint
There is no "paint" event code. The drawing takes place in a canvas
method
called only by the timer's action method.
event. My solution was to define a variable "Painting"
In the paint event say "If not painting then -- call code to paint
window
In the actual painting code the first line would be Painting = True
Last line is Painting = false
I added that to the drawing code and it had no effect.
I decided to take a digital camera and make a movie of the flicker.
This led
to an interesting insight. The new picture is drawn (via DrawPicture)
directly over the old one starting from the top of the canvas and
progressing to the bottom. First, the top third of the screen is
overdrawn,
then the second third and finally the last third. All the while, the
previous "frame" is still there. So the flicker I'm seeing is
actually the
intersection of the leading edge of the new DrawPicture and the
tail end of
what's left from the previous DrawPicture. This intersection that
occurs
twice first between the first and second third and then again
between second
and last thirds every time the picture is drawn is what I have been
calling
the "flicker".
I made a simple project that demonstrates additional weirdness. Simple
window, canvas and timer. Timer fires with a period of 50 and calls
the
canvas' method to draw itself. This code says, where me is the canvas,
me.graphics.ForeColor = RGB( 20, 80, 160 ) // BLUE
me.graphics.FillRect(0,0,me.graphics.width,me.graphics.height)
//me.graphics.ClearRect(0,0,me.graphics.width,me.graphics.height)
me.graphics.ForeColor = RGB( 160, 80, 20 ) // ORANGE
me.graphics.FillRect(0,0,me.graphics.width,me.graphics.height)
I expect to see a repeating loop displaying a blue swatch followed
immediately by an orange swatch. I see only orange. Blue never gets
drawn. I
tried adding a ClearRect call between the two, but it is also ignored.
Is this expected behavior?
_______________________________________________
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>
All questions and answers unless otherwise stated are in Relation to
Mac OS X 10.4 and later.
_______________________________________________
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>