home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Shape.cpp
-
- Contains: ODShape class (Macintosh subclass of ODBaseShape)
-
- Owned by: Jens Alfke
-
- Copyright: © 1994 - 1995 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <8> 8/26/95 TÇ 1257260 Remove somInit methods. Don't call
- IsInitialized
- <7> 3/20/95 jpa SOM_CATCH --> SOM_TRY [1224355]
- <6> 12/5/94 jpa Call Simplify after SetPolygon. Removed
- some test code.
- <5> 11/28/94 SS Merged MacTech branch changes (1198242)
- <4> 8/17/94 jpa Function prefixes. [1181512]
- <3> 7/26/94 jpa Added somInit so it could initialize gGX
- flag.
- <2> 6/20/94 jpa Filled in method implementations.
- <1> 6/15/94 jpa first checked in
-
- To Do:
- In Progress:
- */
-
-
- #define ODShape_Class_Source
- #include <Shape.xih>
-
- #ifndef _ODMEMORY_
- #include "ODMemory.h"
- #endif
-
- #ifndef _EXCEPT_
- #include "Except.h"
- #endif
-
- //------------------------------------------------------------------------------
- // InitShape
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODShape__InitShape(ODShape *somSelf, Environment *ev)
- {
- /* ODShapeData *somThis = ODShapeGetData(somSelf); */
- ODShapeMethodDebug("ODShape","InitShape");
-
- SOM_TRY
- somSelf->InitBaseShape(ev);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- }
-
- //------------------------------------------------------------------------------
- // GetQDRegion
- //------------------------------------------------------------------------------
-
- SOM_Scope ODRgnHandle SOMLINK ODShape__GetQDRegion(ODShape *somSelf, Environment *ev)
- {
- /* ODShapeData *somThis = ODShapeGetData(somSelf); */
- ODShapeMethodDebug("ODShape","GetQDRegion");
-
- SOM_TRY
- return (RgnHandle) somSelf->GetPlatformShape(ev,kODQuickDraw);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- return kODNULL;
- }
-
- //------------------------------------------------------------------------------
- // SetQDRegion
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODShape__SetQDRegion(ODShape *somSelf, Environment *ev,
- ODRgnHandle rgn)
- {
- /* ODShapeData *somThis = ODShapeGetData(somSelf); */
- ODShapeMethodDebug("ODShape","SetQDRegion");
-
- SOM_TRY
- somSelf->SetPlatformShape(ev,kODQuickDraw,(ODPlatformShape)rgn);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- }
-
- //------------------------------------------------------------------------------
- // GetGXShape
- //------------------------------------------------------------------------------
-
- SOM_Scope ODgxShape SOMLINK ODShape__GetGXShape(ODShape *somSelf, Environment *ev)
- {
- /* ODShapeData *somThis = ODShapeGetData(somSelf); */
- ODShapeMethodDebug("ODShape","GetGXShape");
-
- SOM_TRY
- return (gxShape) somSelf->GetPlatformShape(ev,kODQuickDrawGX);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- return kODNULL;
- }
-
- //------------------------------------------------------------------------------
- // SetGXShape
- //------------------------------------------------------------------------------
-
- SOM_Scope void SOMLINK ODShape__SetGXShape(ODShape *somSelf, Environment *ev,
- ODgxShape s)
- {
- /* ODShapeData *somThis = ODShapeGetData(somSelf); */
- ODShapeMethodDebug("ODShape","SetGXShape");
-
- SOM_TRY
- somSelf->SetPlatformShape(ev,kODQuickDrawGX,(ODPlatformShape)s);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- }
-
- //------------------------------------------------------------------------------
- // CopyQDRegion
- //------------------------------------------------------------------------------
-
- SOM_Scope ODRgnHandle SOMLINK ODShape__CopyQDRegion(ODShape *somSelf, Environment *ev)
- {
- /* ODShapeData *somThis = ODShapeGetData(somSelf); */
- ODShapeMethodDebug("ODShape","CopyQDRegion");
-
- SOM_TRY
-
- ODHandle rgn = (ODHandle) somSelf->GetPlatformShape(ev,kODQuickDraw);
- return (RgnHandle) ODCopyHandle(rgn);
-
- SOM_CATCH_ALL
- SOM_ENDTRY
- return kODNULL;
- }
-