void CreateStartLineCap(VertexStore outputVxs, Vector v0, Vector v1, double edgeWidth)
{
switch (this.LineCapStyle)
{
default: throw new NotSupportedException();
case LineCap.Butt:
outputVxs.AddMoveTo(v1.X, v1.Y); // moveto
outputVxs.AddLineTo(v0.X, v0.Y);
break;
case LineCap.Square:
{
Vector delta = (v0 - v1).Rotate(90).NewLength(edgeWidth);
//------------------------
outputVxs.AddMoveTo(v1.X + delta.X, v1.Y + delta.Y);
outputVxs.AddLineTo(v0.X + delta.X, v0.Y + delta.Y);
}
break;
case LineCap.Round:
capVectors.Clear();
BuildBeginCap(v0.X, v0.Y, v1.X, v1.Y, capVectors);
//----------------------------------------------------
int j = capVectors.Count;
outputVxs.AddMoveTo(v1.X, v1.Y);
for (int i = j - 1; i >= 0; --i)
{
Vector v = capVectors[i];
outputVxs.AddLineTo(v.X, v.Y);
}
break;
}
}