Code in the Comments
[csharp]
GraphicsPath p = new GraphicsPath();
p.StartFigure();
//Top Left Corner
if ((RectangleCorners.TopLeft & corners)
== RectangleCorners.TopLeft)
{
p.AddArc(x, y, 2*radius, 2*radius, 180, 90);
}
else
{
p.AddLine(x, y+radius, x, y);
p.AddLine(x, y, x+radius;, y);
}
//Top Edge
p.AddLine(x+radius, y, x+width-radius, y);
[/csharp]
Now this will turn into:
GraphicsPath p = new GraphicsPath();
p.StartFigure();
//Top Left Corner
if ((RectangleCorners.TopLeft & corners)
== RectangleCorners.TopLeft)
{
p.AddArc(x, y, 2*radius, 2*radius, 180, 90);
}
else
{
p.AddLine(x, y+radius, x, y);
p.AddLine(x, y, x+radius;, y);
}
//Top Edge
p.AddLine(x+radius, y, x+width-radius, y);
p.StartFigure();
//Top Left Corner
if ((RectangleCorners.TopLeft & corners)
== RectangleCorners.TopLeft)
{
p.AddArc(x, y, 2*radius, 2*radius, 180, 90);
}
else
{
p.AddLine(x, y+radius, x, y);
p.AddLine(x, y, x+radius;, y);
}
//Top Edge
p.AddLine(x+radius, y, x+width-radius, y);
Now this technique works for almost any language we use here on the site including:
- csharp
- xml
- mxml
- actionscript
- javascript
- html
- css
- php
Posted in Blog News by The Fattest |

November 3rd, 2008 at 3:06 pm
can i mail it to U ?
greetings
frederic
November 3rd, 2008 at 3:10 pm
Sure, the email address is located at the bottom of the About page.