2e4b67f9e9
- aggiunte GetNfeFontDir e GetDefaultFont - modifiche a Set di ExtText - migliorata gestione materiali - GeomDB::Load ora può funzionare aggiungendo a DB già carico per Insert.
60 lines
2.4 KiB
C++
60 lines
2.4 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : FontManager.h Data : 28.05.14 Versione : 1.5f1
|
|
// Contenuto : Dichiarazione della classe FontManager.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 28.05.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "FontNfe.h"
|
|
#include "FontOs.h"
|
|
#include "/EgtDev/Include/EGkBBox3d.h"
|
|
#include "/EgtDev/Include/EGkPolyLine.h"
|
|
#include <string>
|
|
|
|
//----------------------------------------------------------------------------
|
|
class FontManager
|
|
{
|
|
public :
|
|
bool Init( const std::string& sNfeFontDir, const std::string& sDefaultFont) ;
|
|
bool SetCurrFont( const std::string& sFont, int nWeight, bool bItalic,
|
|
double dHeight, double dRatio, double dAddAdvance) ;
|
|
const std::string& GetNfeFontDir( void)
|
|
{ return m_sNfeFontDir ; }
|
|
const std::string& GetDefaultFont( void)
|
|
{ return m_sDefaultFont ; }
|
|
bool GetCapHeight( double& dCapH) ;
|
|
bool GetAscent( double& dAsc) ;
|
|
bool GetDescent( double& dDesc) ;
|
|
bool GetCapBox( const std::string& sText, int nInsPos, BBox3d& b3Box) ;
|
|
bool GetBBox( const std::string& sText, int nInsPos, BBox3d& b3Box) ;
|
|
bool GetOutline( const std::string& sText, int nInsPos, ICURVEPLIST& lstPC) ;
|
|
bool ApproxWithLines( const std::string& sText, int nInsPos, double dLinTol, double dAngTolDeg, POLYLINELIST& lstPL) ;
|
|
bool ApproxWithArcs( const std::string& sText, int nInsPos, double dLinTol, double dAngTolDeg, POLYARCLIST& lstPA) ;
|
|
bool GetTextLines( const std::string& sText, int nInsPos, PNTVECTOR& vPt, STRVECTOR& vLine) ;
|
|
|
|
private :
|
|
std::string m_sNfeFontDir ;
|
|
std::string m_sDefaultFont ;
|
|
bool m_bCurrNfeFont ;
|
|
NfeFont m_NfeFont ;
|
|
OsFont m_OsFont ;
|
|
|
|
public :
|
|
static FontManager& GetFontManager( void)
|
|
{ static FontManager fntMgr ;
|
|
return fntMgr ; }
|
|
|
|
private :
|
|
FontManager( void) {}
|
|
FontManager( FontManager const& copy) ; // Not Implemented
|
|
FontManager& operator=( FontManager const& copy) ; // Not Implemented
|
|
} ;
|