BOOL EllipseRecordHandler::ReadEllipseComplex(CXaraFileRecord *pCXaraFileRecord) { BOOL ok = TRUE; NodeRegularShape *pEllipse; DocCoord CentrePoint; DocCoord MajorAxis; DocCoord MinorAxis; pEllipse = new NodeRegularShape; if (ok) ok = SetupShape(pEllipse); if (ok) ok = SetIsCircular(pEllipse, TRUE); if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); if (ok) ok = SetCentrePoint(pEllipse, CentrePoint); if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); if (ok) ok = SetMajorAxis(pEllipse, MajorAxis); if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); if (ok) ok = SetMinorAxis(pEllipse, MinorAxis); if (ok) ok = InvalidateCache(pEllipse); if (ok) ok = InsertNode(pEllipse); return ok; }
BOOL EllipseRecordHandler::ReadEllipseSimple(CXaraFileRecord *pCXaraFileRecord) { BOOL ok = TRUE; NodeRegularShape * pEllipse; DocCoord CentrePoint; INT32 Height; INT32 Width; pEllipse = new NodeRegularShape; if (ok) ok = SetupShape(pEllipse); if (ok) ok = SetIsCircular(pEllipse, TRUE); if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); if (ok) ok = SetCentrePoint(pEllipse, CentrePoint); if (ok) ok = pCXaraFileRecord->ReadINT32(&Width); if (ok) ok = pCXaraFileRecord->ReadINT32(&Height); if (ok) ok = SetHeightAndWidth(pEllipse, Height, Width); if (ok) ok = InvalidateCache(pEllipse); if (ok) ok = InsertNode(pEllipse); return ok; }
BOOL RectangleRecordHandler::ReadRectangleComplexRounded(CXaraFileRecord *pCXaraFileRecord) { BOOL ok = TRUE; NodeRegularShape * pRectangle; DocCoord CentrePoint; DocCoord MajorAxis; DocCoord MinorAxis; double Curvature; pRectangle = new NodeRegularShape; if (ok) ok = SetupShape(pRectangle); if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides); if (ok) ok = SetIsRounded(pRectangle, TRUE); if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); if (ok) ok = SetCentrePoint(pRectangle, CentrePoint); if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); if (ok) ok = SetMajorAxis(pRectangle, MajorAxis); if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); if (ok) ok = SetMinorAxis(pRectangle, MinorAxis); if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&Curvature); if (ok) ok = SetCurvature(pRectangle, Curvature); if (ok) ok = InvalidateCache(pRectangle); if (ok) ok = InsertNode(pRectangle); return ok; }
BOOL RectangleRecordHandler::ReadRectangleSimpleRoundedReformed(CXaraFileRecord *pCXaraFileRecord) { BOOL ok = TRUE; NodeRegularShape * pRectangle; DocCoord CentrePoint; INT32 Height; INT32 Width; double Curvature; pRectangle = new NodeRegularShape; if (ok) ok = SetupShape(pRectangle); if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides); if (ok) ok = SetIsRounded(pRectangle, TRUE); if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); if (ok) ok = SetCentrePoint(pRectangle, CentrePoint); if (ok) ok = pCXaraFileRecord->ReadINT32(&Width); if (ok) ok = pCXaraFileRecord->ReadINT32(&Height); if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width); if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&Curvature); if (ok) ok = SetCurvature(pRectangle, Curvature); if (ok) ok = pCXaraFileRecord->ReadPath(&(pRectangle->EdgePath1)); if (ok) ok = InvalidateCache(pRectangle); if (ok) ok = InsertNode(pRectangle); return ok; }
BOOL RectangleRecordHandler::ReadRectangleSimpleStellated(CXaraFileRecord *pCXaraFileRecord) { BOOL ok = TRUE; NodeRegularShape * pRectangle; DocCoord CentrePoint; INT32 Height; INT32 Width; double StellationRadius; double StellationOffset; pRectangle = new NodeRegularShape; if (ok) ok = SetupShape(pRectangle); if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides); if (ok) ok = SetIsStellated(pRectangle, TRUE); if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); if (ok) ok = SetCentrePoint(pRectangle, CentrePoint); if (ok) ok = pCXaraFileRecord->ReadINT32(&Width); if (ok) ok = pCXaraFileRecord->ReadINT32(&Height); if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width); if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius); if (ok) ok = SetStellationRadius(pRectangle, StellationRadius); if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset); if (ok) ok = SetStellationOffset(pRectangle, StellationOffset); if (ok) ok = InvalidateCache(pRectangle); if (ok) ok = InsertNode(pRectangle); return ok; }
BOOL RectangleRecordHandler::ReadRectangleSimple(CXaraFileRecord *pCXaraFileRecord) { BOOL ok = TRUE; NodeRegularShape * pRectangle; DocCoord CentrePoint; INT32 Height; INT32 Width; pRectangle = new NodeRegularShape; if (ok) ok = SetupShape(pRectangle); if (ok) ok = SetNumberOfSides(pRectangle, NumberOfSides); if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); if (ok) ok = SetCentrePoint(pRectangle, CentrePoint); if (ok) ok = pCXaraFileRecord->ReadINT32(&Width); if (ok) ok = pCXaraFileRecord->ReadINT32(&Height); if (ok) ok = SetHeightAndWidth(pRectangle, Height, Width); if (ok) ok = InvalidateCache(pRectangle); if (ok) ok = InsertNode(pRectangle); return ok; }