-// Copyright (C) 2005-2008 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.
+// 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, 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
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// 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
+// 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
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// LIGHT : sample (no-corba-engine) SALOME module
// File : LIGHTGUI_TextPrs.cxx
// Author : Natalia DONIS
#include <SelectMgr_EntityOwner.hxx>
#include <Select3D_SensitivePoint.hxx>
+#include <Basics_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE > 0x060505
+#include <Graphic3d_ArrayOfPoints.hxx>
+#endif
+
/*!
\class LIGHTGUI_TextPrs
\brief Presentation object for the string line.
const Standard_Integer /*mode*/ )
{
Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( thePrs );
+#if OCC_VERSION_LARGE <= 0x060504
aGroup->BeginPrimitives();
+#endif
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
aGroup->EndPrimitives();
+#endif
}
/*!