fthrattr.cpp File Reference

(r1785/r1738)

#include "camtypes.h"
#include "fthrattr.h"
#include "nodecntr.h"
#include "lineattr.h"
#include "offscrn.h"
#include "grndrgn.h"
#include "oilbitmap.h"
#include "opfeathr.h"
#include "objchge.h"
#include "transop.h"
#include "blendatt.h"
#include "nodeblnd.h"
#include "attrmap.h"
#include "nodepath.h"
#include "nodedoc.h"
#include "cxftags.h"
#include "qualattr.h"
#include "nodemold.h"
#include "pathndge.h"

Go to the source code of this file.

Defines

#define new   CAM_DEBUG_NEW

Functions

BOOL CheckLineAttrs (CCAttrMap *pAttrMap)
BOOL MakeLineAttributeCompleteForContouring (Node *Context, Node *NodeToModify, CCAttrMap *pAttrMap)


Define Documentation

#define new   CAM_DEBUG_NEW
 

Definition at line 159 of file fthrattr.cpp.


Function Documentation

BOOL CheckLineAttrs CCAttrMap pAttrMap  ) 
 

Definition at line 185 of file fthrattr.cpp.

00186 {
00187     void* ptr = NULL;
00188     return (
00189         pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrLineWidth),(void *&)ptr) &&
00190         pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrStartArrow),(void *&)ptr) &&
00191         pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrEndArrow),(void *&)ptr) &&
00192         pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrJoinType),(void *&)ptr) &&
00193         pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrStartCap),(void *&)ptr) &&
00194         pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrDashPattern),(void *&)ptr)
00195         );
00196 }

BOOL MakeLineAttributeCompleteForContouring Node Context,
Node NodeToModify,
CCAttrMap pAttrMap
 

Definition at line 198 of file fthrattr.cpp.

00199 {
00200     AttrLineWidth * pAttrLineWidth = NULL;
00201     AttrStartArrow * pAttrStartArrow = NULL;
00202     AttrEndArrow * pAttrEndArrow = NULL;
00203     AttrJoinType * pAttrJoinType = NULL;
00204     AttrStartCap * pAttrStartCap = NULL;
00205     AttrDashPattern * pAttrDashPattern = NULL;
00206     AttrStrokeColour* pAttrStrokeColour = NULL;
00207 
00208     // get all the attributes out of the attribute map
00209     pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrLineWidth),(void *&)pAttrLineWidth);
00210     if(pAttrLineWidth)
00211         pAttrLineWidth->AttachNode(Context,FIRSTCHILD,FALSE,FALSE);
00212         
00213     pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrStartArrow),(void *&)pAttrStartArrow);
00214     if (pAttrStartArrow)
00215         pAttrStartArrow->AttachNode(Context,FIRSTCHILD,FALSE,FALSE);
00216 
00217     pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrEndArrow),(void *&)pAttrEndArrow);
00218     if (pAttrEndArrow)
00219         pAttrEndArrow->AttachNode(Context,FIRSTCHILD,FALSE,FALSE);
00220 
00221     pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrJoinType),(void *&)pAttrJoinType);
00222     if(pAttrJoinType)
00223         pAttrJoinType->AttachNode(Context,FIRSTCHILD,FALSE,FALSE);
00224         
00225     pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrStartCap),(void *&)pAttrStartCap);
00226     if(pAttrStartCap)
00227         pAttrStartCap->AttachNode(Context,FIRSTCHILD,FALSE,FALSE);
00228         
00229     pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrDashPattern),(void *&)pAttrDashPattern);
00230     if(pAttrDashPattern)
00231         pAttrDashPattern->AttachNode(Context,FIRSTCHILD,FALSE,FALSE);
00232 
00233     pAttrMap->Lookup( CC_RUNTIME_CLASS(AttrStrokeColour),(void *&)pAttrStrokeColour);
00234     if(pAttrStrokeColour)
00235         pAttrStrokeColour->AttachNode(Context,FIRSTCHILD,FALSE,FALSE);
00236 
00237     if( pAttrLineWidth && pAttrStartArrow && pAttrEndArrow && pAttrJoinType && 
00238         pAttrStartCap && pAttrDashPattern && pAttrStrokeColour)
00239     {
00240         Node* pLastChild = Context->FindLastChild();
00241         NodeToModify->AttachNode(pLastChild,NEXT,FALSE,FALSE);  // dynamic attrs are copies, so we are free to modify them
00242         return TRUE;
00243     }
00244     else
00245     {
00246         return FALSE;
00247     }
00248 }


Generated on Sat Nov 10 03:49:10 2007 for Camelot by  doxygen 1.4.4