MCPcopy Create free account
hub / github.com/cinder/Cinder / calcOffsetOp

Function calcOffsetOp

blocks/Clipper/src/CinderClipper.cpp:98–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98vector<PolyLine2f> calcOffsetOp( ClipperLib::JoinType op, const vector<PolyLine2f> &a, float offset, double miterLimit, double arcTolerance )
99{
100 const float SCALE = 2147483648.0f;
101 auto aClipper = toClipper( a, SCALE );
102 ClipperLib::Paths solution;
103 ClipperLib::ClipperOffset co( miterLimit, arcTolerance * SCALE );
104 co.AddPaths( aClipper, op, ClipperLib::etClosedPolygon );
105 co.Execute( solution, offset * SCALE );
106 return fromClipper( solution, SCALE );
107}
108
109std::vector<cinder::PolyLine2f> calcRoundOffset( const std::vector<cinder::PolyLine2f> &poly, float offset, double arcTolerance )
110{

Callers 3

calcRoundOffsetFunction · 0.85
calcMiterOffsetFunction · 0.85
calcSquareOffsetFunction · 0.85

Calls 4

toClipperFunction · 0.85
fromClipperFunction · 0.85
AddPathsMethod · 0.80
ExecuteMethod · 0.80

Tested by

no test coverage detected