# HG changeset patch # User Sebastien Jodogne # Date 1643214527 -3600 # Node ID 144f8f82c15a27d9cb10ae4498b68207c50c3686 # Parent b3c08e607d9f20a4d4b06130a17611480890d11b added ctrl key in RtViewerWasm diff -r b3c08e607d9f -r 144f8f82c15a Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp --- a/Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp Wed Jan 26 17:19:37 2022 +0100 +++ b/Applications/Samples/WebAssembly/RtViewer/RtViewerWasm.cpp Wed Jan 26 17:28:47 2022 +0100 @@ -80,9 +80,18 @@ int delta = 0; if (wheelEvent->deltaY < 0) + { delta = -1; - if (wheelEvent->deltaY > 0) + } + else if (wheelEvent->deltaY > 0) + { delta = 1; + } + + if (wheelEvent->mouse.ctrlKey) + { + delta *= 10; + } that->Scroll(delta); diff -r b3c08e607d9f -r 144f8f82c15a OrthancStone/Sources/Toolbox/DicomStructureSet.cpp --- a/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Wed Jan 26 17:19:37 2022 +0100 +++ b/OrthancStone/Sources/Toolbox/DicomStructureSet.cpp Wed Jan 26 17:28:47 2022 +0100 @@ -901,6 +901,21 @@ projected.push_back(CreateRectangle(x1, y1, x2, y2)); } } + + BoostMultiPolygon merged; + Union(merged, projected); + + chains.resize(merged.size()); + for (size_t i = 0; i < merged.size(); i++) + { + const std::vector& outer = merged[i].outer(); + + chains[i].resize(outer.size()); + for (size_t j = 0; j < outer.size(); j++) + { + chains[i][j] = ScenePoint2D(outer[j].x(), outer[j].y()); + } + } #else // this will contain the intersection of the polygon slab with // the cutting plane, projected on the cutting plane coord system @@ -926,9 +941,7 @@ static_cast(y2)),curZ)); } } -#endif -#if USE_BOOST_UNION_FOR_POLYGONS != 1 // projected contains a set of rectangles specified by two opposite // corners (x1,y1,x2,y2) // we need to merge them @@ -986,22 +999,6 @@ chains[i][0] = segments[i].first; chains[i][1] = segments[i].second; } - -#else - BoostMultiPolygon merged; - Union(merged, projected); - - chains.resize(merged.size()); - for (size_t i = 0; i < merged.size(); i++) - { - const std::vector& outer = merged[i].outer(); - - chains[i].resize(outer.size()); - for (size_t j = 0; j < outer.size(); j++) - { - chains[i][j] = ScenePoint2D(outer[j].x(), outer[j].y()); - } - } #endif return true;