From: Dave D. <dde...@es...> - 2004-02-23 19:59:46
|
Ethan Merritt <merritt@u.washington.edu> writes: > On Monday 23 February 2004 05:48 am, Dave Denholm wrote: >> > With the patch applied there is no problem with colors, but any >> > x11 plot containing rotated text is refreshed very much slower. >> > This is in particular noticeable when you resize the plot window. >> > But speeding up window resizing is certainly not release-critical, >> > so we can address it later. >> >> what's the change, and why does it cause a slowdown ? > > The previous code assumed that text/background pixel area could > be represented by a 1-bit deep array. The array was rotated, and > then the entire rotated array was ORer back onto the original image > in one (relatively fast) operation. The problem is that ORing the > background color is only harmless if it is represented by all zeros. > If it is anything else then the OR operation perturbs the existing > colors. > > The new code explicitly tests for pixels in the rotated text box that > are non-background, and substitutes them back into the original > image one by one. That is relatively slow. > Yes, that's what I feared... isn't the standard trick here to first AND with bg = ~0, fg = reqd colour then OR with bg = 0, fg = reqd colour true there may be an intermediate frame with the wrong foreground colour, but it's usually not noticable. dd -- Dave Denholm <dde...@es...> http://www.esmertec.com |