Commit b85766e1 authored by olau@iola.dk's avatar olau@iola.dk

Don't round markings to prevent sub-pixel problems

git-svn-id: https://flot.googlecode.com/svn/trunk@127 1e0a6537-2640-0410-bfb7-f154510ff394
parent d85d6ef9
......@@ -51,6 +51,8 @@ Bug fixes:
by exists, issue 75).
- Only set position relative on placeholder if it hasn't already a
position different from static (reported by kyberneticist, issue 95).
- Don't round markings to prevent sub-pixel problems (reported by Dan
Lipsitt).
Flot 0.5
......
......@@ -906,17 +906,18 @@
ctx.strokeStyle = m.color || options.grid.markingsColor;
ctx.beginPath();
ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth;
ctx.moveTo(Math.floor(xrange.from), Math.floor(yrange.from));
ctx.lineTo(Math.floor(xrange.to), Math.floor(yrange.to));
//ctx.moveTo(Math.floor(xrange.from), yrange.from);
//ctx.lineTo(Math.floor(xrange.to), yrange.to);
ctx.moveTo(xrange.from, yrange.from);
ctx.lineTo(xrange.to, yrange.to);
ctx.stroke();
}
else {
// fill area
ctx.fillStyle = m.color || options.grid.markingsColor;
ctx.fillRect(Math.floor(xrange.from),
Math.floor(yrange.to),
Math.floor(xrange.to - xrange.from),
Math.floor(yrange.from - yrange.to));
ctx.fillRect(xrange.from, yrange.to,
xrange.to - xrange.from,
yrange.from - yrange.to);
}
}
}
......
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