Draw bars using fillRect instead of paths.

This is up to 2x faster and appears to work around issues in Chrome's
canvas implementation that sometimes result in bars not being filled.
Resolves #915.
master
David Schnur 13 years ago
parent f42e4eddfd
commit a286f044ef

@ -2544,13 +2544,8 @@ Licensed under the MIT license.
// fill the bar
if (fillStyleCallback) {
c.beginPath();
c.moveTo(left, bottom);
c.lineTo(left, top);
c.lineTo(right, top);
c.lineTo(right, bottom);
c.fillStyle = fillStyleCallback(bottom, top);
c.fill();
c.fillRect(left, top, right - left, bottom - top)
}
// draw outline

Loading…
Cancel
Save