mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Real 1px lines
This commit is contained in:
parent
4076cf003f
commit
bd515f7e50
1 changed files with 4 additions and 0 deletions
|
@ -271,6 +271,10 @@ const canvas = document.getElementById("canvas");
|
|||
const rc = rough.canvas(canvas);
|
||||
const context = canvas.getContext("2d");
|
||||
|
||||
// Big hack to ensure that all the 1px lines are drawn at 1px instead of 2px
|
||||
// https://stackoverflow.com/questions/13879322/drawing-a-1px-thick-line-in-canvas-creates-a-2px-thick-line/13879402#comment90766599_13879402
|
||||
context.translate(0.5, 0.5);
|
||||
|
||||
function drawScene() {
|
||||
ReactDOM.render(<App />, rootElement);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue