567: PathWriter, CloseFigure, CurveFlattener

and change EndFigure, EndAndCloseFigure command values