mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 07:58:13 +08:00
Implement function to find inflection points of a Bezier curve (#712)
* Implement inflection function for bezier-rs * Swapped to explicit inflection formula Co-authored-by: Linda Zheng <ll2zheng@uwaterloo.ca> * Address Rob's comments * Fix axis align Co-authored-by: Linda Zheng <linda-zheng@users.noreply.github.com> * Address Keavon's comments * Fix linting Co-authored-by: Robert Nadal <Robnadal44@gmail.com> Co-authored-by: Hannah Li <hannahli2010@gmail.com> Co-authored-by: Linda Zheng <linda-zheng@users.noreply.github.com> Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Linda Zheng
Linda Zheng
Robert Nadal
Hannah Li
Keavon Chambers
parent
a5bb153dab
commit
06524bac8d
@@ -156,4 +156,9 @@ impl WasmBezier {
|
||||
let bbox_points: [Point; 2] = self.0.bounding_box().map(|p| Point { x: p.x, y: p.y });
|
||||
to_js_value(bbox_points)
|
||||
}
|
||||
|
||||
pub fn inflections(&self) -> JsValue {
|
||||
let inflections = self.0.inflections();
|
||||
to_js_value(inflections)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user