2016-11-23 26 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); 
    }