SixLabors / ImageSharp.Drawing

:pen: Extensions to ImageSharp containing a cross-platform 2D polygon manipulation API and drawing operations.
https://sixlabors.com/products/imagesharp-drawing/
Other
286 stars 39 forks source link

Mitigate issue where outline thicknesses less than 0.5 fail out generate solid shapes not outlines #324

Closed tocsoft closed 8 months ago

tocsoft commented 8 months ago

Prerequisites

Description

If the outline thickness is going to trigger the noop behaviour of the clipper then scale the inputs and outputs to not trigger that behaviour.

I tried just removing the test in PolygonOffsetter.cs but for some reason that causes very small outlines to take significantly longer to generate than scaling up and down. (not investigated why).

This causes everything to generally render now, what it renders at particularly small sizes might not be the best (not investigated) but at least we generally render something better than the solid shape.

resolves #323