/// <summary> /// Gets the rounded path. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="width">The width.</param> /// <param name="height">The height.</param> /// <param name="radius">The radius.</param> /// <param name="corner">The corner.</param> /// <returns></returns> 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); }
/// <summary> /// Gets the rounded path. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="width">The width.</param> /// <param name="height">The height.</param> /// <param name="radius">The radius.</param> /// <param name="corner">The corner.</param> /// <returns></returns> 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; }