private static GraphicsPath GetRoundedPath(float x, float y, float width, float height, float radius, Corner corner) { GraphicsPath path = new GraphicsPath(); if (radius > 0) { Corners r = new Corners(x, y, width, height, radius, corner); r.Execute(path); } else { path.AddRectangle(new RectangleF(x, y, width, height)); } path.CloseFigure(); return(path); }
private static GraphicsPath GetRoundedPath(float x, float y, float width, float height, float radius, Corner corner) { GraphicsPath path = new GraphicsPath(); if (radius > 0) { Corners r = new Corners(x, y, width, height, radius, corner); r.Execute(path); } else { path.AddRectangle(new RectangleF(x, y, width, height)); } path.CloseFigure(); return path; }