Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The HTML5 canvas uses sub-pixel rendering, meaning that 1px wide lines often end up being blurred across two physical pixels. Considering a vertical line, its 'x' position specifies the center of the line. Therefore it spans +/-0.5 pixels from that point. Bam. Blurriness. The solution is to subtract (adding would also work) 0.5 to the calculated x/y positions for vertical/horizontal lines respectively. This patch does not change the default behaviour. This problem is visible before this patch too, where the topmost and bottommost lines are 1px thick, while others are 2px thick.
- Loading branch information