mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 15:28:04 +08:00
Implement anchor and handle point rendering with the Path Tool (#353)
* Implement Path Tool * Draw a red rectangle where the first point on the shape is * Correctly render anchors, handles, and connecting lines * Fix drain() which can panic * Refactor frontend messages to work as return values not callbacks * Reduce the number of unnecessary frontend updates * Fix stack overflow by using a loop * Group Document Render calls and put them at the end * Speed hacks for dirtification * Add performance * Bunch folder changed updates * Add triggers to redraw overlays to movement_handler * Polish the pixel-perfect rendering of vector manipulators * Restore scrollbars that were disabled * Cleanup * WIP Add shape outline rendering * Fix compiling * Add outlines to selected shapes * Fix outlines rendering over handles and anchors * Fix dirtification * Add a comment * Address code review feedback * Formatting * Small tweaks Co-authored-by: Oliver Davies <oliver@psyfer.io> Co-authored-by: Dennis Kobert <dennis@kobert.dev>
This commit is contained in:
@@ -62,7 +62,7 @@ impl EditorTestUtils for Editor {
|
||||
}
|
||||
|
||||
fn mouseup(&mut self, state: EditorMouseState) {
|
||||
self.handle_message(InputPreprocessorMessage::MouseUp(state, ModifierKeys::default())).unwrap()
|
||||
self.handle_message(InputPreprocessorMessage::MouseUp(state, ModifierKeys::default())).unwrap();
|
||||
}
|
||||
|
||||
fn lmb_mousedown(&mut self, x: f64, y: f64) {
|
||||
@@ -70,7 +70,7 @@ impl EditorTestUtils for Editor {
|
||||
editor_position: (x, y).into(),
|
||||
mouse_keys: MouseKeys::LEFT,
|
||||
scroll_delta: ScrollDelta::default(),
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
fn input(&mut self, message: InputPreprocessorMessage) {
|
||||
@@ -78,7 +78,7 @@ impl EditorTestUtils for Editor {
|
||||
}
|
||||
|
||||
fn select_tool(&mut self, typ: ToolType) {
|
||||
self.handle_message(Message::Tool(ToolMessage::SelectTool(typ))).unwrap();
|
||||
self.handle_message(Message::Tool(ToolMessage::ActivateTool(typ))).unwrap();
|
||||
}
|
||||
|
||||
fn select_primary_color(&mut self, color: Color) {
|
||||
|
||||
Reference in New Issue
Block a user