--- Shachar Shemesh wine-devel@shemesh.biz wrote:
Mike McCormack wrote:
GradientFill is pretty slow, as it files the rectangle line by line. I'm not sure how much this is going to slow down a normal application. It used to draw pixel by pixel, and that was a very noticable slowdown... line by line is much faster than that, but it still may cause a slowdown in some circumstances.
Anybody have any ideas about how to speed up GradientFill?
I think it's fast enough; I don't see a slowdown at all on my machine (Pentium III Celeron 1.0GHz, SiS 630, 128MB RAM).
How many colors are typically drawn across a single bar? If this number is significantly less than the number of vertical lines, you can precalculate the width of each color bar, and draw a series of boxes.
From a screenshot I take in Windows XP, either there's actually no rule
regarding the number of colors, or the number of colors is random. I found no easily-figured out pattern, each color is drawn 1 line to four lines, and it looks random to me. Maybe a mathematician can find out the pattern, but I think using GdiGradientFill is good enough. Maybe even Microsoft implemented it the same way too.
I'll resend the patch.
Mike
Shachar
William
__________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo