WORKAROUND
To work around this problem, use the
StartFigure function at the start of the second figure.
For example, use code that resembles the following code example.
void PaintGDIPlus(HDC hdc) {
Graphics gr(hdc);
GraphicsPath gp;
Pen pen(Color(250,255,0,0), 3);
pen.SetLineJoin(LineJoinRound);
pen.SetLineCap(LineCapRound, LineCapRound, DashCapRound);
//Uncomment this line to see the problem.
//gp.StartFigure();
gp.AddLine(841, 298, 842, 300);
gp.AddLine(842, 300, 842, 302);
//This line has already closed the figure.
gp.AddLine(842, 302, 841, 298);
//Uncomment this line to see the problem.
//gp.CloseFigure();
//This StartFigure() function starts the new figure and disconnects from the old figure.
gp.StartFigure();
gp.AddLine(87, 291, 85, 293);
gp.AddLine(85, 293, 83, 295);
gp.AddLine(83, 295, 85, 293);
gp.AddLine(85, 293, 87, 291);
gr.DrawPath(&pen, &gp);
}