2016-11-23 28 views

回答

1

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); 
    }