#include <rechpoly.h>
Inheritance diagram for PolygonRecordHandler:
Definition at line 124 of file rechpoly.h.
|
Definition at line 130 of file rechpoly.h.
|
|
Definition at line 131 of file rechpoly.h.
|
|
|
|
Returns an array of records handled by this class. See Also: EllispeRecordHandler::HandleRecord.
Reimplemented from RegularShapeRecordHandler. Definition at line 138 of file rechpoly.cpp. 00139 { 00140 static UINT32 TagList[] = {TAG_POLYGON_COMPLEX, 00141 TAG_POLYGON_COMPLEX_REFORMED, 00142 TAG_POLYGON_COMPLEX_STELLATED, 00143 TAG_POLYGON_COMPLEX_STELLATED_REFORMED, 00144 TAG_POLYGON_COMPLEX_ROUNDED, 00145 TAG_POLYGON_COMPLEX_ROUNDED_REFORMED, 00146 TAG_POLYGON_COMPLEX_ROUNDED_STELLATED, 00147 TAG_POLYGON_COMPLEX_ROUNDED_STELLATED_REFORMED, 00148 CXFRH_TAG_LIST_END}; 00149 return &TagList[0]; 00150 }
|
|
Handles ellipse type records for the new file format.
Reimplemented from RegularShapeRecordHandler. Definition at line 164 of file rechpoly.cpp. 00165 { 00166 BOOL ok; 00167 00168 switch (pCXaraFileRecord->GetTag()) 00169 { 00170 case TAG_POLYGON_COMPLEX 00171 : ok = ReadPolygonComplex(pCXaraFileRecord); break; 00172 case TAG_POLYGON_COMPLEX_REFORMED 00173 : ok = ReadPolygonComplexReformed(pCXaraFileRecord); break; 00174 case TAG_POLYGON_COMPLEX_STELLATED 00175 : ok = ReadPolygonComplexStellated(pCXaraFileRecord); break; 00176 case TAG_POLYGON_COMPLEX_STELLATED_REFORMED 00177 : ok = ReadPolygonComplexStellatedReformed(pCXaraFileRecord); break; 00178 case TAG_POLYGON_COMPLEX_ROUNDED 00179 : ok = ReadPolygonComplexRounded(pCXaraFileRecord); break; 00180 case TAG_POLYGON_COMPLEX_ROUNDED_REFORMED 00181 : ok = ReadPolygonComplexRoundedReformed(pCXaraFileRecord); break; 00182 case TAG_POLYGON_COMPLEX_ROUNDED_STELLATED 00183 : ok = ReadPolygonComplexRoundedStellated(pCXaraFileRecord); break; 00184 case TAG_POLYGON_COMPLEX_ROUNDED_STELLATED_REFORMED 00185 : ok = ReadPolygonComplexRoundedStellatedReformed(pCXaraFileRecord); break; 00186 default 00187 : ok = ReadShapeInvalid(pCXaraFileRecord); break; 00188 } 00189 00190 return ok; 00191 }
|
|
Reads in an polygon record. BOOL PolygonRecordHandler::ReadPolygonComplex(CXaraFileRecord *pCXaraFileRecord) BOOL PolygonRecordHandler::ReadPolygonComplexReformed(CXaraFileRecord *pCXaraFileRecord) BOOL PolygonRecordHandler::ReadPolygonComplexStellated(CXaraFileRecord *pCXaraFileRecord) BOOL PolygonRecordHandler::ReadPolygonComplexStellatedReformed(CXaraFileRecord *pCXaraFileRecord) BOOL PolygonRecordHandler::ReadPolygonComplexRounded(CXaraFileRecord *pCXaraFileRecord) BOOL PolygonRecordHandler::ReadPolygonComplexRoundedReformed(CXaraFileRecord *pCXaraFileRecord) BOOL PolygonRecordHandler::ReadPolygonComplexRoundedStellated(CXaraFileRecord *pCXaraFileRecord) BOOL PolygonRecordHandler::ReadPolygonComplexRoundedStellatedReformed(CXaraFileRecord *pCXaraFileRecord)
Definition at line 212 of file rechpoly.cpp. 00213 { 00214 BOOL ok = TRUE; 00215 00216 NodeRegularShape * pPolygon; 00217 UINT16 NumberOfSides; 00218 DocCoord CentrePoint; 00219 DocCoord MajorAxis; 00220 DocCoord MinorAxis; 00221 00222 pPolygon = new NodeRegularShape; 00223 00224 if (ok) ok = SetupShape(pPolygon); 00225 00226 if (ok) ok = pCXaraFileRecord->ReadUINT16(&NumberOfSides); 00227 if (ok) ok = SetNumberOfSides(pPolygon, NumberOfSides); 00228 00229 if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); 00230 if (ok) ok = SetCentrePoint(pPolygon, CentrePoint); 00231 00232 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); 00233 if (ok) ok = SetMajorAxis(pPolygon, MajorAxis); 00234 00235 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); 00236 if (ok) ok = SetMinorAxis(pPolygon, MinorAxis); 00237 00238 if (ok) ok = InvalidateCache(pPolygon); 00239 if (ok) ok = InsertNode(pPolygon); 00240 00241 return ok; 00242 }
|
|
Definition at line 244 of file rechpoly.cpp. 00245 { 00246 BOOL ok = TRUE; 00247 00248 NodeRegularShape * pPolygon; 00249 UINT16 NumberOfSides; 00250 DocCoord MajorAxis; 00251 DocCoord MinorAxis; 00252 Matrix TransformMatrix; 00253 00254 pPolygon = new NodeRegularShape; 00255 00256 if (ok) ok = SetupShape(pPolygon); 00257 00258 if (ok) ok = pCXaraFileRecord->ReadUINT16(&NumberOfSides); 00259 if (ok) ok = SetNumberOfSides(pPolygon, NumberOfSides); 00260 00261 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); 00262 if (ok) ok = SetMajorAxis(pPolygon, MajorAxis); 00263 00264 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); 00265 if (ok) ok = SetMinorAxis(pPolygon, MinorAxis); 00266 00267 if (ok) ok = pCXaraFileRecord->ReadMatrix(&TransformMatrix); 00268 if (ok) ok = SetTransformMatrix(pPolygon, TransformMatrix); 00269 00270 if (ok) ok = pCXaraFileRecord->ReadPath(&(pPolygon->EdgePath1)); 00271 00272 if (ok) ok = InvalidateCache(pPolygon); 00273 if (ok) ok = InsertNode(pPolygon); 00274 00275 return ok; 00276 }
|
|
Definition at line 363 of file rechpoly.cpp. 00364 { 00365 BOOL ok = TRUE; 00366 00367 NodeRegularShape * pPolygon; 00368 UINT16 NumberOfSides; 00369 DocCoord CentrePoint; 00370 DocCoord MajorAxis; 00371 DocCoord MinorAxis; 00372 double Curvature; 00373 00374 pPolygon = new NodeRegularShape; 00375 00376 if (ok) ok = SetupShape(pPolygon); 00377 if (ok) ok = SetIsRounded(pPolygon, TRUE); 00378 00379 if (ok) ok = pCXaraFileRecord->ReadUINT16(&NumberOfSides); 00380 if (ok) ok = SetNumberOfSides(pPolygon, NumberOfSides); 00381 00382 if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); 00383 if (ok) ok = SetCentrePoint(pPolygon, CentrePoint); 00384 00385 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); 00386 if (ok) ok = SetMajorAxis(pPolygon, MajorAxis); 00387 00388 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); 00389 if (ok) ok = SetMinorAxis(pPolygon, MinorAxis); 00390 00391 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&Curvature); 00392 if (ok) ok = SetCurvature(pPolygon, Curvature); 00393 00394 if (ok) ok = InvalidateCache(pPolygon); 00395 if (ok) ok = InsertNode(pPolygon); 00396 00397 return ok; 00398 }
|
|
Definition at line 400 of file rechpoly.cpp. 00401 { 00402 BOOL ok = TRUE; 00403 00404 NodeRegularShape * pPolygon; 00405 UINT16 NumberOfSides; 00406 DocCoord MajorAxis; 00407 DocCoord MinorAxis; 00408 Matrix TransformMatrix; 00409 double Curvature; 00410 00411 pPolygon = new NodeRegularShape; 00412 00413 if (ok) ok = SetupShape(pPolygon); 00414 if (ok) ok = SetIsRounded(pPolygon, TRUE); 00415 00416 if (ok) ok = pCXaraFileRecord->ReadUINT16(&NumberOfSides); 00417 if (ok) ok = SetNumberOfSides(pPolygon, NumberOfSides); 00418 00419 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); 00420 if (ok) ok = SetMajorAxis(pPolygon, MajorAxis); 00421 00422 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); 00423 if (ok) ok = SetMinorAxis(pPolygon, MinorAxis); 00424 00425 if (ok) ok = pCXaraFileRecord->ReadMatrix(&TransformMatrix); 00426 if (ok) ok = SetTransformMatrix(pPolygon, TransformMatrix); 00427 00428 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&Curvature); 00429 if (ok) ok = SetCurvature(pPolygon, Curvature); 00430 00431 if (ok) ok = pCXaraFileRecord->ReadPath(&(pPolygon->EdgePath1)); 00432 00433 if (ok) ok = InvalidateCache(pPolygon); 00434 if (ok) ok = InsertNode(pPolygon); 00435 00436 return ok; 00437 }
|
|
Definition at line 439 of file rechpoly.cpp. 00440 { 00441 BOOL ok = TRUE; 00442 00443 NodeRegularShape * pPolygon; 00444 UINT16 NumberOfSides; 00445 DocCoord CentrePoint; 00446 DocCoord MajorAxis; 00447 DocCoord MinorAxis; 00448 double StellationRadius; 00449 double StellationOffset; 00450 double PrimaryCurvature; 00451 double SecondaryCurvature; 00452 00453 pPolygon = new NodeRegularShape; 00454 00455 if (ok) ok = SetupShape(pPolygon); 00456 if (ok) ok = SetIsRounded(pPolygon, TRUE); 00457 if (ok) ok = SetIsStellated(pPolygon, TRUE); 00458 00459 if (ok) ok = pCXaraFileRecord->ReadUINT16(&NumberOfSides); 00460 if (ok) ok = SetNumberOfSides(pPolygon, NumberOfSides); 00461 00462 if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); 00463 if (ok) ok = SetCentrePoint(pPolygon, CentrePoint); 00464 00465 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); 00466 if (ok) ok = SetMajorAxis(pPolygon, MajorAxis); 00467 00468 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); 00469 if (ok) ok = SetMinorAxis(pPolygon, MinorAxis); 00470 00471 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius); 00472 if (ok) ok = SetStellationRadius(pPolygon, StellationRadius); 00473 00474 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset); 00475 if (ok) ok = SetStellationOffset(pPolygon, StellationOffset); 00476 00477 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&PrimaryCurvature); 00478 if (ok) ok = SetPrimaryCurvature(pPolygon, PrimaryCurvature); 00479 00480 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&SecondaryCurvature); 00481 if (ok) ok = SetSecondaryCurvature(pPolygon, SecondaryCurvature); 00482 00483 if (ok) ok = InvalidateCache(pPolygon); 00484 if (ok) ok = InsertNode(pPolygon); 00485 00486 return ok; 00487 }
|
|
Definition at line 489 of file rechpoly.cpp. 00490 { 00491 BOOL ok = TRUE; 00492 00493 NodeRegularShape * pPolygon; 00494 UINT16 NumberOfSides; 00495 DocCoord MajorAxis; 00496 DocCoord MinorAxis; 00497 Matrix TransformMatrix; 00498 double StellationRadius; 00499 double StellationOffset; 00500 double PrimaryCurvature; 00501 double SecondaryCurvature; 00502 00503 pPolygon = new NodeRegularShape; 00504 00505 if (ok) ok = SetupShape(pPolygon); 00506 if (ok) ok = SetIsRounded(pPolygon, TRUE); 00507 if (ok) ok = SetIsStellated(pPolygon, TRUE); 00508 00509 if (ok) ok = pCXaraFileRecord->ReadUINT16(&NumberOfSides); 00510 if (ok) ok = SetNumberOfSides(pPolygon, NumberOfSides); 00511 00512 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); 00513 if (ok) ok = SetMajorAxis(pPolygon, MajorAxis); 00514 00515 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); 00516 if (ok) ok = SetMinorAxis(pPolygon, MinorAxis); 00517 00518 if (ok) ok = pCXaraFileRecord->ReadMatrix(&TransformMatrix); 00519 if (ok) ok = SetTransformMatrix(pPolygon, TransformMatrix); 00520 00521 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius); 00522 if (ok) ok = SetStellationRadius(pPolygon, StellationRadius); 00523 00524 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset); 00525 if (ok) ok = SetStellationOffset(pPolygon, StellationOffset); 00526 00527 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&PrimaryCurvature); 00528 if (ok) ok = SetPrimaryCurvature(pPolygon, PrimaryCurvature); 00529 00530 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&SecondaryCurvature); 00531 if (ok) ok = SetSecondaryCurvature(pPolygon, SecondaryCurvature); 00532 00533 if (ok) ok = pCXaraFileRecord->ReadPath(&(pPolygon->EdgePath1)); 00534 if (ok) ok = pCXaraFileRecord->ReadPath(&(pPolygon->EdgePath2)); 00535 00536 if (ok) ok = InvalidateCache(pPolygon); 00537 if (ok) ok = InsertNode(pPolygon); 00538 00539 return ok; 00540 }
|
|
Definition at line 278 of file rechpoly.cpp. 00279 { 00280 BOOL ok = TRUE; 00281 00282 NodeRegularShape * pPolygon; 00283 UINT16 NumberOfSides; 00284 DocCoord CentrePoint; 00285 DocCoord MajorAxis; 00286 DocCoord MinorAxis; 00287 double StellationRadius; 00288 double StellationOffset; 00289 00290 pPolygon = new NodeRegularShape; 00291 00292 if (ok) ok = SetupShape(pPolygon); 00293 if (ok) ok = SetIsStellated(pPolygon, TRUE); 00294 00295 if (ok) ok = pCXaraFileRecord->ReadUINT16(&NumberOfSides); 00296 if (ok) ok = SetNumberOfSides(pPolygon, NumberOfSides); 00297 00298 if (ok) ok = pCXaraFileRecord->ReadCoord(&CentrePoint); 00299 if (ok) ok = SetCentrePoint(pPolygon, CentrePoint); 00300 00301 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); 00302 if (ok) ok = SetMajorAxis(pPolygon, MajorAxis); 00303 00304 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); 00305 if (ok) ok = SetMinorAxis(pPolygon, MinorAxis); 00306 00307 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius); 00308 if (ok) ok = SetStellationRadius(pPolygon, StellationRadius); 00309 00310 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset); 00311 if (ok) ok = SetStellationOffset(pPolygon, StellationOffset); 00312 00313 if (ok) ok = InvalidateCache(pPolygon); 00314 if (ok) ok = InsertNode(pPolygon); 00315 00316 return ok; 00317 }
|
|
Definition at line 319 of file rechpoly.cpp. 00320 { 00321 BOOL ok = TRUE; 00322 00323 NodeRegularShape * pPolygon; 00324 UINT16 NumberOfSides; 00325 DocCoord MajorAxis; 00326 DocCoord MinorAxis; 00327 Matrix TransformMatrix; 00328 double StellationRadius; 00329 double StellationOffset; 00330 00331 pPolygon = new NodeRegularShape; 00332 00333 if (ok) ok = SetupShape(pPolygon); 00334 if (ok) ok = SetIsStellated(pPolygon, TRUE); 00335 00336 if (ok) ok = pCXaraFileRecord->ReadUINT16(&NumberOfSides); 00337 if (ok) ok = SetNumberOfSides(pPolygon, NumberOfSides); 00338 00339 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MajorAxis,0,0); 00340 if (ok) ok = SetMajorAxis(pPolygon, MajorAxis); 00341 00342 if (ok) ok = pCXaraFileRecord->ReadCoordTrans(&MinorAxis,0,0); 00343 if (ok) ok = SetMinorAxis(pPolygon, MinorAxis); 00344 00345 if (ok) ok = pCXaraFileRecord->ReadMatrix(&TransformMatrix); 00346 if (ok) ok = SetTransformMatrix(pPolygon, TransformMatrix); 00347 00348 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationRadius); 00349 if (ok) ok = SetStellationRadius(pPolygon, StellationRadius); 00350 00351 if (ok) ok = pCXaraFileRecord->ReadDOUBLE(&StellationOffset); 00352 if (ok) ok = SetStellationOffset(pPolygon, StellationOffset); 00353 00354 if (ok) ok = pCXaraFileRecord->ReadPath(&(pPolygon->EdgePath1)); 00355 if (ok) ok = pCXaraFileRecord->ReadPath(&(pPolygon->EdgePath2)); 00356 00357 if (ok) ok = InvalidateCache(pPolygon); 00358 if (ok) ok = InsertNode(pPolygon); 00359 00360 return ok; 00361 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|