Esempio n. 1
0
 void ApplyTool(IList <Rectangle> updates)
 {
     if (SelectedTool != null)
     {
         SelectedTool.ApplyDrawing(updates);
         this.BGI.UpdateRegion(updates);
     }
 }
Esempio n. 2
0
        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);
            }
        }