Esempio n. 1
0
 public Rect(Size size)
 {
     if (size.IsEmpty)
     {
         this = s_empty;
     }
     else
     {
         x = y = 0.0f;
         width = size.Width;
         height = size.Height;
     }
 }
Esempio n. 2
0
File: Rect.cs Progetto: NVN/WCell
 public Rect(Point location, Size size)
 {
     if (size.IsEmpty)
     {
         this = s_empty;
     }
     else
     {
         x = location.X;
         y = location.Y;
         width = size.Width;
         height = size.Height;
     }
 }
Esempio n. 3
0
File: Rect.cs Progetto: NVN/WCell
 public static Rect Inflate(Rect rect, Size size)
 {
     rect.Inflate(size.Width, size.Height);
     return rect;
 }
Esempio n. 4
0
File: Rect.cs Progetto: NVN/WCell
 public void Inflate(Size size)
 {
     Inflate(size.Width, size.Height);
 }
Esempio n. 5
0
 public bool Equals(Size other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.width.Equals(width) && other.height.Equals(height);
 }
Esempio n. 6
0
 public static Size Subtract(Size sz1, Size sz2)
 {
     return new Size((sz1.Width - sz2.Width), (sz1.Height - sz2.Height));
 }
Esempio n. 7
0
 public static Size Add(Size sz1, Size sz2)
 {
     return new Size((sz1.Width + sz2.Width), (sz1.Height + sz2.Height));
 }
Esempio n. 8
0
 static Size()
 {
     Empty = new Size(0.0f, 0.0f);
 }
Esempio n. 9
0
 public static Point Subtract(Point pt, Size sz)
 {
     return new Point((pt.X - sz.Width), (pt.Y - sz.Height));
 }
Esempio n. 10
0
 public static Point Add(Point pt, Size sz)
 {
     return new Point(pt.X + sz.Width, pt.Y + sz.Height);
 }