#include <pbecomea.h>
Inheritance diagram for ContourBecomeA2:
Public Member Functions | |
ContourBecomeA2 (UndoableOperation *pUndoOp, MILLIPOINT Width, Path *pResultPath) | |
Constructor for a new ContourBecomeA, to do your contouring dirty work :o). | |
virtual BOOL | PassBack (NodeRenderableInk *pNewNode, NodeRenderableInk *pCreatedByNode, CCAttrMap *pAttrMap=NULL) |
PassBack function fer lettin' me do ma contour thang. | |
Protected Attributes | |
MILLIPOINT | m_Width |
Private Member Functions | |
CC_DECLARE_MEMDUMP (ContourBecomeA2) |
[INPUTS] | ||
[OUTPUTS] |
Reasons not to use us: 1. We don't currently deal with brush strokes correctly. 2. We currently only do rounded contours - no bevelled or mitred contours.
Example usage: Path ContourPath; ContourPath.Initialise(); ContourBecomeA2 baContour(NULL, MillipointWidth, &ContourPath) BOOL Success = pSourceNode->DoBecomeA(&baContour);
( source node not included :o] )
Definition at line 200 of file pbecomea.h.
|
Constructor for a new ContourBecomeA, to do your contouring dirty work :o).
Definition at line 457 of file pbecomea.cpp. 00460 : PathBecomeA( BECOMEA_PASSBACK, 00461 CC_RUNTIME_CLASS(NodePath), 00462 pUndoOp, 00463 FALSE, 00464 pResultPath, 00465 ADD_OUTLINES ) 00466 { 00467 m_Width = Width; 00468 SetDoSilhouette(TRUE); 00469 SetDoShadowSilhouettes(TRUE); 00470 }
|
|
|
|
PassBack function fer lettin' me do ma contour thang.
Reimplemented from PathBecomeA. Definition at line 497 of file pbecomea.cpp. 00500 { 00501 Path* pContourPath = NULL; 00502 Path* pSummedContourPath = m_pResultPath; 00503 00504 m_pResultPath = new Path; 00505 BOOL ok = (m_pResultPath != NULL); 00506 if (ok) ok = m_pResultPath->Initialise(); 00507 if (ok) 00508 { 00509 PathBecomeA::PassBack(pNewNode, pCreatedByNode, pAttrMap); 00510 ok = (m_pResultPath->GetNumCoords() != 0); 00511 } 00512 if (ok) 00513 { 00514 pContourPath = new Path; 00515 ok = (pContourPath != NULL); 00516 } 00517 if (ok) ok = pContourPath->Initialise(); 00518 if (ok) 00519 { 00520 TRACEUSER( "Karim", _T("Node at 0x%x; ResultPath - %d coords.\n"), 00521 pCreatedByNode, 00522 m_pResultPath->GetNumCoords()); 00523 00524 m_pResultPath->InitializeContourValues(2 * m_Width); 00525 m_pResultPath->GetContourForStep(pContourPath); 00526 00527 delete m_pResultPath; 00528 m_pResultPath = pSummedContourPath; 00529 00530 if (pContourPath->GetNumCoords() != 0) 00531 pContourPath->ClipPathToPath(*m_pResultPath, m_pResultPath, 7, 20, 75, 75); 00532 00533 if (!m_pResultPath->IsFilled) 00534 m_pResultPath->IsFilled = TRUE; 00535 00536 delete pContourPath; 00537 } 00538 00539 return ok; 00540 }
|
|
Definition at line 215 of file pbecomea.h. |