Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into CEA_2019
[modules/shaper.git] / src / SketcherPrs / SketcherPrs_Coincident.cpp
index c123960a59a9cc91c36655a5f4ef54ffb485fe61..d6029af489621f5d48a1b0785dd47bce43dd7db6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #include "SketcherPrs_Coincident.h"
@@ -141,12 +140,14 @@ void SketcherPrs_Coincident::Compute(
   Quantity_Color aExternalColor = aIsEdge ? Quantity_NOC_BLACK : Quantity_NOC_YELLOW;
   Quantity_Color aInternalColor = aIsEdge ? Quantity_NOC_YELLOW : Quantity_NOC_BLACK;
 
+  int aRatio = SketcherPrs_Tools::pixelRatio();
+
   // Create the presentation as a combination of standard point markers
   bool aCustomColor = myIsCustomColor;
   // The external yellow contour
   Handle(Graphic3d_AspectMarker3d) aPtA = new Graphic3d_AspectMarker3d();
   aPtA->SetType(Aspect_TOM_RING3);
-  aPtA->SetScale(2.);
+  aPtA->SetScale(2. * aRatio);
   aPtA->SetColor(!aCustomColor ? aExternalColor : myCustomColor);
 
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup(thePresentation);
@@ -158,7 +159,7 @@ void SketcherPrs_Coincident::Compute(
   // Make a black mid ring
   aPtA = new Graphic3d_AspectMarker3d();
   aPtA->SetType(aIsEdge ? Aspect_TOM_STAR : Aspect_TOM_RING1);
-  aPtA->SetScale(1.);
+  aPtA->SetScale(1. * aRatio);
   aPtA->SetColor(!aCustomColor ? aInternalColor : myCustomColor);
   aGroup->SetPrimitivesAspect(aPtA);
   aGroup->AddPrimitiveArray (aPntArray);
@@ -166,7 +167,7 @@ void SketcherPrs_Coincident::Compute(
   // Make an internal ring
   aPtA = new Graphic3d_AspectMarker3d();
   aPtA->SetType(Aspect_TOM_POINT);
-  aPtA->SetScale(5.);
+  aPtA->SetScale(5. * aRatio);
   aPtA->SetColor(!aCustomColor ? aInternalColor : myCustomColor);
   aGroup->SetPrimitivesAspect(aPtA);
   aGroup->AddPrimitiveArray (aPntArray);