add overlays,detection,transform for gizmo

This commit is contained in:
0SlowPoke0
2025-07-24 03:30:19 +05:30
parent 3bc206843a
commit c66b4fcb70
8 changed files with 587 additions and 75 deletions

View File

@@ -98,6 +98,13 @@ pub fn dvec2_to_point(value: DVec2) -> Point {
Point { x: value.x, y: value.y }
}
pub fn get_line_endpoints(line: Line) -> (DVec2, DVec2) {
let po = line.p0;
let p1 = line.p1;
(point_to_dvec2(po), point_to_dvec2(p1))
}
pub fn segment_to_handles(segment: &PathSeg) -> BezierHandles {
match *segment {
PathSeg::Line(_) => BezierHandles::Linear,