Path drawing function can cause "Division by Zero" exception in Windows.
There is no error on Linux, but the drawing is not correct, the path is not closed. (see attached image).
The bug is in the ComputeWidePolylinePoints function in the BGRAPen.pas file. (see attached image).
I found a workaround that fixes the error, however this is a quick "dirty" hack:
//compute borders
setlength(borders, length(pts)-1);
for i := 0 to high(pts)-1 do
begin
dir := pts[i+1]-pts[i];
len := VectLen(dir);
if len <> 0 then// <- hack
dir.Scale(1/len);
Attached to the post is an example that raises a "Division by Zero" exception on Windows.
I hope the author of BGRABitmap will take a look at this bug and the possibility of fixing it.