home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.8 KB | 101 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWPoly.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWPOLY_H
- #define FWPOLY_H
-
- #ifndef FWFXMATH_H
- #include "FWFxMath.h"
- #endif
-
- #ifndef SLPOLY_H
- #include "SLPoly.h"
- #endif
-
- #ifndef FWGRREF_H
- #include "FWGrRef.h"
- #endif
-
- //========================================================================================
- // Forward Class Declarations
- //========================================================================================
-
- class FW_CReadableStream;
- class FW_CWritableStream;
-
- //========================================================================================
- // class FW_CPolygon
- //========================================================================================
-
- class FW_CPolygon : public FW_TGrRefPtr<FW_HPolygon>
- {
- public:
- FW_DECLARE_AUTO(FW_CPolygon)
-
- FW_CPolygon();
- FW_CPolygon(long count, const FW_SPoint* points);
- FW_CPolygon(FW_CReadableStream& stream);
-
- FW_CPolygon Copy() const;
-
- ~FW_CPolygon();
-
- FW_CPolygon(const FW_CPolygon& other);
- FW_CPolygon& operator=(const FW_CPolygon& other);
-
- friend FW_CWritableStream& operator << (FW_CWritableStream& stream, const FW_CPolygon& poly);
- friend FW_CReadableStream& operator >> (FW_CReadableStream& stream, FW_CPolygon& poly);
-
- // Delegation
-
- void Transform(Environment *ev, ODTransform* transform)
- { FW_PrivPolygon_Transform(fRep, ev, transform); FW_FailOnEvError(ev); }
-
- void InverseTransform(Environment *ev, ODTransform* transform)
- { FW_PrivPolygon_InverseTransform(fRep, ev, transform); FW_FailOnEvError(ev); }
-
- void Move(FW_Fixed deltaX, FW_Fixed deltaY)
- { FW_PrivPolygon_Move(fRep, deltaX, deltaY); }
-
- void MoveTo(FW_Fixed x, FW_Fixed y)
- { FW_PrivPolygon_MoveTo(fRep, x, y); }
-
- void Inset(FW_Fixed x, FW_Fixed y)
- { FW_PrivPolygon_Inset(fRep, x, y); }
-
- void GetBounds(FW_SRect& rect) const
- { FW_PrivPolygon_GetBounds(fRep, rect); }
-
- void SetPoints(
- const FW_SPoint* points,
- long startIndex,
- long pointCount)
- {FW_FailOnError(FW_PrivPolygon_SetPoints(fRep, points, startIndex, pointCount)); }
-
- void GetPoints(
- FW_SPoint* points,
- long startIndex,
- long pointCount) const
- { FW_FailOnError(FW_PrivPolygon_GetPoints(fRep, points, startIndex, pointCount)); }
-
- long GetCount() const
- { return FW_PrivPolygon_GetCount(fRep); }
-
- const FW_SPoint* GetPoints() const
- { return FW_PrivPolygon_GetPointArray(fRep); }
-
- FW_SPoint* GetPoints()
- { return FW_PrivPolygon_GetPointArray(fRep); }
-
- FW_Boolean IsEqual(const FW_CPolygon& other) const
- { return FW_PrivPolygon_IsEqual(fRep, other.fRep); }
- };
-
- #endif
-