Esempio n. 1
0
 /// <summary>
 /// Inflates the rectangle.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The inflated rectangle.</returns>
 public Rect Inflate(Thickness thickness)
 {
     return new Rect(
         new Point(this.x - thickness.Left, this.y - thickness.Top),
         this.Size.Inflate(thickness));
 }
Esempio n. 2
0
 /// <summary>
 /// Deflates the rectangle by a <see cref="Thickness"/>.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The deflated rectangle.</returns>
 /// <remarks>The deflated rectangle size cannot be less than 0.</remarks>
 public Rect Deflate(Thickness thickness)
 {
     return new Rect(
         new Point(_x + thickness.Left, _y + thickness.Top),
         Size.Deflate(thickness));
 }
Esempio n. 3
0
 /// <summary>
 /// Deflates the rectangle by a <see cref="Thickness"/>.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The deflated rectangle.</returns>
 /// <remarks>The deflated rectangle size cannot be less than 0.</remarks>
 public Rect Deflate(Thickness thickness)
 {
     return new Rect(
         new Point(this.x + thickness.Left, this.y + thickness.Top),
         this.Size.Deflate(thickness));
 }
Esempio n. 4
0
 /// <summary>
 /// Inflates the size by a <see cref="Thickness"/>.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The inflated size.</returns>
 public Size Inflate(Thickness thickness)
 {
     return new Size(
         _width + thickness.Left + thickness.Right,
         _height + thickness.Top + thickness.Bottom);
 }
Esempio n. 5
0
 /// <summary>
 /// Inflates the rectangle.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The inflated rectangle.</returns>
 public Rect Inflate(Thickness thickness)
 {
     return new Rect(
         new Point(_x - thickness.Left, _y - thickness.Top),
         Size.Inflate(thickness));
 }
Esempio n. 6
0
 /// <summary>
 /// Deflates the size by a <see cref="Thickness"/>.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The deflated size.</returns>
 /// <remarks>The deflated size cannot be less than 0.</remarks>
 public Size Deflate(Thickness thickness)
 {
     return new Size(
         Math.Max(0, _width - thickness.Left - thickness.Right),
         Math.Max(0, _height - thickness.Top - thickness.Bottom));
 }
Esempio n. 7
0
 /// <summary>
 /// Deflates the rectangle by a <see cref="Thickness"/>.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The deflated rectangle.</returns>
 /// <remarks>The deflated rectangle size cannot be less than 0.</remarks>
 public Rect Deflate(Thickness thickness)
 {
     return(new Rect(
                new Point(_x + thickness.Left, _y + thickness.Top),
                Size.Deflate(thickness)));
 }
Esempio n. 8
0
 /// <summary>
 /// Inflates the rectangle.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The inflated rectangle.</returns>
 public Rect Inflate(Thickness thickness)
 {
     return(new Rect(
                new Point(_x - thickness.Left, _y - thickness.Top),
                Size.Inflate(thickness)));
 }
Esempio n. 9
0
 /// <summary>
 /// Inflates the size by a <see cref="Thickness"/>.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The inflated size.</returns>
 public Size Inflate(Thickness thickness)
 {
     return(new Size(
                this.width + thickness.Left + thickness.Right,
                this.height + thickness.Top + thickness.Bottom));
 }
Esempio n. 10
0
 /// <summary>
 /// Deflates the size by a <see cref="Thickness"/>.
 /// </summary>
 /// <param name="thickness">The thickness.</param>
 /// <returns>The deflated size.</returns>
 /// <remarks>The deflated size cannot be less than 0.</remarks>
 public Size Deflate(Thickness thickness)
 {
     return(new Size(
                Math.Max(0, this.width - thickness.Left - thickness.Right),
                Math.Max(0, this.height - thickness.Top - thickness.Bottom)));
 }