Mercurial > hg > orthanc-stone
diff Framework/Scene2DViewport/AngleMeasureTool.cpp @ 804:61ba4b504e9a
PolylineSceneLayer now has one color per chain
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 May 2019 15:58:21 +0200 |
parents | 66ac7a2d1e3a |
children | e42b491f1fb2 |
line wrap: on
line diff
--- a/Framework/Scene2DViewport/AngleMeasureTool.cpp Tue May 28 14:18:46 2019 +0200 +++ b/Framework/Scene2DViewport/AngleMeasureTool.cpp Tue May 28 15:58:21 2019 +0200 @@ -100,8 +100,8 @@ // Fill the polyline layer with the measurement lines PolylineSceneLayer* polylineLayer = layerHolder_->GetPolylineLayer(0); polylineLayer->ClearAllChains(); - polylineLayer->SetColor(0, 183, 17); + const Color color(0, 183, 17); // sides { @@ -109,13 +109,13 @@ PolylineSceneLayer::Chain chain; chain.push_back(side1End_); chain.push_back(center_); - polylineLayer->AddChain(chain, false); + polylineLayer->AddChain(chain, false, color); } { PolylineSceneLayer::Chain chain; chain.push_back(side2End_); chain.push_back(center_); - polylineLayer->AddChain(chain, false); + polylineLayer->AddChain(chain, false, color); } } @@ -126,14 +126,14 @@ //TODO: take DPI into account AddSquare(chain, GetScene(), side1End_, GetController()->GetHandleSideLengthS()); - polylineLayer->AddChain(chain, true); + polylineLayer->AddChain(chain, true, color); } { PolylineSceneLayer::Chain chain; //TODO: take DPI into account AddSquare(chain, GetScene(), side2End_, GetController()->GetHandleSideLengthS()); - polylineLayer->AddChain(chain, true); + polylineLayer->AddChain(chain, true, color); } } @@ -143,7 +143,7 @@ AddShortestArc(chain, side1End_, center_, side2End_, controller->GetAngleToolArcRadiusS()); - polylineLayer->AddChain(chain, false); + polylineLayer->AddChain(chain, false, color); } } {