I have an application that I wrote in Delphi 4 a few years ago. It generates a Mandelbrot image and displays the image as it's rendered. I recompiled under Delphi 6, and now the TImage component flickers like crazy while it displays. This is extremely annoying. What changed between these two version to cause this?
Here is the code in the main loop:
for i := 0 to iMandel.Height do
for r := 0 to iMandel.Width do
iMandel.Picture.Bitmap.Canvas.Pixels[r, i] :=
ChooseColor(MandelComputeAndTest(MinX + (r * deltaR), MinY + (i * deltaI)));
if StopRender then
iMandel in the TImage component.
MandelComputeAndTest computes a value for the point passed in.
ChooseColor maps that returned value into a color.
I tried commenting out the "iMandel.Refresh" and the "Application.ProcessMessages". Neither of these stopped the flicker.
I just tried Delphi 7 and it doesn't flicker. However, I prefer D6 to D7, so if anyone can help I would greatly appreciate it.