41a38fef3b
- aggiunta entità testo (con font Nfe e di sistema) - in tutte le rotate ora l'angolo è in gradi - aggiunta trasformazione Shear (scorrimento) - aggiunta trsformazione LocToLoc - Set/GetInfo specializzate per i diversi tipi di informazioni - Copy e Relocate con possibilità di indicare l'entità di riferimento rispetto a cui inserire - aggiunte trasformazioni a PolyLine.
98 lines
2.9 KiB
C++
98 lines
2.9 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2013
|
|
//----------------------------------------------------------------------------
|
|
// File : EGkDllMain.cpp Data : 20.11.13 Versione : 1.3a1
|
|
// Contenuto : Inizializzazione della DLL.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 16.11.13 DS Creazione modulo.
|
|
// 21.11.13 DS Agg. GetEGkVersion.
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
//--------------------------- Include ----------------------------------------
|
|
#include "stdafx.h"
|
|
#include "DllMain.h"
|
|
#include "FontManager.h"
|
|
#include "\EgtDev\Include\EGkDllMain.h"
|
|
#include "\EgtDev\Include\EgnGetModuleVer.h"
|
|
#include "\EgtDev\Include\EgtTrace.h"
|
|
|
|
//--------------------------- Costanti ----------------------------------------
|
|
#if defined( _WIN64)
|
|
#if defined( _DEBUG)
|
|
const char* EGK_STR = "EgtGeomKernelD64.dll ver. " ;
|
|
#else
|
|
const char* EGK_STR = "EgtGeomKernelR64.dll ver. " ;
|
|
#endif
|
|
#elif defined( _WIN32)
|
|
#if defined( _DEBUG)
|
|
const char* EGK_STR = "EgtGeomKernelD32.dll ver. " ;
|
|
#else
|
|
const char* EGK_STR = "EgtGeomKernelR32.dll ver. " ;
|
|
#endif
|
|
#endif
|
|
const int STR_DIM = 40 ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
static HINSTANCE s_hModule = NULL ;
|
|
static char s_szEGkNameVer[STR_DIM] ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
extern "C" int APIENTRY
|
|
DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
|
|
{
|
|
|
|
if ( dwReason == DLL_PROCESS_ATTACH) {
|
|
s_hModule = hModule ;
|
|
EGT_TRACE( "EgtGeomKernel.dll Initializing!\n") ;
|
|
}
|
|
else if ( dwReason == DLL_PROCESS_DETACH) {
|
|
s_hModule = NULL ;
|
|
EGT_TRACE( "EgtGeomKernel.dll Terminating!\n") ;
|
|
}
|
|
|
|
return 1 ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
const char*
|
|
GetEGkVersion( void)
|
|
{
|
|
std::string sVer ;
|
|
|
|
GetModuleVersion( s_hModule, sVer) ;
|
|
sprintf_s( s_szEGkNameVer, STR_DIM, "%s%s", EGK_STR, sVer.c_str()) ;
|
|
|
|
return s_szEGkNameVer ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
static ILogger* s_pLogger = nullptr ;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void
|
|
SetEGkLogger( ILogger* pLogger)
|
|
{
|
|
s_pLogger = pLogger ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
ILogger*
|
|
GetEGkLogger( void)
|
|
{
|
|
return s_pLogger ;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void
|
|
InitFontManager( const std::string& sNfeFontDir, const std::string& sDefaultFont)
|
|
{
|
|
// recupero il font manager
|
|
FontManager& fntMgr = FontManager::GetFontManager() ;
|
|
|
|
// lo inizializzo
|
|
fntMgr.Init( sNfeFontDir, sDefaultFont) ;
|
|
}
|