Flattening the result of a Clip gives different results for horizontal and vertical lines.
Steps to Reproduce
private static void Problem()
{
var clip = new PathCollection(new RectangularPolygon(new PointF(24, 16), new PointF(777, 385)));
var vert = new SixLabors.ImageSharp.Drawing.Path(new LinearLineSegment(new PointF(26, 384), new PointF(26, 163)));
var horiz = new SixLabors.ImageSharp.Drawing.Path(new LinearLineSegment(new PointF(26, 163), new PointF(176, 163)));
IPath reverse = vert.Clip(clip);
var result1 = vert.Clip(reverse).Flatten().Select(x => x.Points);
reverse = horiz.Clip(clip);
var result2 = horiz.Clip(reverse).Flatten().Select(x => x.Points);
var same = result1.Count() == result2.Count();
}
I expect the Count of both result1 and result2 to be identical.
System Configuration
ImageSharp.Drawing version: 1.0.0-beta15
Other ImageSharp packages and versions: ImageSharp v.2.1.3
Environment (Operating system, version and so on): Win11 v.22H2
Description
Flattening the result of a Clip gives different results for horizontal and vertical lines.
Steps to Reproduce
I expect the Count of both result1 and result2 to be identical.
System Configuration