847380b1db
- aggiunta interfaccia per funzione EgtExtractSurfBezierLoops - riordinate funzioni per GdbGet - in Release cambiate opzioni di ottimizzazione da /Ox a /O2.
87 lines
2.5 KiB
C++
87 lines
2.5 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2020-2020
|
|
//----------------------------------------------------------------------------
|
|
// File : API_GdbGet.cpp Data : 30.03.20 Versione : 2.2c3
|
|
// Contenuto : Funzioni di interrogazione geometrie varie per API.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 30.03.20 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
//--------------------------- Include ----------------------------------------
|
|
#include "stdafx.h"
|
|
#include "API.h"
|
|
#include "/EgtDev/Include/EInAPI.h"
|
|
#include "/EgtDev/Include/EXeExecutor.h"
|
|
#include "/EgtDev/Include/EgtStringConverter.h"
|
|
#include <string>
|
|
|
|
using namespace std ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTextNormVersor( int nId, int nRefId, double vtNorm[3])
|
|
{
|
|
// verifica parametro di ritorno
|
|
if ( vtNorm == nullptr)
|
|
return FALSE ;
|
|
// recupero il vettore normale
|
|
Vector3d vtTmp ;
|
|
if ( ! ExeTextNormVersor( nId, nRefId, vtTmp))
|
|
return FALSE ;
|
|
// lo assegno
|
|
VEC_FROM_3D( vtNorm, vtTmp)
|
|
return TRUE ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTextGetContent( int nId, wchar_t*& wsText)
|
|
{
|
|
if ( &wsText == nullptr)
|
|
return FALSE ;
|
|
string sText ;
|
|
if ( ! ExeTextGetContent( nId, sText))
|
|
return FALSE ;
|
|
wsText = _wcsdup( stringtoW( sText)) ;
|
|
return (( wsText == nullptr) ? FALSE : TRUE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTextGetFont( int nId, wchar_t*& wsFont)
|
|
{
|
|
if ( &wsFont == nullptr)
|
|
return FALSE ;
|
|
string sFont ;
|
|
if ( ! ExeTextGetFont( nId, sFont))
|
|
return FALSE ;
|
|
wsFont = _wcsdup( stringtoW( sFont)) ;
|
|
return (( wsFont == nullptr) ? FALSE : TRUE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTextGetHeight( int nId, double* pdH)
|
|
{
|
|
if ( pdH == nullptr)
|
|
return FALSE ;
|
|
return ( ExeTextGetHeight( nId, *pdH) ? TRUE : FALSE) ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
BOOL
|
|
__stdcall EgtTextGetItalic( int nId, BOOL* pbItl)
|
|
{
|
|
if ( pbItl == nullptr)
|
|
return FALSE ;
|
|
bool bItl ;
|
|
if ( ! ExeTextGetItalic( nId, bItl))
|
|
return FALSE ;
|
|
*pbItl = ( bItl ? TRUE : FALSE) ;
|
|
return TRUE ;
|
|
}
|