0024624: Lost word in license statement in source files
[occt.git] / src / AIS / AIS_Line.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 0023b2c..6f9937c
@@ -1,18 +1,26 @@
-// File:       AIS_Line.cxx
-// Created:    Tue Jan 21 11:45:01 1997
-// Author:     Prestataire Christiane ARMAND
-//             <car@chamalox.paris1.matra-dtv.fr>
-// Copyright:   Matra Datavision 1997
-
-#define GER61351       //GG_171199     Enable to set an object RGB color
-//                                               instead a restricted object NameOfColor.
+// Created on: 1997-01-21
+// Created by: Prestataire Christiane ARMAND
+// Copyright (c) 1997-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+//GER61351     //GG_171199     Enable to set an object RGB color instead a restricted object NameOfColor.
 
 #include <AIS_Line.ixx>
 #include <Aspect_TypeOfLine.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <Precision.hxx>
 #include <Prs3d_LineAspect.hxx>
-#include <Graphic3d_ArrayOfPrimitives.hxx>
 #include <Graphic3d_AspectLine3d.hxx>
 #include <Graphic3d_Structure.hxx>
 #include <TColgp_Array1OfPnt.hxx>
@@ -142,13 +150,11 @@ void AIS_Line::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
 //=======================================================================
 
 void AIS_Line::SetColor(const Quantity_NameOfColor aCol)
-#ifdef GER61351
 {
   SetColor(Quantity_Color(aCol));
 }
 
 void AIS_Line::SetColor(const Quantity_Color &aCol)
-#endif
 {
   hasOwnColor=Standard_True;
   myOwnColor=aCol;
@@ -175,15 +181,9 @@ void AIS_Line::UnsetColor()
 
   if (!HasWidth()) myDrawer->SetLineAspect(NullAsp);
   else{
-#ifdef GER61351
     Quantity_Color CC;
     if( HasColor() ) CC = myOwnColor;
     else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
-#else
-    Quantity_NameOfColor CC =
-               AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
-#endif 
-
     myDrawer->LineAspect()->SetColor(CC);
     myOwnColor = CC;
  }
@@ -197,17 +197,10 @@ void AIS_Line::SetWidth(const Standard_Real aValue)
 {
   myOwnWidth=aValue;
 
-#ifndef GER61351
-  Quantity_NameOfColor CC =
-                HasColor()? myOwnColor : AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line);
-#endif
-
   if (!myDrawer->HasLineAspect ()) {
-#ifdef GER61351
     Quantity_Color CC;
     if( HasColor() ) CC = myOwnColor;
     else AIS_GraphicTool::GetLineColor(myDrawer->Link(),AIS_TOA_Line,CC);
-#endif
     myDrawer->SetLineAspect (new Prs3d_LineAspect(CC,Aspect_TOL_SOLID,aValue));
   } else
     myDrawer->LineAspect()->SetWidth(aValue);
@@ -236,16 +229,11 @@ void AIS_Line::UnsetWidth()
 //=======================================================================
 void AIS_Line::ComputeInfiniteLine( const Handle(Prs3d_Presentation)& aPresentation)
 {
-
   GeomAdaptor_Curve curv(myComponent);
-  Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
-  if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
   StdPrs_Curve::Add(aPresentation,curv,myDrawer);
-  if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
 
   //pas de prise en compte lors du FITALL
   aPresentation->SetInfiniteState (Standard_True);
-
 }
 
 //=======================================================================
@@ -254,7 +242,6 @@ void AIS_Line::ComputeInfiniteLine( const Handle(Prs3d_Presentation)& aPresentat
 //=======================================================================
 void AIS_Line::ComputeSegmentLine( const Handle(Prs3d_Presentation)& aPresentation)
 {
-
   gp_Pnt P1 = myStartPoint->Pnt();
   gp_Pnt P2 = myEndPoint->Pnt();
   
@@ -262,11 +249,7 @@ void AIS_Line::ComputeSegmentLine( const Handle(Prs3d_Presentation)& aPresentati
 
   Standard_Real dist = P1.Distance(P2);
   GeomAdaptor_Curve curv(myComponent,0.,dist);
-  Standard_Boolean isPrimitiveArraysEnabled = Graphic3d_ArrayOfPrimitives::IsEnable();
-  if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Disable();
   StdPrs_Curve::Add(aPresentation,curv,myDrawer);
-  if(isPrimitiveArraysEnabled) Graphic3d_ArrayOfPrimitives::Enable();
-
 }
 
 
@@ -310,15 +293,6 @@ void AIS_Line::ComputeSegmentLineSelection(const Handle(SelectMgr_Selection)& aS
                                                                        myEndPoint->Pnt());
   aSelection->Add(seg);
 }
-//=======================================================================
-//function : Compute
-//purpose  : to avoid warning
-//=======================================================================
-void AIS_Line::Compute(const Handle(PrsMgr_PresentationManager2d)&, 
-                         const Handle(Graphic2d_GraphicObject)&,
-                         const Standard_Integer)
-{
-}
 
 //=======================================================================
 //function : Compute