EgtGeomKernel :
- aggiunta gestione Stipple di curve.
This commit is contained in:
+46
-1
@@ -2990,6 +2990,51 @@ GeomDB::CopyAllInfoFrom( int nId, int nSouId)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Stipple (significativo solo per curve)
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GeomDB::DumpStipple( int nId, string& sOut, bool bMM, const char* szNewLine) const
|
||||
{
|
||||
// recupero l'oggetto
|
||||
const GdbObj* pGdbObj = GetGdbObj( nId) ;
|
||||
if ( pGdbObj == nullptr)
|
||||
return false ;
|
||||
// eseguo il dump
|
||||
if ( pGdbObj->m_nStpFactor != 0) {
|
||||
// nome della texture
|
||||
sOut += "Stipple=" ;
|
||||
sOut += ToString( pGdbObj->m_nStpFactor) ;
|
||||
sOut += "-" + ToString( pGdbObj->m_nStpPattern, 1, 16) ;
|
||||
sOut += szNewLine ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GeomDB::SetStipple( int nId, int nFactor, int nPattern)
|
||||
{
|
||||
// recupero l'oggetto
|
||||
GdbObj* pGdbObj = GetGdbObj( nId) ;
|
||||
if ( pGdbObj == nullptr)
|
||||
return false ;
|
||||
// imposto lo stipple
|
||||
return pGdbObj->SetStipple( nFactor, nPattern) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GeomDB::GetStipple( int nId, int& nFactor, int& nPattern) const
|
||||
{
|
||||
// recupero l'oggetto
|
||||
const GdbObj* pGdbObj = GetGdbObj( nId) ;
|
||||
if ( pGdbObj == nullptr)
|
||||
return false ;
|
||||
// recupero lo stipple
|
||||
return pGdbObj->GetStipple( nFactor, nPattern) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// TextureData
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -3001,7 +3046,7 @@ GeomDB::DumpTextureData( int nId, string& sOut, bool bMM, const char* szNewLine)
|
||||
if ( pGdbObj == nullptr)
|
||||
return false ;
|
||||
// eseguo il dump
|
||||
if ( pGdbObj->m_pTxrData != nullptr)
|
||||
if ( pGdbObj->m_pTxrData != nullptr)
|
||||
return pGdbObj->m_pTxrData->Dump( *this, sOut, bMM, szNewLine) ;
|
||||
else
|
||||
return true ;
|
||||
|
||||
Reference in New Issue
Block a user