home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 3.4 KB | 120 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWPat.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWPAT_H
- #define FWPAT_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWCOLOR_H
- #include "FWColor.h"
- #endif
-
- #ifndef SLSHATTR_H
- #include "SLShAttr.h"
- #endif
-
- #ifndef FWGRREF_H
- #include "FWGrRef.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CReadableStream;
- class FW_CWritableStream;
-
- //========================================================================================
- // CLASS FW_CPattern
- //========================================================================================
-
- class FW_CPattern : public FW_TGrRefPtr<FW_HPattern>
- {
- public:
-
- FW_DECLARE_AUTO(FW_CPattern)
-
- FW_CPattern();
- FW_CPattern(const FW_CPattern& other);
- FW_CPattern(FW_HPattern rep);
- FW_CPattern(const FW_BitPattern& bits);
- FW_CPattern(const FW_PixelPattern& pixels, short nbColors, const FW_CColor* colorTable);
- FW_CPattern(FW_PlatformColorPattern pattern);
-
- ~FW_CPattern();
-
- FW_CPattern& operator=(const FW_CPattern& other);
- FW_CPattern& operator=(const FW_BitPattern& bits);
-
- FW_Boolean operator==(const FW_CPattern& pattern) const;
- FW_Boolean operator!=(const FW_CPattern& pattern) const;
-
- // ----- Delegation
- FW_CPattern Copy() const;
-
- FW_Boolean IsEqual(const FW_CPattern& pattern) const;
-
- long GetRefCount() const;
-
- void Invert();
-
- void FlipHorizontally();
- void FlipVertically();
-
- void ShiftUp();
- void ShiftDown();
- void ShiftLeft();
- void ShiftRight();
-
- friend FW_CReadableStream& operator>>(FW_CReadableStream& stream, FW_CPattern& pattern);
- friend FW_CWritableStream& operator<<(FW_CWritableStream& stream, const FW_CPattern& pattern);
- };
-
- //----------------------------------------------------------------------------------------
- // FW_CPattern::operator==
- //----------------------------------------------------------------------------------------
-
- inline FW_Boolean FW_CPattern::operator==(const FW_CPattern& pattern) const
- {
- return FW_PrivPattern_IsEqual(fRep, pattern.fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPattern::operator!=
- //----------------------------------------------------------------------------------------
-
- inline FW_Boolean FW_CPattern::operator!=(const FW_CPattern& pattern) const
- {
- return !FW_PrivPattern_IsEqual(fRep, pattern.fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPattern::IsEqual
- //----------------------------------------------------------------------------------------
-
- inline FW_Boolean FW_CPattern::IsEqual(const FW_CPattern& pattern) const
- {
- return FW_PrivPattern_IsEqual(fRep, pattern.fRep);
- }
-
- //----------------------------------------------------------------------------------------
- // FW_CPattern::GetRefCount
- //----------------------------------------------------------------------------------------
-
- inline long FW_CPattern::GetRefCount() const
- {
- return FW_PrivPattern_GetRefCount(fRep);
- }
-
-
- #endif
-