Add() public static méthode

Performs vector addition of two objects.

public static Add ( Size sz1, Size sz2 ) : Size
sz1 Size
sz2 Size
Résultat Size
		/// <summary>
		/// Center between two Sizes
		/// </summary>
		/// <param name="p1"></param>
		/// <param name="p2"></param>
		/// <returns>Center point</returns>
		public static Size Center(Size p1, Size p2) => (p2.Add(p1)).Scale(0.5f);
Exemple #2
0
 /// <summary>Adds the width and height of one <see cref="T:System.Drawing.Size" /> structure to 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 addition operation.</returns>
 /// <param name="sz1">The first <see cref="T:System.Drawing.Size" /> to add. </param>
 /// <param name="sz2">The second <see cref="T:System.Drawing.Size" /> to add. </param>
 /// <filterpriority>3</filterpriority>
 public static Size operator +(Size sz1, Size sz2)
 {
     return(Size.Add(sz1, sz2));
 }