#include <moldedit.h>
Inheritance diagram for OpMouldLib:
Public Member Functions | |
OpMouldLib () | |
OpMouldLib() constructor. | |
Protected Member Functions | |
BOOL | DoRotateMould (NodeMould *pMould) |
Simply rotates the orientation of all objects within the geometry. |
Definition at line 195 of file moldedit.h.
|
OpMouldLib() constructor.
Definition at line 1017 of file moldedit.cpp.
|
|
Simply rotates the orientation of all objects within the geometry.
Definition at line 1074 of file moldedit.cpp. 01075 { 01076 ERROR2IF(pMould==NULL, FALSE, "DoRotateMould() called with no mould pointer"); 01077 01078 MouldGeometry* pGeometry=pMould->GetGeometry(); 01079 NodeMouldPath* pMouldPath=pMould->GetPathShape(); 01080 if (!pMouldPath || !pGeometry) 01081 return FALSE; 01082 01083 // save the bits we need on the undo 01084 if ((pMould->StartSaveContext(this, REC_REBUILD | REC_GEOMCONTEXT | REC_PATHARRAYS)) == CC_FAIL) 01085 return FALSE; 01086 01087 Path* pEditPath = &(pMouldPath->InkPath); 01088 // rotate the path around 01089 INT32 index=0; 01090 if (!pEditPath->FindNextEndPoint(&index)) 01091 return FALSE; 01092 if (!pEditPath->ChangeStartElement(index)) 01093 return FALSE; 01094 01095 // set the geometry using this new mould shape 01096 if (!pGeometry->Define(pEditPath, NULL)) 01097 return FALSE; 01098 01099 // finally generate some new mould shapes. 01100 if (pMould->RemouldAll(this)==CC_FAIL) 01101 return FALSE; 01102 01103 // Ilan 7/5/00 01104 // Inform geom linked attrs of the change. Nb outside the normal AllowOp mechanism 01105 NodeAttribute* pNA = pMould->FindFirstGeometryLinkedAttr(); 01106 while(pNA) 01107 { 01108 pNA->LinkedNodeGeometryHasChanged(this); 01109 pNA = pNA->FindNextGeometryLinkedAttr(); 01110 } 01111 01112 if ((pMould->EndSaveContext(this, REC_REBUILD | REC_GEOMCONTEXT | REC_PATHARRAYS)) == CC_FAIL) 01113 return FALSE; 01114 01115 return TRUE; 01116 }
|