コード例 #1
0
ファイル: GraphicsExtenions.cs プロジェクト: Epitomy/CMS
        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);
        }
コード例 #2
0
ファイル: GraphicsExtenions.cs プロジェクト: Epitomy/CMS
        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;
        }