Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RSize" /> structure from the specified <see cref="RPoint" /> structure.
 /// </summary>
 /// <param name="pt">The <see cref="RPoint" /> structure from which to initialize this <see cref="RSize" /> structure.</param>
 public RSize(RPoint pt)
 {
     this._width  = pt.X;
     this._height = pt.Y;
 }
Esempio n. 2
0
 /// <summary>
 ///     Adjusts the location of this rectangle by the specified amount.
 /// </summary>
 /// <param name="pos">The amount to offset the location. </param>
 public void Offset(RPoint pos)
 {
     Offset(pos.X, pos.Y);
 }
Esempio n. 3
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));
 }
Esempio n. 4
0
 /// <summary>
 ///     Determines if the specified point is contained within this <see cref="RRect" /> structure.
 /// </summary>
 /// <returns>
 ///     This method returns true if the point represented by the <paramref name="pt" /> parameter is contained within this
 ///     <see cref="RRect" />
 ///     structure; otherwise false.
 /// </returns>
 /// <param name="pt">The <see cref="RPoint" /> to test.</param>
 public bool Contains(RPoint pt)
 {
     return(Contains(pt.X, pt.Y));
 }
Esempio n. 5
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));
 }