protected override bool OnEnd(Point p) { base.OnEnd(p); if (Target != null && Target.IsReady) { var points = GenericDraw.GetAllPoint(DrawPoints, Target.DefaultDrawColor); var command = new DrawPixelCommand() { Points = points.GetDistributionColor(Target, Width), Target = Target, }; CommandManager.Instance.Do(command); Target.UpdateDrawable(); return true; } return false; }
protected override bool OnEnd(Point p) { base.OnEnd(p); if (Target != null && ColorHolder != null && Target.IsReady) { var points = new Dictionary<Point, Color>(); GenericDraw.Line(BeginPoint, p.ToMap(Target.GridWidth), ColorHolder, points); var command = new DrawPixelCommand() { Points = points.GetDistributionColor(Target, Width), Target = Target, }; CommandManager.Instance.Do(command); Target.UpdateDrawable(); return true; } return false; }
protected override bool OnEnd(Point p) { base.OnEnd(p); if (Target != null && ColorHolder != null && Target.IsReady) { var mapp = p.ToMap(Target.GridWidth); var points = GenericDraw.GetPointsWithSameColor(Target, mapp, Target.ReadPixel(mapp)); var command = new DrawPixelCommand() { Points = points.Select(x => new KeyValuePair<Point, Color>(x.Key, ColorHolder)), Target = Target, }; CommandManager.Instance.Do(command); Target.UpdateDrawable(); return true; } return false; }