You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
680 B
28 lines
680 B
using System.Windows;
|
|
using System.Windows.Media;
|
|
using SignalsMVVM.Interfaces;
|
|
|
|
namespace SignalsMVVM.Models
|
|
{
|
|
public class GraphicController : IGraphicControl
|
|
{
|
|
private GeometryCollection geometries;
|
|
|
|
public void ClearGraphic()
|
|
{
|
|
geometries.Clear();
|
|
}
|
|
|
|
public void DrawLine(double X1, double Y1, double X2, double Y2)
|
|
{
|
|
var p1 = new Point(X1, Y1);
|
|
var p2 = new Point(X2, Y2);
|
|
geometries.Add(new LineGeometry(p1, p2));
|
|
}
|
|
|
|
public GraphicController(GeometryCollection geometries)
|
|
{
|
|
this.geometries = geometries;
|
|
}
|
|
}
|
|
}
|
|
|