Exemplo n.º 1
0
        public void Redraw()
        {
            var updates = new List <Rectangle>();

            RemoveDrawing(updates);
            ApplyDrawing(updates);
            BGI.UpdateRegion(updates);
        }
Exemplo n.º 2
0
 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);
         }
     }
 }
Exemplo n.º 3
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);
            }
        }