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

RectanglePath() private method

private RectanglePath ( RectangleF rectangle ) : void
rectangle RectangleF
return void
        void RectanglePath(RectangleF rectangle)
        {
            MoveTo (rectangle.Location);
            context.AddRect(rectangle.ToCGRect ());
            context.ClosePath();
        }

Same methods

Graphics::RectanglePath ( float x1, float y1, float x2, float y2 ) : 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);
 }