ellipse and arc refactors

This commit is contained in:
Mark Tolmacs 2024-09-25 11:03:35 +02:00
parent 3efa8735ef
commit 392dd5b0b8
No known key found for this signature in database
9 changed files with 125 additions and 94 deletions

View file

@ -23,6 +23,7 @@ import type {
} from "../../math";
import {
curve,
ellipse,
lineSegment,
point,
pointFromArray,
@ -178,12 +179,12 @@ export const getEllipseShape = <Point extends GlobalPoint | LocalPoint>(
return {
type: "ellipse",
data: {
center: point(x + width / 2, y + height / 2),
data: ellipse(
point(x + width / 2, y + height / 2),
angle,
halfWidth: width / 2,
halfHeight: height / 2,
},
width / 2,
height / 2,
),
};
};