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

Subtract() public static method

Contracts a by another .

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

Same methods

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

Usage Example

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