ohshima at is.titech.ac.jp
Wed Jul 12 14:22:28 UTC 2000
Thank you for the interesting reply!
> Consider the following code. It draws in red for 50 ms and
> after this in black. Also, a blue straight line is drawn
> from the mouseDownPoint to the first location after the 50
> ms. On my system, the blue line exactly covers the red
> line, so not even a single red pixel remains. I have to
> extend the delay to 65 ms to get a difference. YMMV. Maybe
> reducing the delay in waitButton to, say, 20 ms would be
You draw the lines in fast motion? For example, try to
write your autograph. I produced a couple of triangles with
a edge is blue and two edges are red.
It seems to me that I sometimes move the pen up to 40
pixels (the distance along the line) in 50 milliseconds when
writing characters and other things.
Of course the result of the drawing tool with your
suggestion is much better than the simple code (Thank you
for the suggestion), and probably the users will not notice
it when the delay is below a threshold until they told. But
careful user will notice it (10-20 pixels gap).
# By the way, I also tested your code on my Mac. Probably
#because of the timer resolution, it sometimes gives very big
> Maybe reducing the delay in waitButton to, say, 20 ms
> would be okay?
Umm, after all, I hope there is not a magic number in very
basic method such as "waitButton".
As for the CPU usage, there would be many opportunities to
cut it. If the CPU usage in MVC is critical, one might have
to do pretty many things to fix, including #waitButton.
More information about the Squeak-dev