#include <xpfcaps.h>
Inheritance diagram for XPFCMould:
Public Member Functions | |
XPFCMould (XPFConvertType ConvertType, XPFProp Type, XPFBOOL bGradFill) | |
virtual | ~XPFCMould () |
Protected Member Functions | |
virtual BOOL | DoesNodeMatch (Node *pNode) |
BOOL | HasGraduatedFill (Node *pNode) |
This determines if a mould uses any attributes that will not render correctly if converted to simple shapes. | |
Protected Attributes | |
XPFProp | m_Type |
XPFBOOL | m_bGradFill |
Private Member Functions | |
CC_DECLARE_MEMDUMP (XPFCMould) |
Definition at line 504 of file xpfcaps.h.
|
Definition at line 510 of file xpfcaps.h. 00511 : XPFCComplexClass(CC_RUNTIME_CLASS(NodeMould), ConvertType) 00512 { 00513 m_Type = Type; 00514 m_bGradFill = bGradFill; 00515 }
|
|
Definition at line 516 of file xpfcaps.h.
|
|
|
|
Reimplemented from XPFCComplexClass. Definition at line 464 of file xpfcaps.cpp. 00465 { 00466 // If we aren't the correct type of node then return 00467 if (!XPFCComplexClass::DoesNodeMatch(pNode)) 00468 return(FALSE); 00469 00470 NodeMould* pMould = (NodeMould*)pNode; 00471 00472 // Now test the property attributes 00473 if (m_Type != XPFP_UNKNOWN && pMould->DescribeGeometry() != m_Type) 00474 return(FALSE); 00475 00476 if (m_bGradFill != XPFB_UNKNOWN) 00477 { 00478 // Scan story for non-plain attributes 00479 BOOL bGradFill = HasGraduatedFill(pNode); 00480 TRACEUSER( "Gerry", _T("HasGraduatedFill returned %s\n"), bGradFill ? _T("true") : _T("false")); 00481 if (bGradFill != m_bGradFill) 00482 return(FALSE); 00483 } 00484 00485 return(TRUE); 00486 }
|
|
This determines if a mould uses any attributes that will not render correctly if converted to simple shapes.
Definition at line 502 of file xpfcaps.cpp. 00503 { 00504 // TRACEUSER( "Gerry", _T("HasGraduatedFill(%s)\n"), pNode->GetRuntimeClass()->m_lpszClassName); 00505 00506 // If the node has children then we must loop through them testing each 00507 Node* pChild = pNode->FindFirstChild(); 00508 while (pChild) 00509 { 00510 if (HasGraduatedFill(pChild)) 00511 return(TRUE); 00512 00513 pChild = pChild->FindNext(); 00514 } 00515 00516 if (pNode->IsAnAttribute()) 00517 { 00518 NodeAttribute* pAttr = (NodeAttribute*)pNode; 00519 00520 // These don't return a sensible value from GetAttributeIndex so 00521 // we have to check the runtime class 00522 if (pAttr->GetAttributeType() == CC_RUNTIME_CLASS(AttrFillGeometry) || 00523 pAttr->GetAttributeType() == CC_RUNTIME_CLASS(AttrTranspFillGeometry)) 00524 { 00525 if (!pAttr->IsAFlatFill()) 00526 return(TRUE); 00527 } 00528 } 00529 00530 // We've got this far so there are no perspectivisable fills and we can return FALSE 00531 return(FALSE); 00532 }
|
|
|
|
|