Angus Johnson

Results 83 comments of Angus Johnson

I've just added a new `clipper.export.h` file to create DLL/so files and a sample delphi app to test. I see this file as a proof of concept rather than a...

I can't duplicate this. Are you using the latest commit? ``` procedure DoRandomStressTest(maxCnt: integer); var i: integer; sub, clp: TPathsD; csub_local, cclp_local: CPathsD; csol_extern, csolo_extern: CPathsD; begin csolo_extern := nil;...

> Seems to be a 32 bit problem. OK, I missed that bit. Edit: cdecl; I'll upload the full fix shortly.

> Hi Angus, thanks for the correction. Does the benchmark mean (4000 edges) that the C implementation is 6x faster than Delphi? Bad time for Delphi? :-( Firstly, the performance...

I've been very tied up with other things so I'm somewhat late to the party here 😜. Anyhow I am very keen to investigate why Clipper2 is so much slower...

> To be fair, the switch to Clipper2 did solve a lot of minor annoying problems OK. I think I'm understanding the problem now. Clipper does use a `Union` operation...

> Yes it does. But not 28 times better :-) I agree. And that's why I'm not using Clipper for polygon rendering in my own graphics library. The polygon renderer...

> So my question now is really: Is there any hope that Clipper2 can be made able to better compete on performance No. But Clipper2's `Inflate` function really shouldn't be...

> Ah... Can I just use TClipperOffset directly? No, you can't. Sorry. However, [this](https://github.com/AngusJohnson/Image32/blob/38ef4840436531c9e3782fa2dcf30618b363c48b/source/Img32.Vector.pas#L1855) `Grow` function should be very similar to Clipper2's `TClipperOffset.DoGroupOffset`. Nevertheless I'm pretty sure I've tweaked this...