public Drawing(Layer.Layer layer, ShapeType shapeType, Brush backgroundType, Color outlineColor, int outlineWidth, System.Windows.Media.DashStyle outlineType, Point mousePosition) : base(layer) { if (shapeType != ShapeType.None) { Graphic = Factory.GetGraphic(shapeType, new Point(mousePosition.X, mousePosition.Y), backgroundType, outlineColor, outlineWidth, outlineType); layer.AddGraphic(Graphic); } }
//private List<float> mean public Agent(SyftController _controller, Layer.Layer _model, Optimizer _optimizer) { controller = _controller; model = _model; optimizer = _optimizer; #pragma warning disable 420 id = System.Threading.Interlocked.Increment(ref nCreated); controller.AddAgent(this); history = new List <FloatTensor[]>(); }
public string Drawing(Kernel kernel) { var layer = new Layer.Layer(kernel._settings.Width, kernel._settings.Height); if (_drawer != null) { layer.Apply(_drawer); } // apply all entities drawing by layering foreach (var entity in _entities ?? Enumerable.Empty <Entity>()) { layer.Apply(entity.Drawer, entity.Position); } return(layer.ToString()); }
public Selecting(Layer.Layer layer, Point mousePosition) : base(layer) { bool found = false; int i = layer.CountGraphics() - 1; while (!found && i >= 0) { if (layer.GetGraphic(i).Intersect(mousePosition)) { found = true; } else { i--; } } if (found) { Graphic = layer.GetGraphic(i); } }
public Deleting(Graphic graphic, Layer.Layer layer) : base(layer, graphic) { layer.DeleteGraphics(Graphic); }
protected ActionWithLayer(Layer.Layer layer) { this.Layer = layer; }
protected ActionWithLayer(Layer.Layer layer, Graphic graphic) : base(graphic) { this.Layer = layer; }
public Pasting(Graphic graphic, Layer.Layer layer) : base(layer, graphic) { Layer.AddGraphic(graphic); }
public Drawing(Layer.Layer layer, Graphic shape) : base(layer, shape) { layer.AddGraphic(Graphic); }