The code will be something as follows:
+-------------+
public void TestDraw()
{
Graphics objG = MyRasterImage.CreateGdiPlusGraphics().Graphics;
Pen objP = new Pen(Color.Blue);
//Draw Rounded Rectangle
RoundRectangle(objG, objP, 100, 200, 200, 100, 10);
// Draw Polygon
objG.DrawPolygon(...);
// Draw Bezier
objG.DrawBezier(...);
}
public void RoundRectangle(Graphics objG, Pen objP, float h, float v,
float width, float height, float radius)
{
GraphicsPath objGP = new GraphicsPath();
objGP.AddLine(h + radius, v, h + width - (radius * 2), v);
objGP.AddArc(h + width - (radius * 2), v, radius * 2, radius * 2, 270, 90);
objGP.AddLine(h + width, v + radius, h + width, v + height - (radius * 2));
objGP.AddArc(h + width - (radius * 2), v + height - (radius * 2), radius * 2, radius * 2, 0, 90); // Corner
objGP.AddLine(h + width - (radius * 2), v + height, h + radius, v + height);
objGP.AddArc(h, v + height - (radius * 2), radius * 2, radius * 2, 90, 90);
objGP.AddLine(h, v + height - (radius * 2), h, v + radius);
objGP.AddArc(h, v, radius * 2, radius * 2, 180, 90);
objGP.CloseFigure();
objG.DrawPath(objP, objGP);
objGP.Dispose();
}
+-------------+
Thanks,
Maen Badwan
LEADTOOLS Technical Support