System.Drawing.Graphics.RectanglePath C# (CSharp) Method

RectanglePath() private method

private RectanglePath ( float x1, float y1, float x2, float y2 ) : void
x1 float
y1 float
x2 float
y2 float
return void
        void RectanglePath(float x1, float y1, float x2, float y2)
        {
            MoveTo (x1, y1);
            LineTo (x1, y2);
            LineTo (x2, y2);
            LineTo (x2, y1);
            context.ClosePath ();
        }

Same methods

Graphics::RectanglePath ( RectangleF rectangle ) : void

Usage Example

Example #1
0
 internal virtual void FillRect(Graphics graphics, CGRect rect)
 {
     // Use path by default, because this is how the default implementation works.
     // Some brushes override this to improve performance (SolidBrush, LinearGradientBrush)
     graphics.RectanglePath(rect);
     FillPath(graphics);
 }