Salome HOME
Update translation files from Crowdin
[samples/light.git] / src / LIGHTGUI / LIGHTGUI_TextPrs.cxx
index 669fb29a61b9f51baa64f38d252965f7af061135..444e823a75ef73014de0b84915631260570b73d9 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2005-2012  OPEN CASCADE
+// Copyright (C) 2005-2014  OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 #include <Basics_OCCTVersion.hxx>
 
+#if OCC_VERSION_LARGE > 0x060505
+#include <Graphic3d_ArrayOfPoints.hxx>
+#endif
+
 /*!
   \class LIGHTGUI_TextPrs
   \brief Presentation object for the string line.
@@ -87,7 +91,13 @@ void LIGHTGUI_TextPrs::Compute( const Handle(PrsMgr_PresentationManager3d)& /*pr
   Graphic3d_Vertex aTextPos;
   //  aTextPos.SetCoord( myPos.X(), aPos.Y(), aPos.Z() );
   aTextPos.SetCoord( myPos.X(), myPos.Y(), myPos.Z() );
+#if OCC_VERSION_LARGE <= 0x060505
   aGroup->Marker( aTextPos );
+#else
+  Handle(Graphic3d_ArrayOfPoints) anArrayOfPoints = new Graphic3d_ArrayOfPoints (1);
+  anArrayOfPoints->AddVertex(myPos.X(), myPos.Y(), myPos.Z());
+  aGroup->AddPrimitiveArray(anArrayOfPoints);
+#endif
   //  aGroup->Text( aNodeIter.Value().ToCString(), aTextPos, aCharSize );
   aGroup->Text( myString, aTextPos, aCharSize );
 #if OCC_VERSION_LARGE <= 0x060504