Bezier-rs: Make rectangle constructor produce linear segments (#2109)

* fix(bezier-rs): new_rect constructor create linear segments

* refactor
This commit is contained in:
Sidharth-Singh10
2024-11-18 21:10:08 +00:00
committed by GitHub
parent 99cf8f0c4f
commit 3b503ccde2
2 changed files with 9 additions and 1 deletions
@@ -76,6 +76,10 @@ impl<PointId: crate::Identifier> ManipulatorGroup<PointId> {
Self::new(anchor, Some(anchor), Some(anchor))
}
pub fn new_anchor_linear(anchor: DVec2) -> Self {
Self::new(anchor, None, None)
}
/// Construct a new manipulator group from an anchor, in handle, out handle and an id
pub fn new_with_id(anchor: DVec2, in_handle: Option<DVec2>, out_handle: Option<DVec2>, id: PointId) -> Self {
Self { anchor, in_handle, out_handle, id }