home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.4 KB | 122 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWGXUtil.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWGXUTIL_H
- #define FWGXUTIL_H
-
- #ifndef FWGXCFG_H
- #include "FWGXCfg.h"
- #endif
-
- #ifdef FW_SUPPORT_GX // This file is only for QuickDraw GX
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWEXCDEF_H
- #include "FWExcDef.h"
- #endif
-
- #ifdef FWODEXCE_H
- #include "FWODExce.h"
- #endif
-
- #ifndef __GXTYPES__
- #include <GXTypes.h>
- #endif
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- struct Environment;
-
- class ODFrame;
- class ODShape;
- class ODFacet;
-
- //========================================================================================
- // Global functions
- //========================================================================================
-
- // General utils
-
- FW_Boolean FW_IsGXInstalled();
-
- void FW_Priv_GX_Initialize();
- void FW_Priv_GX_Terminate();
-
- //========================================================================================
- // class FW_CGraphicContextGX
- //========================================================================================
-
- class FW_CGraphicContextGX
- {
- // ----- Construction/destruction
-
- public:
- FW_DECLARE_AUTO(FW_CGraphicContextGX)
-
- FW_CGraphicContextGX(
- Environment* ev,
- ODFacet* facet,
- ODShape* invalidShape = NULL);
- virtual ~FW_CGraphicContextGX();
-
- // ----- Drawing
-
- public:
-
- void DrawShape(gxShape shape);
- gxTransform GetGXTransform() const;
-
- // ----- Implementation
-
- private:
- gxTransform fGXTransform;
- gxViewPort fGXViewPort;
-
- // -----
-
- gxMapping fMapping;
- gxMapping fOldMapping;
-
- void SetupTransformMapping(
- Environment* ev,
- ODFacet* facet);
-
- void RestoreTransformMapping();
-
- // -----
-
- gxShape fTransformClipOld;
-
- void SetupTransformClipping(
- Environment* ev,
- ODFacet* facet);
-
- void RestoreTransformClipping();
-
- // -----
-
- gxShape fViewPortClipOld;
-
- void SetupViewPortClipping(
- Environment* ev,
- ODFacet* facet,
- ODShape* invalidShape);
-
- void RestoreViewPortClipping();
- };
-
- #endif // FW_SUPPORT_GX
-
- #endif // FWGXUTIL_H
-