System.Drawing.Size.Subtract C# (CSharp) Method

Subtract() public static method

Contracts a by another .

public static Subtract ( Size sz1, Size sz2 ) : Size
sz1 Size
sz2 Size
return Size
        public static Size Subtract(Size sz1, Size sz2) => new Size(sz1.Width - sz2.Width, sz1.Height - sz2.Height);

Same methods

Size::Subtract ( System sz1, System sz2 ) : System.Drawing.Size

Usage Example

Esempio n. 1
0
 /// <summary>Subtracts the width and height of one <see cref="T:System.Drawing.Size" /> structure from the width and height of another <see cref="T:System.Drawing.Size" /> structure.</summary>
 /// <returns>A <see cref="T:System.Drawing.Size" /> structure that is the result of the subtraction operation.</returns>
 /// <param name="sz1">The <see cref="T:System.Drawing.Size" /> structure on the left side of the subtraction operator. </param>
 /// <param name="sz2">The <see cref="T:System.Drawing.Size" /> structure on the right side of the subtraction operator. </param>
 /// <filterpriority>3</filterpriority>
 public static Size operator -(Size sz1, Size sz2)
 {
     return(Size.Subtract(sz1, sz2));
 }