CXaraFileEllipse Class Reference

Class for exporting ellipses in the new file formatAbstract class holding code for exporting ellipses in the new file format. More...

#include <cxfellp.h>

Inheritance diagram for CXaraFileEllipse:

CXaraFileRegularShape List of all members.

Static Public Member Functions

static BOOL WriteEllipse (BaseCamelotFilter *pFilter, NodeRegularShape *pShape)
 Importing and exporting code for regular shapes to and from the new file format. Writes an ellipse record to the filter.
static BOOL WriteEllipseSimple (BaseCamelotFilter *pFilter, NodeRegularShape *pShape)
static BOOL WriteEllipseComplex (BaseCamelotFilter *pFilter, NodeRegularShape *pShape)

Detailed Description

Class for exporting ellipses in the new file formatAbstract class holding code for exporting ellipses in the new file format.

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
04/06/96 Base Class: CXaraFIleRegularShape
See also:
class NodeRegularShape

Definition at line 123 of file cxfellp.h.


Member Function Documentation

BOOL CXaraFileEllipse::WriteEllipse BaseCamelotFilter pFilter,
NodeRegularShape pShape
[static]
 

Importing and exporting code for regular shapes to and from the new file format. Writes an ellipse record to the filter.

Author:
Andy_Hayward (Xara Group Ltd) <camelotdev@xara.com>
Date:
04/06/96
Parameters:
pFilter - filter to use [INPUTS] pShape - shape to save out
Returns:
boolean value indicating success or writing record

Definition at line 138 of file cxfellp.cpp.

00139 {
00140     BOOL ok;
00141 
00142     // need to determine whether this is a simple shape or not, i.e. is the corresponding matrix
00143     // the identity matrix?
00144 
00145     if (IsSimple(pShape))
00146     {
00147         ok = WriteEllipseSimple(pFilter, pShape);
00148     }
00149     else
00150     {
00151         ok = WriteEllipseComplex(pFilter, pShape);
00152     }
00153 
00154     return ok;
00155 }

BOOL CXaraFileEllipse::WriteEllipseComplex BaseCamelotFilter pFilter,
NodeRegularShape pShape
[static]
 

Definition at line 172 of file cxfellp.cpp.

00173 {
00174     BOOL ok;
00175 
00176     CamelotFileRecord Rec(pFilter,TAG_ELLIPSE_COMPLEX, TAG_ELLIPSE_COMPLEX_SIZE);
00177 
00178     ok = Rec.Init();
00179     if (ok) ok = Rec.WriteCoord(GetCentrePoint(pShape));
00180     if (ok) ok = Rec.WriteCoordTrans(GetMajorAxis(pShape),0,0);
00181     if (ok) ok = Rec.WriteCoordTrans(GetMinorAxis(pShape),0,0);
00182     if (ok) ok = pFilter->Write(&Rec);
00183 
00184     return ok;
00185 }

BOOL CXaraFileEllipse::WriteEllipseSimple BaseCamelotFilter pFilter,
NodeRegularShape pShape
[static]
 

Definition at line 157 of file cxfellp.cpp.

00158 {
00159     BOOL ok;
00160 
00161     CamelotFileRecord Rec(pFilter,TAG_ELLIPSE_SIMPLE, TAG_ELLIPSE_SIMPLE_SIZE);
00162 
00163     ok = Rec.Init();
00164     if (ok) ok = Rec.WriteCoord(GetCentrePoint(pShape));
00165     if (ok) ok = Rec.WriteINT32(GetWidth(pShape));
00166     if (ok) ok = Rec.WriteINT32(GetHeight(pShape));
00167     if (ok) ok = pFilter->Write(&Rec);
00168 
00169     return ok;
00170 }


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