public static ResultRender GetResultRender(Canvas canvas, SolversHolder solversHolder, NodeCollectionStorage<FullConnectedGraph> storage) { var ellipseCreator = new EllipseCreator(Brushes.Black, Brushes.SlateGray, 4, 0.5); var minPointEllipseCreator = new EllipseCreator(Brushes.Red, Brushes.Transparent, 6, 0.7); var polyLinesCreator = new PolylineCreator(Brushes.Blue, 1, 1); var step = 0.005; var scalarizator = new WeightedSumScalarizator<Route>(step); const double border = 5; return new ResultRender(canvas, ellipseCreator, minPointEllipseCreator, polyLinesCreator, border, storage, scalarizator); }
public ResultRender(Canvas canvas, EllipseCreator pointsEllipseCreator,EllipseCreator minPointsEllipseCreator, PolylineCreator polylineCreator, double border, NodeCollectionStorage<FullConnectedGraph> storage, IScalarizator<Route,Route> scalarizator) { _canvas = canvas; _canvas.SizeChanged += CanvasChangedHanler; _pointsEllipseCreator = pointsEllipseCreator; _polylineCreator = polylineCreator; _border = border; _scalarizator = scalarizator; _minPointsEllipseCreator = minPointsEllipseCreator; storage.CollectionChanged += StorageOnChangeHandler; storage.PointPropertyChanged += StorageOnChangeHandler; }
public static RouteRender GetRouteRender(Canvas canvas) { var polylineCreator = new PolylineCreator(Brushes.Coral, 3, 0.3); return new RouteRender(canvas, polylineCreator); }
public RouteRender(Canvas canvas, PolylineCreator polyLineCreator) { _canvas = canvas; _polyLineCreator = polyLineCreator; }