Пример #1
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)
 {
     this.Offset(pos.X, pos.Y);
 }
Пример #2
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(this.Contains(pt.X, pt.Y));
 }
Пример #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));
 }
Пример #4
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;
 }
Пример #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));
 }