Exemplo n.º 1
0
 static Size()
 {
     Size.Empty = new Size();
 }
Exemplo n.º 2
0
 /// <summary>Adds the width and height of one <see cref="T:System.Drawing.Size"></see> structure to the width and height of another <see cref="T:System.Drawing.Size"></see> structure.</summary>
 /// <returns>A <see cref="T:System.Drawing.Size"></see> structure that is the result of the addition operation.</returns>
 /// <param name="sz2">The second <see cref="T:System.Drawing.Size"></see> to add.</param>
 /// <param name="sz1">The first <see cref="T:System.Drawing.Size"></see> to add.</param>
 public static Size Add(Size sz1, Size sz2)
 {
     return new Size(sz1.Width + sz2.Width, sz1.Height + sz2.Height);
 }
Exemplo n.º 3
0
 /// <summary>Subtracts the width and height of one <see cref="T:System.Drawing.Size"></see> structure from the width and height of another <see cref="T:System.Drawing.Size"></see> structure.</summary>
 /// <returns>The <see cref="T:System.Drawing.Size"></see> that is a result of the subtraction operation.</returns>
 /// <param name="sz2">The <see cref="T:System.Drawing.Size"></see> structure on the right side of the subtraction operator. </param>
 /// <param name="sz1">The <see cref="T:System.Drawing.Size"></see> structure on the left side of the subtraction operator. </param>
 public static Size Subtract(Size sz1, Size sz2)
 {
     return new Size(sz1.Width - sz2.Width, sz1.Height - sz2.Height);
 }
Exemplo n.º 4
0
 public Image NewImage(Size size)
 {
     return NewImage(size.Width, size.Height);
 }