home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 3.9 KB | 110 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWODGeom.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWODGEOM_H
- #define FWODGEOM_H
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CLASS_ATTR ODFrame;
- class FW_CLASS_ATTR ODShape;
- class FW_CLASS_ATTR ODTransform;
-
- class FW_CLASS_ATTR FW_CRect;
- class FW_CLASS_ATTR FW_CPoint;
-
- struct FW_CLASS_ATTR FW_SPlatformRect;
- struct FW_CLASS_ATTR FW_SPlatformPoint;
-
- //========================================================================================
- // Global Utilities
- //========================================================================================
-
- FW_FUNC_ATTR void FW_PrivCreateShapeTransformMaker(Environment *ev, ODFrame* odFrame);
-
- //########################################################################################
- // SCpp Hack
- // Work around SCpp 8.0.3 bug - importing overloaded functions doesn't work.
- // Replace overloaded functions with normal functions with different names.
- // Use inline overloaded functions which turn around and call the renamed
- // functions so client code isn't affected.
- //########################################################################################
-
- // ----- ODShape utilities -----
-
- FW_FUNC_ATTR ODShape* FW_NewODShape_Empty(Environment* ev);
- FW_FUNC_ATTR ODShape* FW_NewODShape_Shape(Environment *ev, ODShape* otherShape);
- FW_FUNC_ATTR ODShape* FW_NewODShape_Rect(Environment *ev, const FW_CRect& rect);
- FW_FUNC_ATTR ODShape* FW_NewODShape_PlatformRect(Environment *ev, const FW_SPlatformRect& rect);
- FW_FUNC_ATTR ODShape* FW_NewODShape_Region(Environment *ev, ODRgnHandle rgnHandleToAdopt);
-
- FW_FUNC_ATTR ODRgnHandle FW_GetShapeRegion(Environment *ev, ODShape* odShape);
- FW_FUNC_ATTR void FW_SetShapeRegion(Environment *ev, ODShape* odShape, ODRgnHandle rgnHandle);
-
- FW_FUNC_ATTR FW_CRect FW_GetShapeBoundingBox(Environment *ev, ODShape* odShape);
-
- // ----- ODTransform utilities -----
-
- FW_FUNC_ATTR ODTransform* FW_NewODTransform_Empty(Environment* ev);
- FW_FUNC_ATTR ODTransform* FW_NewODTransform_Transform(Environment *ev, ODTransform* otherTransform);
- FW_FUNC_ATTR ODTransform* FW_NewODTransform_Point(Environment *ev, const FW_CPoint& offset);
- FW_FUNC_ATTR ODTransform* FW_NewODTransform_Point2(Environment *ev, const FW_CPoint& offset, const FW_CPoint& scale);
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- // SCpp Hack
-
- inline ODShape* FW_NewODShape (Environment* ev) {
- return FW_NewODShape_Empty (ev);
- }
-
- inline ODShape* FW_NewODShape (Environment *ev, ODShape* otherShape) {
- return FW_NewODShape_Shape (ev, otherShape);
- }
-
- inline ODShape* FW_NewODShape (Environment *ev, const FW_CRect& rect) {
- return FW_NewODShape_Rect (ev, rect);
- }
-
- inline ODShape* FW_NewODShape (Environment *ev, const FW_SPlatformRect& rect) {
- return FW_NewODShape_PlatformRect (ev, rect);
- }
-
- inline ODShape* FW_NewODShape (Environment *ev, ODRgnHandle rgnHandleToAdopt) {
- return FW_NewODShape_Region (ev, rgnHandleToAdopt);
- }
-
-
- inline ODTransform* FW_NewODTransform (Environment* ev) {
- return FW_NewODTransform_Empty (ev);
- }
-
- inline ODTransform* FW_NewODTransform (Environment *ev, ODTransform* otherTransform) {
- return FW_NewODTransform_Transform (ev, otherTransform);
- }
-
- inline ODTransform* FW_NewODTransform (Environment *ev, const FW_CPoint& offset) {
- return FW_NewODTransform_Point (ev, offset);
- }
-
- inline ODTransform* FW_NewODTransform (Environment *ev, const FW_CPoint& offset, const FW_CPoint& scale) {
- return FW_NewODTransform_Point2 (ev, offset, scale);
- }
-
- #endif
-
-