setWire( aPolylineWire, false, false );
} else {
myTopoShape = aPolylineShape;
- myDisplayMode = AIS_WireFrame;
+ // Set shading mode to avoid that hilight presentation is equal to "normal" object presentation.
+ // Note that hilight presentation is always to be on top ( i.e. in the top Z layer ).
+ myDisplayMode = AIS_Shaded;
buildShape();
updateShape( false, false );
setWire( aPolylineWire, false, false );
} else {
myTopoShape = aPolylineShape;
- myDisplayMode = AIS_WireFrame;
+ // Set shading mode to avoid that hilight presentation is equal to "normal" object presentation.
+ // Note that hilight presentation is always to be on top ( i.e. in the top Z layer ).
+ myDisplayMode = AIS_Shaded;
buildShape();
updateShape( false, false );
gp_Pnt aPnt3( aRect.bottomRight().x(), aRect.bottomRight().y(), 0 );
gp_Pnt aPnt4( aRect.bottomLeft().x(), aRect.bottomLeft().y(), 0 );
+ Handle_HYDROData_Document aDoc = HYDROData_Document::Document( anImageObj->Label() );
+ aDoc->Transform( aPnt1, true );
+ aDoc->Transform( aPnt2, true );
+ aDoc->Transform( aPnt3, true );
+ aDoc->Transform( aPnt4, true );
+
TopoDS_Edge anEdge1 = BRepBuilderAPI_MakeEdge( aPnt1, aPnt2 ).Edge();
TopoDS_Edge anEdge2 = BRepBuilderAPI_MakeEdge( aPnt2, aPnt3 ).Edge();
TopoDS_Edge anEdge3 = BRepBuilderAPI_MakeEdge( aPnt3, aPnt4 ).Edge();
const bool theIsUpdateViewer )
{
myTopoShape = theWire;
- myDisplayMode = AIS_WireFrame;
+ // To avoid that hilight presentation is equal to "normal" object presentation.
+ // Note that hilight presentation is always to be on top ( i.e. in the top Z layer ).
+ myDisplayMode = AIS_Shaded;
buildShape();
updateShape( theToDisplay, theIsUpdateViewer );
getQuantityColorVal( theColor.green() ),
getQuantityColorVal( theColor.blue() ),
Quantity_TOC_RGB );
- if ( myDisplayMode == AIS_Shaded )
+
+
+ if ( myTopoShape.ShapeType() == TopAbs_WIRE ) // Note that we display polylines in shaded mode
+ {
+ myShape->SetColor( aBorderColor );
+ } else if ( myDisplayMode == AIS_Shaded )
{
if ( theColor.alpha() == 0 )
{
aBoundaryAspect->SetColor( aBorderColor );
anAttributes->SetFaceBoundaryAspect( aBoundaryAspect );
}
+ Handle(Prs3d_LineAspect) aWireAspect = anAttributes->WireAspect();
+ if ( !aWireAspect.IsNull() )
+ {
+ aWireAspect->SetColor( aBorderColor );
+ anAttributes->SetWireAspect( aWireAspect );
+ }
}
}
else if ( myDisplayMode == AIS_WireFrame )