MFEK / math.rlib

A library which supplies mathematics and algorithms for manipulating beziers.
Apache License 2.0
7 stars 4 forks source link

Crash when contour only contains a `move` (CWS, probably VWS too) and you attempt to create a `Piecewise<T>` #24

Open ctrlcctrlv opened 2 years ago

ctrlcctrlv commented 2 years ago

The workaround for this is known to be to add another point, and make a very tiny line, averting the crash, but still giving the dot the appearance of one:

image

I should probably do a Fixup in the stroking utilities we provide, and inside Fixup start calling a function to drop all "contours" of len 0 and adding a point a small ε away on contours of len 1.