From: Ethan M. <merritt@u.washington.edu> - 2004-02-23 19:59:55
|
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. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center (206)543-1421 Mailstop 357742 University of Washington, Seattle, WA 98195 |