我想绘制直线多边形并使用偏移,但它是并集

发布于 2016-12-15 22:07:51
Suppadech,我建议你在ClipperOffset对象中传递两个封闭的路径,其中第二个路径的方向与第一个路径的方向相反。
int main()
{
Paths subj(2);
Paths solution;
subj[0] << IntPoint(10,10) << IntPoint(100,10) << IntPoint(100,100) << IntPoint(10,100);
subj[1] << IntPoint(10,10) << IntPoint(10,100) << IntPoint(100,100) << IntPoint(100,10);
ClipperOffset co;
co.AddPaths(subj, jtSquare, etClosedPolygon);
co.Execute(solution, 5.0);
}https://stackoverflow.com/questions/40755807
复制相似问题