mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 08:18:14 +08:00
Add star/polygon gizmos and refactor the separate shape drawing tools into a unified Shape tool (#2683)
* no trait ,not to fix line * add hints * line modification even when other shapes are selected * added transform and anchor overlays * removed old code * fixed transform added hints need to fix modifier keys use * refactored select-tool * add point-handle-gizmo * fix rotate bug * implement angle snapping gizmo , fix overlay and refactor the code * implement snapping for point-handle gizmo and implement no of point gizmo need to refactor * implemented the gizmo for polygon, added tests , brackets to increase sides * formatting-fix * small nit-picks * Make it compile * Code review --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
e520c21b66
commit
8e5abf65cb
@@ -250,6 +250,10 @@ impl SnapManager {
|
||||
self.update_indicator(snapped);
|
||||
}
|
||||
|
||||
pub fn indicator_pos(&self) -> Option<DVec2> {
|
||||
self.indicator.as_ref().map(|point| point.snapped_point_document)
|
||||
}
|
||||
|
||||
fn find_best_snap(snap_data: &mut SnapData, point: &SnapCandidatePoint, snap_results: SnapResults, constrained: bool, off_screen: bool, to_path: bool) -> SnappedPoint {
|
||||
let mut snapped_points = Vec::new();
|
||||
let document = snap_data.document;
|
||||
|
||||
Reference in New Issue
Block a user