Files
EgtExecutor/EXE_GdbGet.cpp
Dario Sassi 98e88db863 EgtExecutor 2.2c3 :
- aggiustamenti per cambio nome costante Curva di Bezier
- aggiunte funzioni Exe e Lua per superfici di Bezier.
2020-03-26 11:55:40 +00:00

101 lines
3.0 KiB
C++

//----------------------------------------------------------------------------
// 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 ;
}