void moFont::Draw( MOfloat x, MOfloat y, moText& text, moFontSize p_fontsize, MOint set, MOfloat sx, MOfloat sy, MOfloat rt ) { FTFont* FF = (FTFont*) m_pFace; if (FF) { SetSize(p_fontsize); FF->Render( text, text.Length(), FTPoint(x,y) ); } else { if (m_FontGLId>=0) { this->glPrint( (int)x, (int)y, text, set, sx, sy, rt ); } } }
MOint moMathManager::AddFunction(const moText& p_expr, MOboolean p_force_new, moMoldeoObject* p_pMOB ) { MOint idx = -1; if ( p_expr.Length() == 0 ) return idx; if (!p_force_new) { idx = GetFunctionIdx(p_expr); if (-1 < idx) return idx; // La función ya existe. } moMathFunction* p_math_fun; moParserFunction* p_parser_fun; // Función de parseado. p_math_fun = BuiltInMathFunctionFactory(p_expr); if (p_math_fun == NULL) { p_parser_fun = new moParserFunction(); p_math_fun = (moMathFunction*)p_parser_fun; } if (p_math_fun != NULL) { bool res = p_math_fun->Init( p_expr, p_pMOB ); if (res) { m_functions.Add(p_math_fun); //double check = p_math_fun->Eval(0); return m_functions.Count() - 1; } else { delete p_math_fun; return -1; } } else return -1; }
int moDataManager::ReloadPluginDefinitions( moText plugindir, moMoldeoObjectType mobjecttype ) { moDirectory DirEffects; bool bDebug = true; moText PluginName; moText pluginfullpath = m_pDataSessionConfig->GetPluginsPath(); if (plugindir.Length()==0 && mobjecttype==MO_OBJECT_UNDEFINED) { ReloadPluginDefinitions( pluginfullpath + moSlash + "preeffects", MO_OBJECT_PREEFFECT ); ReloadPluginDefinitions( pluginfullpath + moSlash + "effects", MO_OBJECT_EFFECT ); ReloadPluginDefinitions( pluginfullpath + moSlash + "posteffects", MO_OBJECT_POSTEFFECT ); ReloadPluginDefinitions( pluginfullpath + moSlash + "mastereffects", MO_OBJECT_MASTEREFFECT ); ReloadPluginDefinitions( pluginfullpath + moSlash + "resources", MO_OBJECT_RESOURCE ); ReloadPluginDefinitions( pluginfullpath + moSlash + "iodevices", MO_OBJECT_IODEVICE ); return 0; } if (plugindir.Length()==0 && mobjecttype!=MO_OBJECT_UNDEFINED) { switch(mobjecttype) { case MO_OBJECT_PREEFFECT: ReloadPluginDefinitions( pluginfullpath + moSlash + "preeffects", MO_OBJECT_PREEFFECT ); break; case MO_OBJECT_EFFECT: ReloadPluginDefinitions( pluginfullpath + moSlash + "effects", MO_OBJECT_EFFECT ); break; case MO_OBJECT_POSTEFFECT: ReloadPluginDefinitions( pluginfullpath + moSlash + "posteffects", MO_OBJECT_POSTEFFECT ); break; case MO_OBJECT_MASTEREFFECT: ReloadPluginDefinitions( pluginfullpath + moSlash + "mastereffects", MO_OBJECT_MASTEREFFECT ); break; case MO_OBJECT_IODEVICE: ReloadPluginDefinitions( pluginfullpath + moSlash + "resources", MO_OBJECT_RESOURCE ); break; case MO_OBJECT_RESOURCE: ReloadPluginDefinitions( pluginfullpath + moSlash + "iodevices", MO_OBJECT_IODEVICE ); break; default: break; } return 0; } /// Open DIRECTORY [plugindir] and search for module libraries (plugins) /// #ifdef MO_WIN32 DirEffects.Open( plugindir, moText("/*.dll") ); #else DirEffects.Open( plugindir, moText("/*.so") ); #endif // MO_LINUX if (DirEffects.Exists()) { moFile* pFile = NULL; moText FileNameEnd; pFile = DirEffects.FindFirst(); if (pFile!=NULL) MODebug2->Message( moText("File founded") ); while(pFile!=NULL) { FileNameEnd = pFile->GetFileName(); PluginName = pFile->GetFileName(); FileNameEnd.Right(2); bDebug = ( FileNameEnd==moText("_d") ); if (bDebug) PluginName.Left( PluginName.Length() - 3 ); ///LINUX VERSION if (!bDebug) { if (pFile->GetExtension()==moText(".so")) { #ifndef MO_WIN32 ///extract the "libmoldeo_" part PluginName.Right( PluginName.Length() - 10 ); m_PluginDefinitions.Add( moPluginDefinition( PluginName, pFile->GetCompletePath(), mobjecttype ) ); MODebug2->Message( pFile->GetFileName() ); #endif } else if (pFile->GetExtension()==moText(".dll")) { #ifdef MO_WIN32 m_PluginDefinitions.Add( moPluginDefinition( PluginName, pFile->GetCompletePath(), mobjecttype ) ); MODebug2->Message( pFile->GetFileName() ); #endif } } pFile = DirEffects.FindNext(); } } else MODebug2->Error( moText("Directory doesn't exists:")+(moText)plugindir ); return 0; }