RectangleRecordHandler Class Reference

Handles rectangle type records from the new file format Record handler for rectangles, used when importing rectangles from the new file format. Derived from the regular shape record handler, so we use all the functions in that class to complete the regular shape. More...

#include <rechrect.h>

Inheritance diagram for RectangleRecordHandler:

RegularShapeRecordHandler CamelotRecordHandler CXaraFileRecordHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 RectangleRecordHandler ()
 ~RectangleRecordHandler ()
UINT32GetTagList ()
 Returns an array of records handled by this class. See Also: EllispeRecordHandler::HandleRecord.
BOOL HandleRecord (CXaraFileRecord *pCXaraFileRecord)
 Handles ellipse type records for the new file format.

Private Member Functions

 CC_DECLARE_DYNAMIC (RectangleRecordHandler)
BOOL ReadRectangleSimple (CXaraFileRecord *pCXaraFileRecord)
 Reads in an rectangle record.
BOOL ReadRectangleSimpleReformed (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleSimpleStellated (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleSimpleStellatedReformed (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleSimpleRounded (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleSimpleRoundedReformed (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleSimpleRoundedStellated (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleSimpleRoundedStellatedReformed (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleComplex (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleComplexReformed (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleComplexStellated (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleComplexStellatedReformed (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleComplexRounded (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleComplexRoundedReformed (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleComplexRoundedStellated (CXaraFileRecord *pCXaraFileRecord)
BOOL ReadRectangleComplexRoundedStellatedReformed (CXaraFileRecord *pCXaraFileRecord)

Static Private Attributes

static const INT32 NumberOfSides = 4
 Holds the number of sides a rectangle has - errm, 4.

Detailed Description

Handles rectangle type records from the new file format Record handler for rectangles, used when importing rectangles from the new file format. Derived from the regular shape record handler, so we use all the functions in that class to complete the regular shape.

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
07/06/96 Base Class: RegularShapeRecordHandler

Definition at line 125 of file rechrect.h.


Constructor & Destructor Documentation

RectangleRecordHandler::RectangleRecordHandler  )  [inline]
 

Definition at line 131 of file rechrect.h.

00131 {};

RectangleRecordHandler::~RectangleRecordHandler  )  [inline]
 

Definition at line 132 of file rechrect.h.

00132 {};


Member Function Documentation

RectangleRecordHandler::CC_DECLARE_DYNAMIC RectangleRecordHandler   )  [private]
 

UINT32 * RectangleRecordHandler::GetTagList  )  [virtual]
 

Returns an array of records handled by this class. See Also: EllispeRecordHandler::HandleRecord.

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
06/06/96
Parameters:
- [INPUTS]
Returns:
UINT32* to an array of records handled by this class. The last entry in the array is CXFRH_TAG_LIST_END

Reimplemented from RegularShapeRecordHandler.

Definition at line 138 of file rechrect.cpp.

BOOL RectangleRecordHandler::HandleRecord CXaraFileRecord pCXaraFileRecord  )  [virtual]
 

Handles ellipse type records for the new file format.

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
06/06/96
Parameters:
pCXaraFileRecord - CXaraFileRecord object to read [INPUTS]
Returns:
TRUE if successful, FALSE otherwise

Reimplemented from RegularShapeRecordHandler.

Definition at line 172 of file rechrect.cpp.

00173 {
00174     BOOL ok;
00175 
00176     switch (pCXaraFileRecord->GetTag())
00177     {
00178         case TAG_RECTANGLE_SIMPLE
00179                 : ok = ReadRectangleSimple(pCXaraFileRecord); break;
00180         case TAG_RECTANGLE_SIMPLE_REFORMED
00181                 : ok = ReadRectangleSimpleReformed(pCXaraFileRecord); break;
00182         case TAG_RECTANGLE_SIMPLE_STELLATED
00183                 : ok = ReadRectangleSimpleStellated(pCXaraFileRecord); break;
00184         case TAG_RECTANGLE_SIMPLE_STELLATED_REFORMED
00185                 : ok = ReadRectangleSimpleStellatedReformed(pCXaraFileRecord); break;
00186         case TAG_RECTANGLE_SIMPLE_ROUNDED
00187                 : ok = ReadRectangleSimpleRounded(pCXaraFileRecord); break;
00188         case TAG_RECTANGLE_SIMPLE_ROUNDED_REFORMED
00189                 : ok = ReadRectangleSimpleRoundedReformed(pCXaraFileRecord); break;
00190         case TAG_RECTANGLE_SIMPLE_ROUNDED_STELLATED
00191                 : ok = ReadRectangleSimpleRoundedStellated(pCXaraFileRecord); break;
00192         case TAG_RECTANGLE_SIMPLE_ROUNDED_STELLATED_REFORMED
00193                 : ok = ReadRectangleSimpleRoundedStellatedReformed(pCXaraFileRecord); break;
00194         case TAG_RECTANGLE_COMPLEX
00195                 : ok = ReadRectangleComplex(pCXaraFileRecord); break;
00196         case TAG_RECTANGLE_COMPLEX_REFORMED
00197                 : ok = ReadRectangleComplexReformed(pCXaraFileRecord); break;
00198         case TAG_RECTANGLE_COMPLEX_STELLATED
00199                 : ok = ReadRectangleComplexStellated(pCXaraFileRecord); break;
00200         case TAG_RECTANGLE_COMPLEX_STELLATED_REFORMED
00201                 : ok = ReadRectangleComplexStellatedReformed(pCXaraFileRecord); break;
00202         case TAG_RECTANGLE_COMPLEX_ROUNDED
00203                 : ok = ReadRectangleComplexRounded(pCXaraFileRecord); break;
00204         case TAG_RECTANGLE_COMPLEX_ROUNDED_REFORMED
00205                 : ok = ReadRectangleComplexRoundedReformed(pCXaraFileRecord); break;
00206         case TAG_RECTANGLE_COMPLEX_ROUNDED_STELLATED
00207                 : ok = ReadRectangleComplexRoundedStellated(pCXaraFileRecord); break;
00208         case TAG_RECTANGLE_COMPLEX_ROUNDED_STELLATED_REFORMED
00209                 : ok = ReadRectangleComplexRoundedStellatedReformed(pCXaraFileRecord); break;
00210         default
00211                 : ok = ReadShapeInvalid(pCXaraFileRecord); break;
00212     }
00213     
00214     return ok;
00215 }

BOOL RectangleRecordHandler::ReadRectangleComplex CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 541 of file rechrect.cpp.

00542 {
00543     BOOL ok = TRUE;
00544 
00545     NodeRegularShape * pRectangle;
00546     DocCoord CentrePoint;
00547     DocCoord MajorAxis;
00548     DocCoord MinorAxis;
00549     
00550     pRectangle = new NodeRegularShape;
00551 
00552     if (ok) ok = SetupShape(pRectangle);
00553     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00554 
00555     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00556     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00557 
00558     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0);
00559     if (ok) ok = SetMajorAxis(pRectangle, MajorAxis);
00560 
00561     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0);
00562     if (ok) ok = SetMinorAxis(pRectangle, MinorAxis);
00563 
00564     if (ok) ok = InvalidateCache(pRectangle);
00565     if (ok) ok = InsertNode(pRectangle);
00566 
00567     return ok;
00568 }

BOOL RectangleRecordHandler::ReadRectangleComplexReformed CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 570 of file rechrect.cpp.

00571 {
00572     BOOL ok = TRUE;
00573 
00574     NodeRegularShape * pRectangle;
00575     DocCoord MajorAxis;
00576     DocCoord MinorAxis;
00577     Matrix TransformMatrix;
00578     
00579     pRectangle = new NodeRegularShape;
00580 
00581     if (ok) ok = SetupShape(pRectangle);
00582     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00583 
00584     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0);
00585     if (ok) ok = SetMajorAxis(pRectangle, MajorAxis);
00586 
00587     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0);
00588     if (ok) ok = SetMinorAxis(pRectangle, MinorAxis);
00589 
00590     if (ok) ok = pCXaraFileRecord->ReadMatrix(&TransformMatrix);
00591     if (ok) ok = SetTransformMatrix(pRectangle, TransformMatrix);
00592 
00593     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath1));
00594 
00595     if (ok) ok = InvalidateCache(pRectangle);
00596     if (ok) ok = InsertNode(pRectangle);
00597 
00598     return ok;
00599 }

BOOL RectangleRecordHandler::ReadRectangleComplexRounded CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 680 of file rechrect.cpp.

00681 {
00682     BOOL ok = TRUE;
00683 
00684     NodeRegularShape * pRectangle;
00685     DocCoord CentrePoint;
00686     DocCoord MajorAxis;
00687     DocCoord MinorAxis;
00688     double Curvature;
00689     
00690     pRectangle = new NodeRegularShape;
00691 
00692     if (ok) ok = SetupShape(pRectangle);
00693     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00694     if (ok) ok = SetIsRounded(pRectangle, TRUE);
00695 
00696     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00697     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00698 
00699     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0);
00700     if (ok) ok = SetMajorAxis(pRectangle, MajorAxis);
00701 
00702     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0);
00703     if (ok) ok = SetMinorAxis(pRectangle, MinorAxis);
00704 
00705     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&Curvature);
00706     if (ok) ok = SetCurvature(pRectangle, Curvature);
00707 
00708     if (ok) ok = InvalidateCache(pRectangle);
00709     if (ok) ok = InsertNode(pRectangle);
00710 
00711     return ok;
00712 }

BOOL RectangleRecordHandler::ReadRectangleComplexRoundedReformed CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 714 of file rechrect.cpp.

00715 {
00716     BOOL ok = TRUE;
00717 
00718     NodeRegularShape * pRectangle;
00719     DocCoord MajorAxis;
00720     DocCoord MinorAxis;
00721     Matrix TransformMatrix;
00722     double Curvature;
00723     
00724     pRectangle = new NodeRegularShape;
00725 
00726     if (ok) ok = SetupShape(pRectangle);
00727     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00728     if (ok) ok = SetIsRounded(pRectangle, TRUE);
00729 
00730     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0);
00731     if (ok) ok = SetMajorAxis(pRectangle, MajorAxis);
00732 
00733     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0);
00734     if (ok) ok = SetMinorAxis(pRectangle, MinorAxis);
00735 
00736     if (ok) ok = pCXaraFileRecord->ReadMatrix(&TransformMatrix);
00737     if (ok) ok = SetTransformMatrix(pRectangle, TransformMatrix);
00738 
00739     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&Curvature);
00740     if (ok) ok = SetCurvature(pRectangle, Curvature);
00741 
00742     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath1));
00743 
00744     if (ok) ok = InvalidateCache(pRectangle);
00745     if (ok) ok = InsertNode(pRectangle);
00746 
00747     return ok;
00748 }

BOOL RectangleRecordHandler::ReadRectangleComplexRoundedStellated CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 750 of file rechrect.cpp.

00751 {
00752     BOOL ok = TRUE;
00753 
00754     NodeRegularShape * pRectangle;
00755     DocCoord CentrePoint;
00756     DocCoord MajorAxis;
00757     DocCoord MinorAxis;
00758     double StellationRadius;
00759     double StellationOffset;
00760     double PrimaryCurvature;
00761     double SecondaryCurvature;
00762     
00763     pRectangle = new NodeRegularShape;
00764 
00765     if (ok) ok = SetupShape(pRectangle);
00766     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00767     if (ok) ok = SetIsRounded(pRectangle, TRUE);
00768     if (ok) ok = SetIsStellated(pRectangle, TRUE);
00769 
00770     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00771     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00772 
00773     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0);
00774     if (ok) ok = SetMajorAxis(pRectangle, MajorAxis);
00775 
00776     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0);
00777     if (ok) ok = SetMinorAxis(pRectangle, MinorAxis);
00778 
00779     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius);
00780     if (ok) ok = SetStellationRadius(pRectangle, StellationRadius);
00781 
00782     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset);
00783     if (ok) ok = SetStellationOffset(pRectangle, StellationOffset);
00784 
00785     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&PrimaryCurvature);
00786     if (ok) ok = SetPrimaryCurvature(pRectangle, PrimaryCurvature);
00787 
00788     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&SecondaryCurvature);
00789     if (ok) ok = SetSecondaryCurvature(pRectangle, SecondaryCurvature);
00790 
00791     if (ok) ok = InvalidateCache(pRectangle);
00792     if (ok) ok = InsertNode(pRectangle);
00793 
00794     return ok;
00795 }

BOOL RectangleRecordHandler::ReadRectangleComplexRoundedStellatedReformed CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 797 of file rechrect.cpp.

00798 {
00799     BOOL ok = TRUE;
00800 
00801     NodeRegularShape * pRectangle;
00802     DocCoord MajorAxis;
00803     DocCoord MinorAxis;
00804     Matrix TransformMatrix;
00805     double StellationRadius;
00806     double StellationOffset;
00807     double PrimaryCurvature;
00808     double SecondaryCurvature;
00809     
00810     pRectangle = new NodeRegularShape;
00811 
00812     if (ok) ok = SetupShape(pRectangle);
00813     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00814     if (ok) ok = SetIsRounded(pRectangle, TRUE);
00815     if (ok) ok = SetIsStellated(pRectangle, TRUE);
00816 
00817     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0);
00818     if (ok) ok = SetMajorAxis(pRectangle, MajorAxis);
00819 
00820     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0);
00821     if (ok) ok = SetMinorAxis(pRectangle, MinorAxis);
00822 
00823     if (ok) ok = pCXaraFileRecord->ReadMatrix(&TransformMatrix);
00824     if (ok) ok = SetTransformMatrix(pRectangle, TransformMatrix);
00825 
00826     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius);
00827     if (ok) ok = SetStellationRadius(pRectangle, StellationRadius);
00828 
00829     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset);
00830     if (ok) ok = SetStellationOffset(pRectangle, StellationOffset);
00831 
00832     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&PrimaryCurvature);
00833     if (ok) ok = SetPrimaryCurvature(pRectangle, PrimaryCurvature);
00834 
00835     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&SecondaryCurvature);
00836     if (ok) ok = SetSecondaryCurvature(pRectangle, SecondaryCurvature);
00837 
00838     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath1));
00839     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath2));
00840     
00841     if (ok) ok = InvalidateCache(pRectangle);
00842     if (ok) ok = InsertNode(pRectangle);
00843 
00844     return ok;
00845 }

BOOL RectangleRecordHandler::ReadRectangleComplexStellated CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 601 of file rechrect.cpp.

00602 {
00603     BOOL ok = TRUE;
00604 
00605     NodeRegularShape * pRectangle;
00606     DocCoord CentrePoint;
00607     DocCoord MajorAxis;
00608     DocCoord MinorAxis;
00609     double StellationRadius;
00610     double StellationOffset;
00611 
00612     pRectangle = new NodeRegularShape;
00613 
00614     if (ok) ok = SetupShape(pRectangle);
00615     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00616     if (ok) ok = SetIsStellated(pRectangle, TRUE);
00617 
00618     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00619     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00620 
00621     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0);
00622     if (ok) ok = SetMajorAxis(pRectangle, MajorAxis);
00623 
00624     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0);
00625     if (ok) ok = SetMinorAxis(pRectangle, MinorAxis);
00626 
00627     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius);
00628     if (ok) ok = SetStellationRadius(pRectangle, StellationRadius);
00629 
00630     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset);
00631     if (ok) ok = SetStellationOffset(pRectangle, StellationOffset);
00632 
00633     if (ok) ok = InvalidateCache(pRectangle);
00634     if (ok) ok = InsertNode(pRectangle);
00635 
00636     return ok;
00637 }

BOOL RectangleRecordHandler::ReadRectangleComplexStellatedReformed CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 639 of file rechrect.cpp.

00640 {
00641     BOOL ok = TRUE;
00642 
00643     NodeRegularShape * pRectangle;
00644     DocCoord MajorAxis;
00645     DocCoord MinorAxis;
00646     Matrix TransformMatrix;
00647     double StellationRadius;
00648     double StellationOffset;
00649 
00650     pRectangle = new NodeRegularShape;
00651 
00652     if (ok) ok = SetupShape(pRectangle);
00653     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00654     if (ok) ok = SetIsStellated(pRectangle, TRUE);
00655 
00656     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0);
00657     if (ok) ok = SetMajorAxis(pRectangle, MajorAxis);
00658 
00659     if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0);
00660     if (ok) ok = SetMinorAxis(pRectangle, MinorAxis);
00661 
00662     if (ok) ok = pCXaraFileRecord->ReadMatrix(&TransformMatrix);
00663     if (ok) ok = SetTransformMatrix(pRectangle, TransformMatrix);
00664 
00665     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius);
00666     if (ok) ok = SetStellationRadius(pRectangle, StellationRadius);
00667 
00668     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset);
00669     if (ok) ok = SetStellationOffset(pRectangle, StellationOffset);
00670 
00671     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath1));
00672     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath2));
00673 
00674     if (ok) ok = InvalidateCache(pRectangle);
00675     if (ok) ok = InsertNode(pRectangle);
00676 
00677     return ok;
00678 }

BOOL RectangleRecordHandler::ReadRectangleSimple CXaraFileRecord pCXaraFileRecord  )  [private]
 

Reads in an rectangle record.

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
06/06/96
Parameters:
pCXaraFileRecord - pointer to the record to read [INPUTS]
Returns:
TRUE if successfull, false otherwise

Definition at line 249 of file rechrect.cpp.

00250 {
00251     BOOL ok = TRUE;
00252 
00253     NodeRegularShape * pRectangle;
00254     DocCoord CentrePoint;
00255     INT32 Height;
00256     INT32 Width;
00257 
00258     pRectangle = new NodeRegularShape;
00259 
00260     if (ok) ok = SetupShape(pRectangle);
00261     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00262 
00263     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00264     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00265 
00266     if (ok) ok = pCXaraFileRecord->ReadINT32(&Width);
00267     if (ok) ok = pCXaraFileRecord->ReadINT32(&Height);
00268     if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width);
00269 
00270     if (ok) ok = InvalidateCache(pRectangle);
00271     if (ok) ok = InsertNode(pRectangle);
00272 
00273     return ok;
00274 }

BOOL RectangleRecordHandler::ReadRectangleSimpleReformed CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 276 of file rechrect.cpp.

00277 {
00278     BOOL ok = TRUE;
00279 
00280     NodeRegularShape *pRectangle;
00281     DocCoord CentrePoint;
00282     INT32 Width;
00283     INT32 Height;
00284 
00285     pRectangle = new NodeRegularShape;
00286 
00287     if (ok) ok = SetupShape(pRectangle);
00288     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00289 
00290     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00291     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00292 
00293     if (ok) ok = pCXaraFileRecord->ReadINT32(&Width);
00294     if (ok) ok = pCXaraFileRecord->ReadINT32(&Height);
00295     if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width);
00296 
00297     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath1));
00298 
00299     if (ok) ok = InvalidateCache(pRectangle);
00300     if (ok) ok = InsertNode(pRectangle);
00301     
00302     return ok;
00303 }

BOOL RectangleRecordHandler::ReadRectangleSimpleRounded CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 380 of file rechrect.cpp.

00381 {
00382     BOOL ok = TRUE;
00383 
00384     NodeRegularShape * pRectangle;
00385     DocCoord CentrePoint;
00386     INT32 Height;
00387     INT32 Width;
00388     double Curvature;
00389     
00390     pRectangle = new NodeRegularShape;
00391 
00392 
00393     if (ok) ok = SetupShape(pRectangle);
00394     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00395     if (ok) ok = SetIsRounded(pRectangle, TRUE);
00396 
00397     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00398     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00399 
00400     if (ok) ok = pCXaraFileRecord->ReadINT32(&Width);
00401     if (ok) ok = pCXaraFileRecord->ReadINT32(&Height);
00402     if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width);
00403 
00404     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&Curvature);
00405     if (ok) ok = SetCurvature(pRectangle, Curvature);
00406 
00407     if (ok) ok = InvalidateCache(pRectangle);
00408     if (ok) ok = InsertNode(pRectangle);
00409 
00410     return ok;
00411 }

BOOL RectangleRecordHandler::ReadRectangleSimpleRoundedReformed CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 413 of file rechrect.cpp.

00414 {
00415     BOOL ok = TRUE;
00416 
00417     NodeRegularShape * pRectangle;
00418     DocCoord CentrePoint;
00419     INT32 Height;
00420     INT32 Width;
00421     double Curvature;
00422     
00423     pRectangle = new NodeRegularShape;
00424 
00425 
00426     if (ok) ok = SetupShape(pRectangle);
00427     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00428     if (ok) ok = SetIsRounded(pRectangle, TRUE);
00429 
00430     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00431     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00432 
00433     if (ok) ok = pCXaraFileRecord->ReadINT32(&Width);
00434     if (ok) ok = pCXaraFileRecord->ReadINT32(&Height);
00435     if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width);
00436 
00437     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&Curvature);
00438     if (ok) ok = SetCurvature(pRectangle, Curvature);
00439 
00440     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath1));
00441 
00442     if (ok) ok = InvalidateCache(pRectangle);
00443     if (ok) ok = InsertNode(pRectangle);
00444 
00445     return ok;
00446 }

BOOL RectangleRecordHandler::ReadRectangleSimpleRoundedStellated CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 448 of file rechrect.cpp.

00449 {
00450     BOOL ok = TRUE;
00451 
00452     NodeRegularShape * pRectangle;
00453     DocCoord CentrePoint;
00454     INT32 Height;
00455     INT32 Width;
00456     double StellationRadius;
00457     double StellationOffset;
00458     double PrimaryCurvature;
00459     double SecondaryCurvature;
00460     
00461     pRectangle = new NodeRegularShape;
00462 
00463     if (ok) ok = SetupShape(pRectangle);
00464     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00465     if (ok) ok = SetIsRounded(pRectangle, TRUE);
00466     if (ok) ok = SetIsStellated(pRectangle, TRUE);
00467 
00468     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00469     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00470 
00471     if (ok) ok = pCXaraFileRecord->ReadINT32(&Width);
00472     if (ok) ok = pCXaraFileRecord->ReadINT32(&Height);
00473     if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width);
00474 
00475     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius);
00476     if (ok) ok = SetStellationRadius(pRectangle, StellationRadius);
00477 
00478     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset);
00479     if (ok) ok = SetStellationOffset(pRectangle, StellationOffset);
00480 
00481     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&PrimaryCurvature);
00482     if (ok) ok = SetPrimaryCurvature(pRectangle, PrimaryCurvature);
00483 
00484     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&SecondaryCurvature);
00485     if (ok) ok = SetSecondaryCurvature(pRectangle, SecondaryCurvature);
00486 
00487     if (ok) ok = InvalidateCache(pRectangle);
00488     if (ok) ok = InsertNode(pRectangle);
00489 
00490     return ok;
00491 }

BOOL RectangleRecordHandler::ReadRectangleSimpleRoundedStellatedReformed CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 493 of file rechrect.cpp.

00494 {
00495     BOOL ok = TRUE;
00496 
00497     NodeRegularShape * pRectangle;
00498     DocCoord CentrePoint;
00499     INT32 Height;
00500     INT32 Width;
00501     double StellationRadius;
00502     double StellationOffset;
00503     double PrimaryCurvature;
00504     double SecondaryCurvature;
00505     
00506     pRectangle = new NodeRegularShape;
00507 
00508     if (ok) ok = SetupShape(pRectangle);
00509     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00510     if (ok) ok = SetIsRounded(pRectangle, TRUE);
00511     if (ok) ok = SetIsStellated(pRectangle, TRUE);
00512 
00513     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00514     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00515 
00516     if (ok) ok = pCXaraFileRecord->ReadINT32(&Width);
00517     if (ok) ok = pCXaraFileRecord->ReadINT32(&Height);
00518     if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width);
00519 
00520     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius);
00521     if (ok) ok = SetStellationRadius(pRectangle, StellationRadius);
00522 
00523     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset);
00524     if (ok) ok = SetStellationOffset(pRectangle, StellationOffset);
00525 
00526     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&PrimaryCurvature);
00527     if (ok) ok = SetPrimaryCurvature(pRectangle, PrimaryCurvature);
00528 
00529     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&SecondaryCurvature);
00530     if (ok) ok = SetSecondaryCurvature(pRectangle, SecondaryCurvature);
00531 
00532     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath1));
00533     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath2));
00534     
00535     if (ok) ok = InvalidateCache(pRectangle);
00536     if (ok) ok = InsertNode(pRectangle);
00537 
00538     return ok;
00539 }

BOOL RectangleRecordHandler::ReadRectangleSimpleStellated CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 305 of file rechrect.cpp.

00306 {
00307     BOOL ok = TRUE;
00308 
00309     NodeRegularShape * pRectangle;
00310     DocCoord CentrePoint;
00311     INT32 Height;
00312     INT32 Width;
00313     double StellationRadius;
00314     double StellationOffset;
00315 
00316     pRectangle = new NodeRegularShape;
00317 
00318     if (ok) ok = SetupShape(pRectangle);
00319     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00320     if (ok) ok = SetIsStellated(pRectangle, TRUE);
00321 
00322     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00323     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00324 
00325     if (ok) ok = pCXaraFileRecord->ReadINT32(&Width);
00326     if (ok) ok = pCXaraFileRecord->ReadINT32(&Height);
00327     if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width);
00328 
00329     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius);
00330     if (ok) ok = SetStellationRadius(pRectangle, StellationRadius);
00331 
00332     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset);
00333     if (ok) ok = SetStellationOffset(pRectangle, StellationOffset);
00334 
00335     if (ok) ok = InvalidateCache(pRectangle);
00336     if (ok) ok = InsertNode(pRectangle);
00337 
00338     return ok;
00339 }

BOOL RectangleRecordHandler::ReadRectangleSimpleStellatedReformed CXaraFileRecord pCXaraFileRecord  )  [private]
 

Definition at line 341 of file rechrect.cpp.

00342 {
00343     BOOL ok = TRUE;
00344 
00345     NodeRegularShape * pRectangle;
00346     DocCoord CentrePoint;
00347     INT32 Height;
00348     INT32 Width;
00349     double StellationRadius;
00350     double StellationOffset;
00351 
00352     pRectangle = new NodeRegularShape;
00353 
00354     if (ok) ok = SetupShape(pRectangle);
00355     if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides);
00356     if (ok) ok = SetIsStellated(pRectangle, TRUE);
00357 
00358     if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint);
00359     if (ok) ok = SetCentrePoint(pRectangle, CentrePoint);
00360 
00361     if (ok) ok = pCXaraFileRecord->ReadINT32(&Width);
00362     if (ok) ok = pCXaraFileRecord->ReadINT32(&Height);
00363     if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width);
00364 
00365     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius);
00366     if (ok) ok = SetStellationRadius(pRectangle, StellationRadius);
00367 
00368     if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset);
00369     if (ok) ok = SetStellationOffset(pRectangle, StellationOffset);
00370 
00371     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath1));
00372     if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath2));
00373 
00374     if (ok) ok = InvalidateCache(pRectangle);
00375     if (ok) ok = InsertNode(pRectangle);
00376 
00377     return ok;
00378 }


Member Data Documentation

const INT32 RectangleRecordHandler::NumberOfSides = 4 [static, private]
 

Holds the number of sides a rectangle has - errm, 4.

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/06/96

Definition at line 157 of file rechrect.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:00:23 2007 for Camelot by  doxygen 1.4.4