-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Render crisp lines/strokes The middle of lines/strokes on canvas is positioned exactly in between two pixels. This is explained here https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Applying_styles_and_colors#A_lineWidth_example This leads to blurry and too thick lines. 1 px solid black grid lines are displayed as 2 px lines in medium grey. This is somewhat mitigated when lines overlay each other. The fix attempts to shift all canvas coordinates by half a pixel via the `canvasOffsetTop` and `canvasOffsetLeft` properties. * Adjust tests to crisper line rendering * Fix blurry rendering of images after rendering crips lines now drawHtml() positions images now on half pixels after the crips lines change. But this renders images blurry. This patch rounds the coordinates to the nearest full pixel. * Fix drawActiveCell() is shifted by a pixel in selectionMode: row
- Loading branch information
1 parent
b9313e3
commit f70ba1b
Showing
2 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters