On Fri, 7 Jan 2022 at 19:33, Stefan BrĂ¼ns stefan.bruens@rwth-aachen.de wrote:
Or they are coincident, the figure is CLOSED, thus vertex_count is decremented. Then the last segment starts a `i == vertex_count - 1 == real_vertex_count - 2`. As `vertex[i + 1] == vertex[0]` holds, we can ignore the wraparound.
The comment is slightly off in this case - maybe `i + 1 < real_vertex_count`, but I am not sure this is really relevant, as this becomes fully correct with patch 6.
Ah, right, this is relying on the last vertex still being available, even though we decremented the vertex count in d2d_geometry_sink_EndFigure(). That would normally be a little too subtle/fragile for our taste, but as patch 6 makes it more obviously correct, it's probably fine.