Mercurial > hg > orthanc-stone
comparison Applications/Samples/Sdl/SingleFrameViewer/SdlSimpleViewer.cpp @ 1982:ba45e1b0812a
preparing interfaces for rectangle probe, ellipse probe and text annotations
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 31 Oct 2022 08:55:14 +0100 |
parents | 5a434f5889f8 |
children | 1fa3f484008e |
comparison
equal
deleted
inserted
replaced
1981:c074c75cf416 | 1982:ba45e1b0812a |
---|---|
78 std::cout << std::endl << "Keyboard shorcuts:" << std::endl | 78 std::cout << std::endl << "Keyboard shorcuts:" << std::endl |
79 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 | 79 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 |
80 << " a\tCreate angle annotations" << std::endl | 80 << " a\tCreate angle annotations" << std::endl |
81 << " c\tCreate circle annotations" << std::endl | 81 << " c\tCreate circle annotations" << std::endl |
82 << " d\tDelete mode for annotations" << std::endl | 82 << " d\tDelete mode for annotations" << std::endl |
83 << " e\tEdit mode, don't create annotation (default)" << std::endl | 83 << " e\tCreate ellipse probe" << std::endl |
84 << " l\tCreate line annotations" << std::endl | 84 << " l\tCreate line annotations" << std::endl |
85 << " m\tModification/edit mode, don't create annotation (default)" << std::endl | |
85 << " p\tCreate pixel probe" << std::endl | 86 << " p\tCreate pixel probe" << std::endl |
87 << " r\tCreate rectangle probe" << std::endl | |
86 #else | 88 #else |
87 << " a\tEnable/disable the angle annotation tool" << std::endl | 89 << " a\tEnable/disable the angle annotation tool" << std::endl |
88 << " l\tEnable/disable the line annotation tool" << std::endl | 90 << " l\tEnable/disable the line annotation tool" << std::endl |
89 << " r\tRedo the last edit to the annotation tools" << std::endl | 91 << " r\tRedo the last edit to the annotation tools" << std::endl |
90 << " u\tUndo the last edit to the annotation tools" << std::endl | 92 << " u\tUndo the last edit to the annotation tools" << std::endl |
300 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_Circle); | 302 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_Circle); |
301 break; | 303 break; |
302 #endif | 304 #endif |
303 | 305 |
304 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 | 306 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 |
305 case SDLK_e: | 307 case SDLK_m: |
306 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_Edit); | 308 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_Edit); |
307 break; | 309 break; |
308 #endif | 310 #endif |
309 | 311 |
310 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 | 312 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 |
386 case SDLK_p: | 388 case SDLK_p: |
387 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_PixelProbe); | 389 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_PixelProbe); |
388 break; | 390 break; |
389 #endif | 391 #endif |
390 | 392 |
393 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 | |
394 case SDLK_e: | |
395 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_EllipseProbe); | |
396 break; | |
397 #endif | |
398 | |
399 #if SAMPLE_USE_ANNOTATIONS_LAYER == 1 | |
400 case SDLK_r: | |
401 annotations.SetActiveTool(OrthancStone::AnnotationsSceneLayer::Tool_RectangleProbe); | |
402 break; | |
403 #endif | |
404 | |
391 default: | 405 default: |
392 break; | 406 break; |
393 } | 407 } |
394 } | 408 } |
395 else if (event.type == SDL_MOUSEBUTTONDOWN || | 409 else if (event.type == SDL_MOUSEBUTTONDOWN || |