GraphicsPathToSVG(c#代码)
public static string GraphicsPathToSVG(GraphicsPath path)
{
PathData pathData = path.PathData;
StringBuilder def = new System.Text.StringBuilder();
int i = 0;
byte bytType;
int cCount = 0;
string strX = null;
string strY = null;
def.Append("<path ");
//if (IncludeId) def.Append("id=\"\" ");
def.Append("fill-rule=\"evenodd\"");
def.Append(" style=\"fill:orange;stroke:red;stroke-width:1\" d=\"");
for (i = 0; i <= pathData.Points.GetUpperBound(0); i++)
{
bytType = pathData.Types[i];