System.Drawing.RectangleF.Inflate C# (CSharp) Method

Inflate() public method

Inflates this by the specified amount.

public Inflate ( float x, float y ) : void
x float
y float
return void
        public void Inflate(float x, float y)
        {
            X -= x;
            Y -= y;
            Width += 2 * x;
            Height += 2 * y;
        }

Same methods

RectangleF::Inflate ( RectangleF rect, float x, float y ) : RectangleF
RectangleF::Inflate ( System rect, float x, float y ) : System.Drawing.RectangleF
RectangleF::Inflate ( SizeF size ) : void
RectangleF::Inflate ( System size ) : void

Usage Example

コード例 #1
0
 static public void DrawNode(ICanvas canvas, UnitPoint nodepoint)
 {
     RectangleF r = new RectangleF(canvas.ToScreen(nodepoint), new SizeF(0, 0));
     r.Inflate(3, 3);
     if (r.Right < 0 || r.Left > canvas.ClientRectangle.Width)
         return;
     if (r.Top < 0 || r.Bottom > canvas.ClientRectangle.Height)
         return;
     canvas.Graphics.FillRectangle(Brushes.White, r);
     r.Inflate(1, 1);
     canvas.Graphics.DrawRectangle(Pens.Black, ScreenUtils.ConvertRect(r));
 }
All Usage Examples Of System.Drawing.RectangleF::Inflate