]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx
Changes in information presented in status bar, inside the box, and the editing dialo...
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsVtkGUIEditorGraphic / vtkGPortView.cxx
index 6633e1fe3bcff3c876dd21532838958ca049de83..a56cd3b7eae38be363a6681d9e6cc5de77409301 100644 (file)
@@ -68,7 +68,6 @@ namespace bbtk
                _pts->SetPoint(1, mid, yFin, zInic );
                _pts->SetPoint(2, xFin, yInic, zFin );
 
-               _borderObjectActor->Modified();
                _fillPolyMapper->Modified();
                
                setRefreshWaiting();
@@ -79,11 +78,6 @@ namespace bbtk
        void vtkGPortView::createVtkObjects() //virtual
        {
                _pts = vtkPoints::New();        
-               vtkCellArray *lines = vtkCellArray::New();
-               vtkPolyData *_pd = vtkPolyData::New();
-               _borderPolyMapper=vtkPolyDataMapper::New();
-               _borderObjectActor=vtkActor::New();
-               
                _pts->SetNumberOfPoints(3);
 
                double xInic, yInic,zInic,xFin, yFin,zFin;
@@ -97,22 +91,8 @@ namespace bbtk
 
                _pts->SetPoint(0, xInic, yInic, zInic );
                _pts->SetPoint(1, mid, yFin, zInic );
-               _pts->SetPoint(2, xFin, yInic, zFin );
-                               
-               lines->InsertNextCell(4);
-               lines->InsertCellPoint(0);
-               lines->InsertCellPoint(1);
-               lines->InsertCellPoint(2);
-               lines->InsertCellPoint(0);
+               _pts->SetPoint(2, xFin, yInic, zFin );                          
                        
-               _pd->SetPoints( _pts );
-               _pd->SetLines( lines );
-
-               _borderPolyMapper->SetInput(_pd);
-               _borderObjectActor->SetMapper(_borderPolyMapper);
-               _borderPolyMapper->Modified();
-
-               
                ///************************* FILL *************************
 
                vtkCellArray *strip = vtkCellArray::New();
@@ -145,29 +125,26 @@ namespace bbtk
 
        void vtkGPortView::updateColors()
        {
-               _borderObjectActor->GetProperty()->SetColor(BOXBORDER_NH_R,BOXBORDER_NH_G,BOXBORDER_NH_B);
-               _fillObjectActor->GetProperty()->SetColor(0.6,0.6,0.6);
+               _fillObjectActor->GetProperty()->SetColor(0.5,0.45,0.45);
 
                if(_state==HIGHLIGHTED)
                {
-                       _borderObjectActor->GetProperty()->SetColor(0.35,0.15,0.1);
                        _fillObjectActor->GetProperty()->SetColor(0.8,0.8,0.8);
                }
                else
                {
                        GPortModel* portm = (GPortModel*)_model;
-                       _borderObjectActor->GetProperty()->SetColor(0.15,0.15,0.15);
                        if(portm->isConnected())
                        {
-                               _fillObjectActor->GetProperty()->SetColor(0.2,0.2,0.2);
+                               _fillObjectActor->GetProperty()->SetColor(0.15,0.15,0.15);
                        }
                        else if(portm->isValueSet())
                        {
-                               _fillObjectActor->GetProperty()->SetColor(0.5,0.2,0.2);
+                               _fillObjectActor->GetProperty()->SetColor(0.55,0.25,0.25);
                        }
                        else 
                        {
-                               _fillObjectActor->GetProperty()->SetColor(0.6,0.6,0.6);
+                               _fillObjectActor->GetProperty()->SetColor(0.5,0.45,0.45);
                        }
                }
        }