mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
ellipse and arc refactors
This commit is contained in:
parent
3efa8735ef
commit
392dd5b0b8
9 changed files with 125 additions and 94 deletions
|
@ -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,
|
||||
),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue