CDRBBoxList Class Reference

A list of bounding boxes for the CDR filter. More...

#include <cdrfiltr.h>

Inheritance diagram for CDRBBoxList:

List CCObject SimpleCCObject List of all members.

Public Member Functions

 CDRBBoxList ()
 constructor
 ~CDRBBoxList ()
 destructor
BOOL Add (Node *N, DocRect *BBox, Justification Just)
 Adds a bounding box to the list.
BOOL Find (Node *N, DocRect *BBox)
 Finds a bounding box from a list of bounding boxes.
DocRectFind (Node *N)
 Finds a stored bounding box, returning a pointer to the DocRect which can be modified, for example, as a result of a transformation.

Detailed Description

A list of bounding boxes for the CDR filter.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
01/05/95

Definition at line 615 of file cdrfiltr.h.


Constructor & Destructor Documentation

CDRBBoxList::CDRBBoxList  ) 
 

constructor

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
01/05/95
Parameters:
- [INPUTS]
Returns:
-
See also:
CDRFilter

Definition at line 2064 of file cdrtext.cpp.

02065 {
02066 }

CDRBBoxList::~CDRBBoxList  ) 
 

destructor

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
01/05/95
Parameters:
- [INPUTS]
Returns:
-
See also:
CDRFilter

Definition at line 2082 of file cdrtext.cpp.

02083 {
02084 }


Member Function Documentation

BOOL CDRBBoxList::Add Node N,
DocRect BBox,
Justification  Just
 

Adds a bounding box to the list.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
01/05/95
Parameters:
node the bounding box is associated with, bounding box [INPUTS]
Returns:
error flag
See also:
CDRFilter

Definition at line 2137 of file cdrtext.cpp.

02138 {
02139     CDRBBoxListItem *Item = new CDRBBoxListItem;
02140 
02141     Item->pNode = N;
02142     Item->BBox = *BBox;
02143 
02144     // alter the BBox for various justification options
02145     if(Just == JCENTRE)
02146     {
02147         BBox->Translate(0 - (BBox->Width() / 2), 0);
02148     }
02149     else if(Just == JRIGHT)
02150     {
02151         BBox->Translate(0 - BBox->Width(), 0);
02152     }
02153 
02154     AddTail(Item);
02155 
02156     return TRUE;
02157 }

DocRect * CDRBBoxList::Find Node N  ) 
 

Finds a stored bounding box, returning a pointer to the DocRect which can be modified, for example, as a result of a transformation.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
01/05/95
Parameters:
node to look up [INPUTS]
Returns:
DocRect or 0, can be modified
See also:
CDRFilter

Definition at line 2208 of file cdrtext.cpp.

02209 {
02210     CDRBBoxListItem *Item = (CDRBBoxListItem *)GetHead();
02211 
02212     while(Item != 0)
02213     {
02214         if(Item->pNode == N)
02215         {
02216             return &Item->BBox;
02217         }
02218 
02219         Item = (CDRBBoxListItem *)GetNext(Item);
02220     }
02221 
02222     return 0;
02223 }

BOOL CDRBBoxList::Find Node N,
DocRect BBox
 

Finds a bounding box from a list of bounding boxes.

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
01/05/95
Parameters:
node to look up, a DocRect for the result [INPUTS]
Returns:
whether it found an entry for this node
See also:
CDRFilter

Definition at line 2172 of file cdrtext.cpp.

02173 {
02174     CDRBBoxListItem *Item = (CDRBBoxListItem *)GetHead();
02175 
02176     while(Item != 0)
02177     {
02178         if(Item->pNode == N)
02179         {
02180             if(BBox != 0)
02181             {
02182                 *BBox = Item->BBox;
02183             }
02184             return TRUE;
02185         }
02186 
02187         Item = (CDRBBoxListItem *)GetNext(Item);
02188     }
02189 
02190     return FALSE;
02191 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:52:15 2007 for Camelot by  doxygen 1.4.4