Skip to content

Commit 9e225e0

Browse files
committed
fix slowness in long hand drawing
1 parent 5d14163 commit 9e225e0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/pizarra.winxed

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,12 +670,14 @@ class Board : ChildWindow
670670
case HANDLINE:
671671
var line = self.line;
672672
if (line == null) {
673-
self.line = line = new HandLine(self.colorspec);
673+
string colorspec = self.colorspec;
674+
self.line = line = new HandLine(colorspec);
674675
self.listline.push(line);
675676
line.push(oldx, oldy);
677+
self.SetForeground(self.display.ParseColor(colorspec));
676678
}
677679
line.push(x - oldx, y - oldy);
678-
line.draw(self);
680+
self.DrawLine(oldx, oldy, x, y);
679681
break;
680682
case LINE:
681683
self.hintline(self.initx, self.inity, oldx, oldy);

0 commit comments

Comments
 (0)