Exemplo n.º 1
0
 public virtual RectangleF GetAvoidableRectangle(Shapes.DiagramShape obj)
 {
     RectangleF ef1 = obj.Bounds;
     obj.ExpandPaintBounds(ef1, null);
     this.AddAvoidableRectanglePorts(obj, ref ef1);
     return ef1;
 }
Exemplo n.º 2
0
 internal void RemoveFromCache(Shapes.DiagramShape obj)
 {
     RectangleF ef1 = obj.Bounds;
     foreach (GoLayerCache cache1 in this.Caches)
     {
         RectangleF ef2 = obj.ExpandPaintBounds(ef1, cache1.View);
         if (Shapes.DiagramShape.IntersectsRect(cache1.Rect, ef2))
         {
             Shapes.DiagramShapeCollection.fastRemove(cache1.Objects, obj);
             Shapes.DiagramShapeCollection.fastRemove(cache1.Strokes, obj);
         }
     }
 }
Exemplo n.º 3
0
 internal void UpdateCache(Shapes.DiagramShape obj, ChangedEventArgs evt)
 {
     foreach (GoLayerCache cache1 in this.Caches)
     {
         RectangleF ef1 = evt.OldRect;
         ef1 = obj.ExpandPaintBounds(ef1, cache1.View);
         RectangleF ef2 = evt.NewRect;
         ef2 = obj.ExpandPaintBounds(ef2, cache1.View);
         bool flag1 = Shapes.DiagramShape.IntersectsRect(cache1.Rect, ef1);
         bool flag2 = Shapes.DiagramShape.IntersectsRect(cache1.Rect, ef2);
         if ((!flag1 && flag2) && !cache1.Objects.Contains(obj))
         {
             cache1.Objects.Add(obj);
         }
     }
 }
Exemplo n.º 4
0
 internal void InsertIntoCache(Shapes.DiagramShape obj)
 {
     RectangleF ef1 = obj.Bounds;
     foreach (GoLayerCache cache1 in this.Caches)
     {
         RectangleF ef2 = obj.ExpandPaintBounds(ef1, cache1.View);
         if (Shapes.DiagramShape.IntersectsRect(cache1.Rect, ef2))
         {
             cache1.Objects.Add(obj);
         }
     }
 }