void AddCapToPath(Path path, PathFigure figure, double length, double lineWidthHalf, LineCap lineCap, XMatrix matrix)
{
// sketch:
// 1. create Transform that make a horizontal line with start in 0,0
// 2. create a Polygon with the shape of the line including its caps
// 3. render the shape with the brush of the pen
//PolyLineSegment seg;
switch (lineCap)
{
case LineCap.Flat:
matrix.Transform(new XPoint(length + lineWidthHalf, -lineWidthHalf));
break;
case LineCap.Square:
matrix.Transform(new XPoint(length + lineWidthHalf, -lineWidthHalf));
break;
case LineCap.Round:
break;
case LineCap.Triangle:
break;
}
}