コード例 #1
0
ファイル: RSize.cs プロジェクト: kongres/libraries
 /// <summary>
 ///     Initializes a new instance of the <see cref="RSize" /> structure from the specified existing
 ///     <see
 ///         cref="RSize" />
 ///     structure.
 /// </summary>
 /// <param name="size">
 ///     The <see cref="RSize" /> structure from which to create the new
 ///     <see
 ///         cref="RSize" />
 ///     structure.
 /// </param>
 public RSize(RSize size)
 {
     this._width  = size._width;
     this._height = size._height;
 }
コード例 #2
0
ファイル: RSize.cs プロジェクト: kongres/libraries
 /// <summary>
 ///     Subtracts the width and height of one <see cref="RSize" /> structure from the width and height of another
 ///     <see
 ///         cref="RSize" />
 ///     structure.
 /// </summary>
 /// <returns>
 ///     A <see cref="RSize" /> structure that is a result of the subtraction operation.
 /// </returns>
 /// <param name="sz1">
 ///     The <see cref="RSize" /> structure on the left side of the subtraction operator.
 /// </param>
 /// <param name="sz2">
 ///     The <see cref="RSize" /> structure on the right side of the subtraction operator.
 /// </param>
 public static RSize Subtract(RSize sz1, RSize sz2)
 {
     return(new RSize(sz1.Width - sz2.Width, sz1.Height - sz2.Height));
 }
コード例 #3
0
ファイル: RSize.cs プロジェクト: kongres/libraries
 /// <summary>
 ///     Adds the width and height of one <see cref="RSize" /> structure to the width and height of another
 ///     <see
 ///         cref="RSize" />
 ///     structure.
 /// </summary>
 /// <returns>
 ///     A <see cref="RSize" /> structure that is the result of the addition operation.
 /// </returns>
 /// <param name="sz1">
 ///     The first <see cref="RSize" /> structure to add.
 /// </param>
 /// <param name="sz2">
 ///     The second <see cref="RSize" /> structure to add.
 /// </param>
 public static RSize Add(RSize sz1, RSize sz2)
 {
     return(new RSize(sz1.Width + sz2.Width, sz1.Height + sz2.Height));
 }
コード例 #4
0
 /// <summary>
 ///     Inflates this <see cref="RRect" /> by the specified amount.
 /// </summary>
 /// <param name="size">The amount to inflate this rectangle. </param>
 public void Inflate(RSize size)
 {
     Inflate(size.Width, size.Height);
 }
コード例 #5
0
 /// <summary>
 ///     Translates a <see cref="RPoint" /> by the negative of a specified size.
 /// </summary>
 /// <returns>
 ///     The translated <see cref="RPoint" />.
 /// </returns>
 /// <param name="pt">
 ///     The <see cref="RPoint" /> to translate.
 /// </param>
 /// <param name="sz">
 ///     The <see cref="T:System.Drawing.SizeF" /> that specifies the numbers to subtract from the coordinates of
 ///     <paramref
 ///         name="pt" />
 ///     .
 /// </param>
 public static RPoint Subtract(RPoint pt, RSize sz)
 {
     return(new RPoint(pt.X - sz.Width, pt.Y - sz.Height));
 }
コード例 #6
0
 /// <summary>
 ///     Translates a given <see cref="RPoint" /> by a specified
 ///     <see
 ///         cref="T:System.Drawing.SizeF" />
 ///     .
 /// </summary>
 /// <returns>
 ///     The translated <see cref="RPoint" />.
 /// </returns>
 /// <param name="pt">
 ///     The <see cref="RPoint" /> to translate.
 /// </param>
 /// <param name="sz">
 ///     The <see cref="T:System.Drawing.SizeF" /> that specifies the numbers to add to the coordinates of
 ///     <paramref
 ///         name="pt" />
 ///     .
 /// </param>
 public static RPoint Add(RPoint pt, RSize sz)
 {
     return(new RPoint(pt.X + sz.Width, pt.Y + sz.Height));
 }