ConvertRoundRect() static private method

Create a rounded rectangle using lines and arcs
static private ConvertRoundRect ( int x, int y, int w, int h, int arcWidth, int arcHeight ) : GraphicsPath
x int upper left x coordinate
y int upper left y coordinate
w int width
h int height
arcWidth int the horizontal diameter of the arc at the four corners
arcHeight int the vertical diameter of the arc at the four corners
return System.Drawing.Drawing2D.GraphicsPath
Ejemplo n.º 1
0
        public override void fillRoundRect(int x, int y, int w, int h, int arcWidth, int arcHeight)
        {
            GraphicsPath gp = J2C.ConvertRoundRect(x, y, w, h, arcWidth, arcHeight);

            g.FillPath(brush, gp);
            gp.Dispose();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Apparently there is no rounded rec function in .Net. Draw the
 /// rounded rectangle by using lines and arcs.
 /// </summary>
 public override void drawRoundRect(int x, int y, int w, int h, int arcWidth, int arcHeight)
 {
     using (GraphicsPath gp = J2C.ConvertRoundRect(x, y, w, h, arcWidth, arcHeight))
         g.DrawPath(pen, gp);
 }