Improved Rectangle, Line and Shape Tools (#106)

This commit is contained in:
Paul Kupper
2021-05-07 20:05:03 +02:00
committed by GitHub
parent 5bf0452b9c
commit 1230e9d829
8 changed files with 320 additions and 87 deletions

View File

@@ -247,7 +247,7 @@ impl Document {
sides,
style,
} => {
let s = Shape::new((x0, y0), (x0 - x1, y0 - y1), sides, style);
let s = Shape::new((x0, y0), (x1, y1), sides, style);
self.add_layer(&path, Layer::new(LayerDataTypes::Shape(s)), insert_index)?;
Some(vec![DocumentResponse::DocumentChanged])