Improvements to LineDrawing scenario (#2732)

* Improvements to LineDrawing scenario
- Add drag drawing of current line
- Add undo/redo
- LineCanvas is now more mutable with StraightLine now public and mutable

* Prevent redo after drawing

* Fix xmldoc and test

---------

Co-authored-by: Tig <tig@users.noreply.github.com>
This commit is contained in:
Thomas Nind
2023-07-06 00:09:37 +01:00
committed by GitHub
parent a8d1a79615
commit e02fa1b14c
4 changed files with 356 additions and 274 deletions

View File

@@ -81,7 +81,7 @@ namespace Terminal.Gui.DrawingTests {
[Theory, SetupFakeDriver]
public void Bounds (Orientation orientation, int x, int y, int length, int expectedX, int expectedY, int expectedWidth, int expectedHeight)
{
var sl = new LineCanvas.StraightLine (new Point (x, y), length, orientation, LineStyle.Single);
var sl = new StraightLine (new Point (x, y), length, orientation, LineStyle.Single);
Assert.Equal (new Rect (expectedX, expectedY, expectedWidth, expectedHeight), sl.Bounds);
}