EgtInterface 1.5k2 :
- aggiunta EgtCreateSurfTriMeshRuled - aggiunta EgtExplodeText - aggiunte EgtExtendCurve*ByLen e EgtExplodeCurveBezier - aggiunte EgtSelectAll, EgtSelectPartObjs, EgtDeselectPartObjs, EgtSelectLayerObjs, EgtDeselectLayerObjs, EgtGetLastSelectedObj, EgtGetPrevSelectedObj - aggiunte EgtIntersectionPoint, EgtPointToIdGlob.
This commit is contained in:
@@ -178,6 +178,35 @@ __stdcall EgtTextToOutline( int nId, int nDestGroupId)
|
||||
return ( bOk ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtExplodeText( int nId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, FALSE)
|
||||
// recupero il testo
|
||||
IExtText* pTXT = GetExtText( pGeomDB->GetGeoObj( nId)) ;
|
||||
if ( pTXT == nullptr)
|
||||
return FALSE ;
|
||||
// recupero l'outline del testo
|
||||
ICURVEPLIST lstPCRV ;
|
||||
pTXT->GetOutline( lstPCRV) ;
|
||||
// inserisco le curve nella stessa posizione del testo
|
||||
bool bOk = true ;
|
||||
ICURVEPLIST::iterator iIter ;
|
||||
for ( iIter = lstPCRV.begin() ; iIter != lstPCRV.end() ; ++ iIter) {
|
||||
// inserisco la curva nello stesso gruppo e nello stesso posto del GeomDB
|
||||
int nCrvId = pGeomDB->InsertGeoObj( GDB_ID_NULL, nId, GDB_BEFORE, (*iIter)) ;
|
||||
if ( nCrvId == GDB_ID_NULL)
|
||||
return FALSE ;
|
||||
// copio gli attributi
|
||||
if ( ! pGeomDB->CopyAttributes( nId, nCrvId))
|
||||
return FALSE ;
|
||||
}
|
||||
// elimino il testo originale
|
||||
return ( pGeomDB->Erase( nId) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtSplitText( int nId, int nDestGroupId)
|
||||
|
||||
Reference in New Issue
Block a user