SixLabors/Shapes

Incorrect intersection count when passing through a co-linear segment

tocsoft opened this issue · 0 comments

When scanning all intersections along Y = 64 for a linear polygon described using the below vectors there are an odd number of intersections instead of an even number.

Vector2[] Points = new[]
			{
				new Vector2( 8, 8 ),
				new Vector2( 64, 8 ),
				new Vector2( 64, 64 ),
				new Vector2( 120, 64 ),
				new Vector2( 120, 120 ),
				new Vector2( 8, 120 )
			};

from originally from SixLabors/ImageSharp#122