Mercurial > hg > orthanc-stone
diff Framework/Scene2DViewport/MeasureToolsToolbox.cpp @ 774:66ac7a2d1e3a
A few renames and cleanups + moved GUI constants to controller + start work on
hit tests for measure tools and mouse hover.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 24 May 2019 15:59:51 +0200 |
parents | 92c400a09f1b |
children | e42b491f1fb2 |
line wrap: on
line diff
--- a/Framework/Scene2DViewport/MeasureToolsToolbox.cpp Thu May 23 10:25:48 2019 +0200 +++ b/Framework/Scene2DViewport/MeasureToolsToolbox.cpp Fri May 24 15:59:51 2019 +0200 @@ -21,6 +21,7 @@ #include "MeasureToolsToolbox.h" #include "PointerTypes.h" #include "LayerHolder.h" +#include "ViewportController.h" #include "../Scene2D/TextSceneLayer.h" #include "../Scene2D/Scene2D.h" @@ -281,7 +282,6 @@ } #endif - /** This utility function assumes that the layer holder contains 5 text layers and will use the first four ones for the text background and the fifth one @@ -304,24 +304,22 @@ textLayer->SetText(text); if (i == 4) - textLayer->SetColor(0, 223, 81); + { + textLayer->SetColor(TEXT_COLOR_RED, + TEXT_COLOR_GREEN, + TEXT_COLOR_BLUE); + } else - textLayer->SetColor(0, 56, 21); + { + textLayer->SetColor(TEXT_OUTLINE_COLOR_RED, + TEXT_OUTLINE_COLOR_GREEN, + TEXT_OUTLINE_COLOR_BLUE); + } ScenePoint2D textAnchor; - //GetPositionOnBisectingLine( - // textAnchor, side1End_, center_, side2End_, 40.0*pixelToScene); textLayer->SetPosition( p.GetX() + xoffsets[i] * pixelToScene, p.GetY() + yoffsets[i] * pixelToScene); } } - - - - - - - - }