jaquadro / LilyPath

A 2D path and shape drawing library for MonoGame and XNA.
MIT License
93 stars 12 forks source link

Triangulator gets hanged in infinite loop #16

Closed VictorKochetkov closed 5 years ago

VictorKochetkov commented 5 years ago

Hello! Trying to draw shape like this:

drawBatch.Begin(DrawSortMode.Deferred);

var brush = new SolidColorBrush(Color.Black);

drawBatch.FillPath(brush, new List<Vector2>()
{
    new Vector2(0, 0),
    new Vector2(0, 100),
    new Vector2(20, 120),
    new Vector2(20, 20),
});

drawBatch.End();

Then program freezes - triangulator function hangs in infinite loop

VictorKochetkov commented 5 years ago

Seems I've used wrong function for my task. Now I'm using drawBatch.FillQuad - works perfect :)