home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.6 KB | 104 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: PRPoly.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PRPOLY_H
- #define PRPOLY_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef SLGRDEF_H
- #include "SLGrDef.h"
- #endif
-
- #ifndef SLPTRECT_H
- #include "SLPtRect.h"
- #endif
-
- #ifndef PRGRREF_H
- #include "PRGrRef.h"
- #endif
-
- //========================================================================================
- // Forward Class Declarations
- //========================================================================================
-
- struct FW_SPoint;
- struct FW_SRect;
- class ODTransform;
-
- //========================================================================================
- // class FW_CPrivPolygonRep
- //========================================================================================
-
- class FW_CPrivPolygonRep : public FW_CPrivGrRefObj
- {
- public:
- FW_DECLARE_AUTO(FW_CPrivPolygonRep)
-
- //----------------------------------------------------------------------------------------
- // Constructors/Destructors
- //
- public:
- FW_CPrivPolygonRep(long count, const FW_SPoint* points);
- FW_CPrivPolygonRep(FW_CReadableStream& stream);
- FW_CPrivPolygonRep(const FW_CPrivPolygonRep& poly);
-
- ~FW_CPrivPolygonRep();
-
- //----------------------------------------------------------------------------------------
- // Operations
- //
- public:
- void Transform(Environment *ev, ODTransform* transform);
- void InverseTransform(Environment *ev, ODTransform* transform);
-
- void Move(FW_Fixed deltaX, FW_Fixed deltaY);
- void MoveTo(FW_Fixed x, FW_Fixed y);
-
- void Inset(FW_Fixed x, FW_Fixed y);
-
- void GetBounds(FW_SRect& rect) const;
-
- void SetPoints(const FW_SPoint* points,
- long startIndex,
- long pointCount);
-
- void GetPoints(FW_SPoint* points,
- long startIndex,
- long pointCount) const;
-
- //----------------------------------------------------------------------------------------
- // Attributes
- //
- public:
- long GetCount() const;
- FW_SPoint* GetPoints() const;
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- void Write(FW_CWritableStream& stream) const;
- FW_Boolean IsEqual(const FW_CPrivPolygonRep* poly) const;
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- long fCount;
- FW_SPoint* fPoints;
-
- FW_SRect fBounds;
- FW_Boolean fValidBounds;
- };
-
- #endif
-