Commit a286f044 authored by David Schnur's avatar David Schnur

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.
parent f42e4edd
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment