public override void Receive(ReceiveCommandArgs args) { base.Receive(args); SetBGI(null); var updates = new List<Rectangle>(); BGI.GraphDefaults(updates); commands.Clear(); args.Message.ReadCommands(this, commands); foreach (var command in commands) { updates.Clear(); command.Apply(updates); } }
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); } }
public override void Apply(IList <Rectangle> updates = null) { BGI.GraphDefaults(updates); }