hi
I use
clip library
with C++, but I get run time error when execute below instruction.
c.AddPaths(subj, ptSubject, false);
if I use true instead of false, I don't get run time error, but I don't want to clip polygon. I want to clip lines.
look below code.
Paths subj(2), clip(1), solution;
subj[0] <<IntPoint(180, 200) << IntPoint(260, 200);
subj[1] <<IntPoint(215, 160) << IntPoint(230, 190);
clip[0] <<IntPoint(190, 210) << IntPoint(240, 210) <<IntPoint(240, 130) << IntPoint(190, 130);
Clipper c;
c.AddPaths(subj, ptSubject, false);c.AddPaths(clip, ptClip, true);
c.Execute(ctIntersection, solution, pftNonZero, pftNonZero);
I get below run time error.
Unhandled exception at 0x77004598 in sample.exe: Microsoft C++ exception: ClipperLib::clipperException at memory location 0x009BF054.