private static void ImportVexLine(OBJECT_LINE_LAYOUT layout, TEXT_LAYOUT textlayout, List<DocPoint> diagramLine, DocRectangle diagramLabel)
{
if (layout == null)
return;
diagramLine.Add(new DocPoint(layout.pline.startpoint.wx, layout.pline.startpoint.wy));
int direction = layout.pline.startdirection;
double posx = layout.pline.startpoint.wx;
double posy = layout.pline.startpoint.wy;
for (int i = 0; i < layout.pline.rpoint.Count; i++)
{
if (diagramLabel != null && textlayout != null &&
layout.textplacement != null &&
layout.textplacement.npos == i)
{
diagramLabel.X = textlayout.x + posx;
diagramLabel.Y = textlayout.y + posy;
diagramLabel.Width = textlayout.width;
diagramLabel.Height = textlayout.height;
}
double offset = layout.pline.rpoint[i];
if (direction == 1)
{
posy += offset;
direction = 0;
}
else if (direction == 0)
{
posx += offset;
direction = 1;
}
diagramLine.Add(new DocPoint(posx, posy));
}
}