Commit 11683e8
committed
Fix: Correct arrow head fill position in measurements
The `fillPolygon` method in `screenCanvas.drawController.ts` was using
y-coordinates directly after transformation by `worldToTarget`. However,
other primitive drawing operations (like `drawLineScreen`, `drawArcScreen`,
`fillRectScreen`, `drawTextScreen`) effectively transform these y-coordinates
further using `canvasSize.y - y_coordinate` before passing them to the
HTML5 canvas context.
This inconsistency caused the fill of measurement arrowheads (drawn via
`fillPolygon`) to appear in a different position than their outlines
(drawn via `drawLine`).
This commit modifies `fillPolygon` to apply the same
`this.canvasSize.y - screenPoint.y` transformation to its y-coordinates,
aligning it with the predominant coordinate handling strategy in the
`screenCanvas.drawController` and resolving the arrow head fill issue.
Addresses your feedback related to issue #17.1 parent 1efa8e5 commit 11683e8
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
471 | | - | |
| 471 | + | |
472 | 472 | | |
473 | | - | |
| 473 | + | |
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| |||
0 commit comments