I am trying to split a polygon by a line using the Clipper library. After the execution of clipping, it returns empty path. Can someone suggest the right way to do the same.
Paths clip(2),soln;
clip[0] << IntPoint(-264,-210) << IntPoint(650,-209);
Path sub = clip[0];
Path poly << IntPoint(531,49) << IntPoint(-21,49) << IntPoint(-970,-961) << IntPoint(-945,-1019) << IntPoint(1045,-1071) ;
Clipper c;
c.AddPath(poly,ptSubject,true);
c.AddPath(sub,ptClip,true);
c.Execute(ctIntersection,soln,pftNonZero, pftNonZero);
std::cout << soln.size() << "soln size";
The soln size is zero.