#include <linedef.h>
Inheritance diagram for LineDefinition:
Public Member Functions | |
LineDefinition () | |
default constructor, please don't use it though, i am only keeping it around so I can integrate the StrokeDefinition stuff | |
LineDefinition (Node *pLineTree) | |
Constructor. | |
~LineDefinition () | |
Destructor. | |
void | SetLineName (StringBase *pName) |
Sets the name text string for this Line. | |
void | SetOverrideFill (BOOL Override) |
void | SetOverrideTrans (BOOL Override) |
virtual BOOL | IsDifferent (LineDefinition *pOther)=0 |
Node * | GetLineTree (void) |
String_32 * | GetLineName (void) |
BOOL | OverrideFill (void) const |
BOOL | OverrideTrans (void) const |
BOOL | NeedsTransparency (void) const |
Determine if this Line needs transparency in order to render. | |
void | SetIOStore (UINT32 NewValue) |
UINT32 | ReadIOStore (void) const |
Static Public Member Functions | |
static void | ConvertIndexedColours (Spread *pSpread) |
To convert all the colours in the subtree that we wish to use to make a brush definition. | |
Protected Attributes | |
Node * | m_pTree |
String_32 | m_Name |
BOOL | m_bOverridesFill |
BOOL | m_bOverridesTrans |
BOOL | m_bNeedsTrans |
UINT32 | IOStore |
Private Member Functions | |
CC_DECLARE_DYNAMIC (LineDefinition) |
Definition at line 121 of file linedef.h.
|
default constructor, please don't use it though, i am only keeping it around so I can integrate the StrokeDefinition stuff
Definition at line 123 of file linedef.cpp. 00124 { 00125 // set to NULL or else CascadeDelete fails in the destructor 00126 m_pTree = NULL; 00127 }
|
|
Constructor.
Definition at line 153 of file linedef.cpp. 00154 { 00155 ERROR3IF(pLineTree == NULL, "Illegal NULL param"); 00156 ERROR3IF(!pLineTree->IsSpread(), "LineDefinitions must begin with a Spread (for now, at least)"); 00157 ERROR3IF(pLineTree->FindParent() != NULL, "Line Definition looks like it's linked into a tree!"); 00158 00159 m_pTree = pLineTree; 00160 00161 // Check the subtree to see if it contains any transparency 00162 m_bNeedsTrans = m_pTree->ChildrenNeedTransparency(); 00163 00164 IOStore = 0; 00165 00166 m_Name = TEXT("Custom line"); 00167 00168 m_bOverridesFill = FALSE; 00169 m_bOverridesTrans = FALSE; 00170 }
|
|
Destructor.
Definition at line 185 of file linedef.cpp. 00186 { 00187 if (m_pTree != NULL) 00188 { 00189 m_pTree->CascadeDelete(); 00190 delete m_pTree; 00191 } 00192 }
|
|
|
|
To convert all the colours in the subtree that we wish to use to make a brush definition.
Definition at line 250 of file linedef.cpp. 00251 { 00252 if (pRoot == NULL) 00253 { 00254 ERROR3("Spread is NULL"); 00255 return; 00256 } 00257 // start at the layer 00258 Node* pNode = pRoot->FindFirstChild(); 00259 pNode = pNode->FindFirstChild(); 00260 00261 // traverse across the layer 00262 while (pNode != NULL) 00263 { 00264 // search depth first as we may have a group 00265 Node *pCurNode = pNode->FindFirstDepthFirst(); 00266 Node *pNextNode; 00267 00268 while (pCurNode !=NULL) 00269 { 00270 // We may be about to chop this node out of the tree, so get the next node now 00271 pNextNode = pCurNode->FindNextDepthFirst(pNode); 00272 00273 // Use to scan the colour fields of the attribute. 00274 if (pCurNode->IsAnAttribute()) 00275 { 00276 UINT32 Context = 0; 00277 NodeAttribute *pNodeAttr = (NodeAttribute *) pCurNode; 00278 00279 // Get the next colour field from the attribute 00280 DocColour *pColour = pNodeAttr->EnumerateColourFields(Context++); 00281 00282 while (pColour != NULL) 00283 { 00284 // For each colour field, make sure the colour is a local DocColour so that 00285 // the sub-tree is entirely stand-alone 00286 IndexedColour* pIndexCol = pColour->FindParentIndexedColour(); 00287 if (pIndexCol != NULL) 00288 { 00289 ColourGeneric ColDef; 00290 ColourContext *cc = ColourManager::GetColourContext(pColour->GetColourModel()); 00291 ERROR3IF(cc == NULL, "Can't find colour context?!"); 00292 00293 // Get the IndexedColour definition as a standalone colour definition 00294 cc->ConvertColour(pIndexCol, &ColDef); 00295 00296 // Make the DocColour into a simple standalone "lookalike" of the parent colour 00297 *pColour = DocColour(pColour->GetColourModel(), &ColDef); 00298 00299 // if the parent colour was named then set the reserved flag 00300 if (pIndexCol->IsNamed()) 00301 pColour->SetReservedFlag(COL_NAMED); 00302 } 00303 pColour = pNodeAttr->EnumerateColourFields(Context++); 00304 } 00305 } 00306 pCurNode = pNextNode; 00307 } 00308 00309 pNode = pNode->FindNext(CC_RUNTIME_CLASS(NodeRenderableInk)); 00310 } 00311 }
|
|
Definition at line 150 of file linedef.h. 00150 { return(&m_Name); };
|
|
Definition at line 147 of file linedef.h. 00147 { return(m_pTree); };
|
|
Implemented in BrushDefinition, and StrokeDefinition. |
|
Determine if this Line needs transparency in order to render.
Reimplemented in StrokeDefinition. Definition at line 229 of file linedef.cpp. 00230 { 00231 return(m_bNeedsTrans); 00232 }
|
|
Reimplemented in StrokeDefinition. Definition at line 159 of file linedef.h. 00159 { return(m_bOverridesFill); };
|
|
Reimplemented in StrokeDefinition. Definition at line 160 of file linedef.h. 00160 { return(m_bOverridesTrans); };
|
|
Reimplemented in StrokeDefinition. Definition at line 167 of file linedef.h. 00167 { return(IOStore); };
|
|
Reimplemented in StrokeDefinition. Definition at line 166 of file linedef.h. 00166 { IOStore = NewValue; };
|
|
Sets the name text string for this Line.
Definition at line 207 of file linedef.cpp. 00208 { 00209 ERROR3IF(pName == NULL, "Illegal NULL param"); 00210 00211 pName->Left(&m_Name, 31); 00212 }
|
|
Reimplemented in StrokeDefinition. Definition at line 138 of file linedef.h. 00138 { m_bOverridesFill = Override; };
|
|
Reimplemented in StrokeDefinition. Definition at line 139 of file linedef.h. 00139 { m_bOverridesTrans = Override; };
|
|
Reimplemented in StrokeDefinition. |
|
|
|
|
|
|
|
|
|
|