Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SvgRectF"/> structure
 /// with the specified location and size.
 /// </summary>
 /// <param name="size">
 /// A <see cref="SvgSizeF"/> that represents the width and height of the
 /// rectangular region.
 /// </param>
 /// <param name="location">
 /// A <see cref="SvgPointF"/> that represents the upper-left corner
 /// of the rectangular region.
 /// </param>
 public SvgRectF(SvgPointF location, SvgSizeF size)
 {
     _x      = location.X;
     _y      = location.Y;
     _width  = size.Width;
     _height = size.Height;
 }
Exemple #2
0
 /// <summary>
 /// This translates a <see cref="SvgPointF"/> by the negative of a
 /// specified size.
 /// </summary>
 /// <param name="pt">The <see cref="SvgPointF"/> to translate.</param>
 /// <param name="sz">
 /// The <see cref="SvgSizeF"/> that specifies the numbers to subtract from
 /// the coordinates of pt.
 /// </param>
 /// <returns>The translated <see cref="SvgPointF"/>.</returns>
 public static SvgPointF Subtract(SvgPointF pt, SvgSizeF sz)
 {
     return(new SvgPointF(pt.X - sz.Width, pt.Y - sz.Height));
 }
Exemple #3
0
 /// <summary>
 /// Inflates this <see cref="SvgRectF"/> by the specified amount.
 /// </summary>
 /// <param name="size">The amount to inflate this rectangle. </param>
 /// <returns>This method does not return a value.</returns>
 public void Inflate(SvgSizeF size)
 {
     this.Inflate(size.Width, size.Height);
 }
Exemple #4
0
 /// <summary>
 /// This translates a given <see cref="SvgPointF"/> by a specified
 /// <see cref="SvgSizeF"/>.
 /// </summary>
 /// <param name="pt">The <see cref="SvgPointF"/> to translate.</param>
 /// <param name="sz">
 /// The <see cref="SvgSizeF"/> that specifies the numbers to add to the
 /// coordinates of pt.
 /// </param>
 /// <returns>The translated <see cref="SvgPointF"/>.</returns>
 public static SvgPointF Add(SvgPointF pt, SvgSizeF sz)
 {
     return(new SvgPointF(pt.X + sz.Width, pt.Y + sz.Height));
 }