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:
Dario Sassi
2014-11-18 16:19:14 +00:00
parent c28d250749
commit 73c8bd68b0
6 changed files with 404 additions and 38 deletions
+29
View File
@@ -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)