EgtInterface 1.5j6 :
- aggiunte numerose funzionalità in API.
This commit is contained in:
+28
-29
@@ -209,52 +209,51 @@ __stdcall EgtGetCalcMark( int nId, BOOL* pbMark)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtStdColor( const wchar_t* wsName, int& nRed, int& nGreen, int& nBlue, int& nAlpha)
|
||||
__stdcall EgtStdColor( const wchar_t* wsName, int StdCol[4])
|
||||
{
|
||||
return EgtStdColor( wstrztoA( wsName), nRed, nGreen, nBlue, nAlpha) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtStdColor( const string& sName, int& nRed, int& nGreen, int& nBlue, int& nAlpha)
|
||||
{
|
||||
// recupero il colore standard
|
||||
Color cCol ;
|
||||
if ( GetStdColor( sName, cCol)) {
|
||||
nRed = cCol.GetIntRed() ;
|
||||
nGreen = cCol.GetIntGreen() ;
|
||||
nBlue = cCol.GetIntBlue() ;
|
||||
nAlpha = cCol.GetIntAlpha() ;
|
||||
Color ColStd ;
|
||||
if ( EgtStdColor( wstrztoA( wsName), ColStd) != FALSE) {
|
||||
StdCol[0] = ColStd.GetIntRed() ;
|
||||
StdCol[1] = ColStd.GetIntGreen() ;
|
||||
StdCol[2] = ColStd.GetIntBlue() ;
|
||||
StdCol[3] = ColStd.GetIntAlpha() ;
|
||||
return TRUE ;
|
||||
}
|
||||
else
|
||||
return FALSE ;
|
||||
return FALSE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetColor( int nId, int nRed, int nGreen, int nBlue, int nAlpha)
|
||||
__stdcall EgtStdColor( const string& sName, Color& StdCol)
|
||||
{
|
||||
// recupero il colore standard
|
||||
return ( GetStdColor( sName, StdCol) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSetColor( int nId, const int ObjCol[4])
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// assegno il colore
|
||||
Color cCol( nRed, nGreen, nBlue, nAlpha) ;
|
||||
Color cCol( ObjCol) ;
|
||||
return ( pGeomDB->SetMaterial( nId, cCol) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetColor( int nId, int& nRed, int& nGreen, int& nBlue, int& nAlpha)
|
||||
__stdcall EgtGetColor( int nId, int ObjCol[4])
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// recupero il colore
|
||||
Color cCol ;
|
||||
if ( pGeomDB->GetMaterial( nId, cCol)) {
|
||||
nRed = cCol.GetIntRed() ;
|
||||
nGreen = cCol.GetIntGreen() ;
|
||||
nBlue = cCol.GetIntBlue() ;
|
||||
nAlpha = cCol.GetIntAlpha() ;
|
||||
ObjCol[0] = cCol.GetIntRed() ;
|
||||
ObjCol[1] = cCol.GetIntGreen() ;
|
||||
ObjCol[2] = cCol.GetIntBlue() ;
|
||||
ObjCol[3] = cCol.GetIntAlpha() ;
|
||||
return TRUE ;
|
||||
}
|
||||
else
|
||||
@@ -263,17 +262,17 @@ __stdcall EgtGetColor( int nId, int& nRed, int& nGreen, int& nBlue, int& nAlpha)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCalcColor( int nId, int& nRed, int& nGreen, int& nBlue, int& nAlpha)
|
||||
__stdcall EgtGetCalcColor( int nId, int ObjCol[4])
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// recupero il colore
|
||||
Color cCol ;
|
||||
if ( pGeomDB->GetCalcMaterial( nId, cCol)) {
|
||||
nRed = cCol.GetIntRed() ;
|
||||
nGreen = cCol.GetIntGreen() ;
|
||||
nBlue = cCol.GetIntBlue() ;
|
||||
nAlpha = cCol.GetIntAlpha() ;
|
||||
ObjCol[0] = cCol.GetIntRed() ;
|
||||
ObjCol[1] = cCol.GetIntGreen() ;
|
||||
ObjCol[2] = cCol.GetIntBlue() ;
|
||||
ObjCol[3] = cCol.GetIntAlpha() ;
|
||||
return TRUE ;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user