예제 #1
0
 public static void DrawClosedArc(Graphics graphics, Shape shape)
 {
     var(x, y, w, h) = shape.EnclosingRectangle();
     if (w > 0 && h > 0)
     {
         graphics.DrawArc(shape.Pen, x, y, w, h, 0F, 360F);
     }
 }
예제 #2
0
 public bool FullySurrounds(Shape s)
 {
     var(x, y, w, h)     = this.EnclosingRectangle();
     var(xs, ys, ws, hs) = s.EnclosingRectangle();
     return(x < xs && y < ys && x + w > xs + ws && y + h > ys + hs);
 }