- anAttributes->SetFaceBoundaryDraw( true );
-
- Handle(Prs3d_LineAspect) aBoundaryAspect = anAttributes->FaceBoundaryAspect();
- if ( !aBoundaryAspect.IsNull() )
- aBoundaryAspect->SetColor( aBorderColor );
- }
- }
- else if ( myDisplayMode == AIS_WireFrame )
- {
- myShape->SetColor( aBorderColor );
- }
-}
-
-QString HYDROGUI_Shape::generateTextureFileName( const Handle(HYDROData_Entity)& theImageObj )
-{
- QString aResult;
- if( !theImageObj.IsNull() )
- {
- QString aTempDir = HYDROGUI_Tool::GetTempDir( true );
-
- int aStudyId = HYDROGUI_Tool::GetActiveStudyId();
- QString aPrefix = QString( "image_%1" ).arg( aStudyId );
-
- QString anEntry = HYDROGUI_DataObject::dataObjectEntry( theImageObj, false );
- anEntry.replace( ':', '_' );
-
- QString anExtension = "bmp";
-
- aResult = QString( "%1/%2_%3.%4" ).arg( aTempDir, aPrefix, anEntry, anExtension );
- }
- return aResult;
-}
-
-void HYDROGUI_Shape::removeTextureFile() const
-{
- QFile aFile( getTextureFileName() );
- if( aFile.exists() )
- aFile.remove();
-}
-
-QImage HYDROGUI_Shape::reduceTexture( const QImage& theImage, const int theSizeLimit )
-{
- double aSizeLimit = (double)theSizeLimit;
- double aWidth = (double)theImage.width();
- double aHeight = (double)theImage.height();
- if( aWidth > aSizeLimit || aHeight > aSizeLimit )
- {
- if( aWidth > aHeight )
- {
- aHeight /= ( aWidth / aSizeLimit );
- aWidth = aSizeLimit;
+ if ( theColor.alpha() == 0 )
+ {
+ anAttributes->SetFaceBoundaryDraw( false );
+ }
+ else
+ {
+ anAttributes->SetFaceBoundaryDraw( true );
+
+ Handle(Prs3d_LineAspect) aBoundaryAspect = anAttributes->FaceBoundaryAspect();
+ if ( !aBoundaryAspect.IsNull() )
+ {
+ aBoundaryAspect->SetColor( aBorderColor );
+ anAttributes->SetFaceBoundaryAspect( aBoundaryAspect );
+ }
+ Handle(Prs3d_LineAspect) aWireAspect = anAttributes->WireAspect();
+ if ( !aWireAspect.IsNull() )
+ {
+ aWireAspect->SetColor( aBorderColor );
+ anAttributes->SetWireAspect( aWireAspect );
+ }
+ }