/// <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)); }
/// <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) { _width = pt.X; _height = pt.Y; }
/// <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)); }