Skip to content

Commit

Permalink
Aspect ratio for analog ROIs incorrect (#22)
Browse files Browse the repository at this point in the history
* Aspect ratio for analog ROIs incorrect (jomjol#2403)
  • Loading branch information
Slider0007 authored May 30, 2023
1 parent bd07d7a commit 1bb3470
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sd-card/html/edit_analog.html
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,10 @@ <h2>Analog ROI</h2>
context.strokeRect(x0, y0, dx, dy);
context.lineWidth = lw;
context.beginPath();
context.arc(x0+dx/2, y0+dy/2, dx/2, 0, 2 * Math.PI);

//context.arc(x0+dx/2, y0+dy/2, dx/2, 0, 2 * Math.PI); -> use ellispe instead; fix https://github.com/jomjol/AI-on-the-edge-device/issues/2403
context.ellipse(x0+dx/2, y0+dy/2, dx/2, dy/2, 0, 0, 2 * Math.PI);

context.moveTo(x0+dx/2, y0);
context.lineTo(x0+dx/2, y0+dy);
context.moveTo(x0, y0+dy/2);
Expand All @@ -800,7 +803,10 @@ <h2>Analog ROI</h2>

context.lineWidth = 1;
context.beginPath();
context.arc(x0+dx/2, y0+dy/2, dx/2, 0, 2 * Math.PI);

//context.arc(x0+dx/2, y0+dy/2, dx/2, 0, 2 * Math.PI); -> use ellispe instead; fix https://github.com/jomjol/AI-on-the-edge-device/issues/2403
context.ellipse(x0+dx/2, y0+dy/2, dx/2, dy/2, 0, 0, 2 * Math.PI);

context.moveTo(x0+dx/2, y0);
context.lineTo(x0+dx/2, y0+dy);
context.moveTo(x0, y0+dy/2);
Expand Down

0 comments on commit 1bb3470

Please sign in to comment.