MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / findContoursBBox

Function findContoursBBox

source/MRSymbolMesh/MRAlignTextToMesh.cpp:16–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14{
15
16Box2f findContoursBBox( const Contours2f& conts )
17{
18 MR_TIMER;
19 tbb::enumerable_thread_specific<Box2f> tls;
20 ParallelFor( conts, [&] ( size_t i )
21 {
22 ParallelFor( conts[i], [&] ( size_t j )
23 {
24 tls.local().include( conts[i][j] );
25 } );
26 } );
27 Box2f bbox;
28 for ( const auto& tlsBox : tls )
29 bbox.include( tlsBox );
30 return bbox;
31}
32
33void scaleContours( Contours2f& conts, float scale )
34{

Callers 2

alignTextToMeshFunction · 0.85
bendTextAlongCurveFunction · 0.85

Calls 2

ParallelForFunction · 0.85
includeMethod · 0.45

Tested by

no test coverage detected