EgtInterface :

- aggiunte EgtChangeTextHeight, EgtChangeTextItalic, EgtTextGetHeight e EgtTextGetItalic
- corrette EgtShowOnlyTable e EgtSurfTmFacetsContact per parametri BOOL e non bool.
This commit is contained in:
Dario Sassi
2019-08-02 17:35:40 +00:00
parent 59f89ebb8a
commit 413d919be3
3 changed files with 43 additions and 4 deletions
+14
View File
@@ -66,6 +66,20 @@ __stdcall EgtChangeTextFont( int nId, const wchar_t* wsNewFont)
return ( ExeChangeTextFont( nId, wstrztoA( wsNewFont)) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtChangeTextHeight( int nId, double dH)
{
return ( ExeChangeTextHeight( nId, dH) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtChangeTextItalic( int nId, BOOL bItl)
{
return ( ExeChangeTextItalic( nId, ( bItl != FALSE)) ? TRUE : FALSE) ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtFlipText( int nId)
+27 -2
View File
@@ -540,16 +540,19 @@ __stdcall EgtSurfTmFacetAdjacencies( int nId, int nFacet, int*& vAdj, int* pnCou
//----------------------------------------------------------------------------
BOOL
__stdcall EgtSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId, bool* pbAdjac, double ptP1[3], double ptP2[3], double* pdAng)
__stdcall EgtSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId,
BOOL* pbAdjac, double ptP1[3], double ptP2[3], double* pdAng)
{
// verifica parametri di ritorno
if ( pbAdjac == nullptr || ptP1 == nullptr || ptP2 == nullptr || pdAng == nullptr)
return FALSE ;
// eseguo
bool bAdjac ;
Point3d ptMyP1, ptMyP2 ;
if ( ! ExeSurfTmFacetsContact( nId, nF1, nF2, nRefId, *pbAdjac, ptMyP1, ptMyP2, *pdAng))
if ( ! ExeSurfTmFacetsContact( nId, nF1, nF2, nRefId, bAdjac, ptMyP1, ptMyP2, *pdAng))
return FALSE ;
// assegno risultati
*pbAdjac = ( bAdjac ? TRUE : FALSE) ;
VEC_FROM_3D( ptP1, ptMyP1)
VEC_FROM_3D( ptP2, ptMyP2)
return TRUE ;
@@ -597,6 +600,28 @@ __stdcall EgtTextGetFont( int nId, wchar_t*& wsFont)
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 ;
}
//-------------------------------------------------------------------------------
BOOL
__stdcall EgtPointToIdGlob( double ptP[3], int nId)
+2 -2
View File
@@ -522,9 +522,9 @@ __stdcall EgtGetTableAreaOffset( int nInd, double ptMinOffs[3], double ptMaxOffs
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtShowOnlyTable( bool bVal)
__stdcall EgtShowOnlyTable( BOOL bVal)
{
return ( ExeShowOnlyTable( bVal) ? TRUE : FALSE) ;
return ( ExeShowOnlyTable( ( bVal != FALSE)) ? TRUE : FALSE) ;
}
//-----------------------------------------------------------------------------