home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / SLPoly.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  3.1 KB  |  114 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLPoly.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef SLPOLY_H
  11. #define SLPOLY_H
  12.  
  13. #ifndef FWSTDDEF_H
  14. #include "FWStdDef.h"
  15. #endif
  16.  
  17. #ifndef SLGRDEF_H
  18. #include "SLGrDef.h"
  19. #endif
  20.  
  21. #ifndef SLPTRECT_H
  22. #include "SLPtRect.h"
  23. #endif
  24.  
  25. #ifndef SLSTRMRW_H
  26. #include "SLStrmRW.h"
  27. #endif
  28.  
  29. //========================================================================================
  30. //    Forward Declarations
  31. //========================================================================================
  32.  
  33. class ODTransform;
  34.  
  35. //========================================================================================
  36. // Polygon
  37. //========================================================================================
  38.  
  39. class FW_CPrivPolygonRep;
  40. typedef FW_CPrivPolygonRep* FW_HPolygon;
  41.  
  42. // Export or Import functions for CFM-68K [sfu]
  43.  
  44. #if defined(FW_ODFLIB_IMPORT)
  45. #pragma import on
  46. #elif defined(FW_ODFLIB)
  47. #pragma export on
  48. #endif
  49.  
  50. FW_EXTERN_C_BEGIN
  51.  
  52. // Creation
  53.  
  54. FW_HPolygon            SL_API    FW_PrivPolygon_CreateFromPoints(
  55.                                 long                 count,
  56.                                 const FW_SPoint*     points,
  57.                                 FW_PlatformError*     error);
  58.  
  59. FW_HPolygon            SL_API    FW_PrivPolygon_Copy(FW_HPolygon poly, FW_PlatformError* error);
  60.  
  61. // Reference counting
  62.  
  63. void                SL_API    FW_PrivPolygon_Acquire(FW_HPolygon poly);
  64. long                SL_API    FW_PrivPolygon_GetRefCount(FW_HPolygon poly);
  65. void                SL_API    FW_PrivPolygon_Release(FW_HPolygon poly);
  66.  
  67. // Geometric Operations
  68.  
  69. void                SL_API    FW_PrivPolygon_Transform(FW_HPolygon poly, Environment *ev, ODTransform* transform);
  70. void                SL_API    FW_PrivPolygon_InverseTransform(FW_HPolygon poly, Environment *ev, ODTransform* transform);
  71.  
  72. FW_PlatformError    SL_API    FW_PrivPolygon_Move(FW_HPolygon poly, FW_Fixed deltaX, FW_Fixed deltaY);
  73. FW_PlatformError    SL_API    FW_PrivPolygon_MoveTo(FW_HPolygon poly, FW_Fixed x, FW_Fixed y);
  74.  
  75. FW_PlatformError    SL_API    FW_PrivPolygon_Inset(FW_HPolygon poly, FW_Fixed x, FW_Fixed y);
  76.  
  77. FW_PlatformError    SL_API    FW_PrivPolygon_GetBounds(FW_HPolygon poly, FW_SRect& rect);
  78.  
  79. // Point access
  80.  
  81. FW_PlatformError    SL_API    FW_PrivPolygon_SetPoints(
  82.                                 FW_HPolygon         poly,
  83.                                 const FW_SPoint*     points,
  84.                                 long                 startIndex,
  85.                                 long                 pointCount);
  86.  
  87. FW_PlatformError    SL_API    FW_PrivPolygon_GetPoints(
  88.                                 FW_HPolygon         poly,
  89.                                 FW_SPoint*             points,
  90.                                 long                 startIndex,
  91.                                 long                 pointCount);
  92.  
  93. long                SL_API    FW_PrivPolygon_GetCount(FW_HPolygon poly);
  94. FW_SPoint*            SL_API    FW_PrivPolygon_GetPointArray(FW_HPolygon poly);
  95.  
  96. FW_Boolean            SL_API    FW_PrivPolygon_IsEqual(FW_HPolygon poly, FW_HPolygon poly2);
  97.     
  98. // Streaming
  99.  
  100. void                SL_API    FW_PrivPolygon_Write(FW_HPolygon poly, FW_HWritableStream stream, FW_PlatformError* error);
  101. FW_HPolygon         SL_API    FW_PrivPolygon_Read(FW_HReadableStream stream, FW_PlatformError* error);
  102.  
  103. FW_EXTERN_C_END
  104.  
  105. // For CFM-68K [sfu]
  106.  
  107. #if defined(FW_ODFLIB_IMPORT)
  108. #pragma import off
  109. #elif defined(FW_ODFLIB)
  110. #pragma export off
  111. #endif
  112.  
  113. #endif // SLPOLY_H
  114.