EgtGraphics 1.5b4 :

- aggiunta gestione dello sfondo anche sfumato
- adattamenti per modifiche a ICMdParser.
This commit is contained in:
Dario Sassi
2014-02-25 16:40:18 +00:00
parent 73ee89f9c5
commit cae2cf6ab0
8 changed files with 145 additions and 33 deletions
+19 -25
View File
@@ -42,13 +42,24 @@ SceExecutor::~SceExecutor( void)
//----------------------------------------------------------------------------
bool
SceExecutor::Init( IEGrScene* pScene)
SceExecutor::SetScene( IEGrScene* pScene)
{
m_pScene = pScene ;
return ( m_pScene != nullptr) ;
}
//----------------------------------------------------------------------------
bool
SceExecutor::SetCmdParser( ICmdParser* pParser)
{
// imposto eventuale parser dipendente
if ( m_pOtherExec != nullptr)
m_pOtherExec->SetCmdParser( pParser) ;
return true ;
}
//----------------------------------------------------------------------------
bool
SceExecutor::AddExecutor( ICmdExecutor* pOtherExec)
@@ -61,24 +72,7 @@ SceExecutor::AddExecutor( ICmdExecutor* pOtherExec)
bool
SceExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR& vsParams)
{
string sOut ;
STRVECTOR::const_iterator theConstIter ;
// output di debug
sOut = " " + sCmd1 ;
if ( ! sCmd2.empty())
sOut += "." + sCmd2 ;
sOut += "( " ;
for ( theConstIter = vsParams.begin() ; theConstIter != vsParams.end() ; ++theConstIter) {
if ( theConstIter != vsParams.begin())
sOut += ", " ;
sOut += *theConstIter ;
}
sOut += ")" ;
LOG_DBG_INFO( GetEGrLogger(), sOut.c_str())
// verifico validita Scene
// verifico validità Scene
if ( m_pScene == nullptr) {
LOG_ERROR( GetEGrLogger(), "Error : null Scene.")
return false ;
@@ -137,15 +131,15 @@ SceExecutor::ExecuteRedraw( const string& sCmd2, const STRVECTOR& vsParams)
bool
SceExecutor::ExecuteZoom( const string& sCmd2, const STRVECTOR& vsParams)
{
const double COEFF_PLUS = 0.9 ;
const double COEFF_MINUS = 1 / COEFF_PLUS ;
const double COEFF_IN = 0.9 ;
const double COEFF_OUT = 1 / COEFF_IN ;
if ( sCmd2 == "ALL")
m_pScene->ZoomAll() ;
else if ( sCmd2 == "PLUS")
m_pScene->ZoomChange( COEFF_PLUS) ;
else if ( sCmd2 == "MINUS")
m_pScene->ZoomChange( COEFF_MINUS) ;
else if ( sCmd2 == "IN")
m_pScene->ZoomChange( COEFF_IN) ;
else if ( sCmd2 == "OUT")
m_pScene->ZoomChange( COEFF_OUT) ;
else if ( sCmd2 == "CHANGE") {
// 1 parametro : fattore di zoom
if ( vsParams.size() != 1)