Mercurial > hg > orthanc-stone
annotate Platforms/Wasm/WasmViewport.cpp @ 998:38b6bb0bdd72
added a new set of classes that correctly handle non-convex polygons (not
used yet because of limitations in coordinates computing): DicomStructure2,
DicomStructureSet2, DicomStructurePolygon2, DicomStructureSetSlicer2. Too
many shortcuts have been taken when computing the actual position.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 20 Sep 2019 11:58:00 +0200 |
parents | 4f2416d519b4 |
children |
rev | line source |
---|---|
242 | 1 #include "WasmViewport.h" |
2 | |
3 #include <vector> | |
4 #include <memory> | |
5 | |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
242
diff
changeset
|
6 std::vector<std::shared_ptr<Deprecated::WidgetViewport>> wasmViewports; |
242 | 7 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
242
diff
changeset
|
8 void AttachWidgetToWasmViewport(const char* htmlCanvasId, Deprecated::IWidget* centralWidget) { |
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
242
diff
changeset
|
9 std::shared_ptr<Deprecated::WidgetViewport> viewport(CreateWasmViewportFromCpp(htmlCanvasId)); |
242 | 10 viewport->SetCentralWidget(centralWidget); |
11 | |
12 wasmViewports.push_back(viewport); | |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
242
diff
changeset
|
13 } |