public void Redraw() { var updates = new List <Rectangle>(); RemoveDrawing(updates); ApplyDrawing(updates); BGI.UpdateRegion(updates); }
public override void Apply(IList <Rectangle> updates = null) { if (Points != null && Points.Length > 1) { var drawUpdates = updates ?? new List <Rectangle> (); BGI.MoveTo(Points [0]); for (int i = 1; i < Points.Length; i++) { BGI.LineTo(Points [i], drawUpdates); } if (updates == null) { BGI.UpdateRegion(drawUpdates); } } }
public void Redraw(IList <Rectangle> updates = null) { var tempUpdates = new List <Rectangle>(); SelectedTool?.RemoveDrawing(tempUpdates); BGI.GraphDefaults(tempUpdates); foreach (var command in RipDocument.Commands) { tempUpdates.Clear(); command.Apply(tempUpdates); } SelectedTool?.ApplyDrawing(tempUpdates); var rect = new Rectangle(BGI.WindowSize); if (updates != null) { updates.Add(rect); } else { BGI.UpdateRegion(rect); } }