//---------------------------------------------------------------------------- // EgalTech 2020-2020 //---------------------------------------------------------------------------- // File : EXE_GdbGet.cpp Data : 23.03.20 Versione : 2.2c3 // Contenuto : Funzioni di interrogazione di entità del DBG per EXE. // // // // Modifiche : 23.03.20 DS Creazione modulo. // // //---------------------------------------------------------------------------- //--------------------------- Include ---------------------------------------- #include "stdafx.h" #include "EXE.h" #include "EXE_Const.h" #include "EXE_Macro.h" #include "GeoTools.h" #include "/EgtDev/Include/EXeExecutor.h" #include "/EgtDev/Include/EXeConst.h" #include "/EgtDev/Include/EGkExtText.h" using namespace std ; //---------------------------------------------------------------------------- bool ExeTextNormVersor( int nId, int nRefId, Vector3d& vtNorm) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) // recupero il testo const IExtText* pTxt = GetExtText( pGeomDB->GetGeoObj( nId)) ; if ( pTxt == nullptr) return false ; // recupero la normale vtNorm = pTxt->GetNormVersor() ; // gestione trasformazione ( eventuale) return TransformVector( pGeomDB, nId, nRefId, vtNorm) ; } //---------------------------------------------------------------------------- bool ExeTextGetContent( int nId, string& sText) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) // recupero il testo const IExtText* pTxt = GetExtText( pGeomDB->GetGeoObj( nId)) ; if ( pTxt == nullptr) return false ; // recupero il contenuto sText = pTxt->GetText() ; return true ; } //---------------------------------------------------------------------------- bool ExeTextGetFont( int nId, string& sFont) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) // recupero il testo const IExtText* pTxt = GetExtText( pGeomDB->GetGeoObj( nId)) ; if ( pTxt == nullptr) return false ; // recupero il font sFont = pTxt->GetFont() ; return true ; } //---------------------------------------------------------------------------- bool ExeTextGetHeight( int nId, double& dH) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) // recupero il testo const IExtText* pTxt = GetExtText( pGeomDB->GetGeoObj( nId)) ; if ( pTxt == nullptr) return false ; // recupero l'altezza dH = pTxt->GetHeight() ; return true ; } //---------------------------------------------------------------------------- bool ExeTextGetItalic( int nId, bool& bItl) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) // recupero il testo const IExtText* pTxt = GetExtText( pGeomDB->GetGeoObj( nId)) ; if ( pTxt == nullptr) return false ; // recupero l'altezza bItl = pTxt->GetItalic() ; return true ; }