home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / warphead.zip / H / COMPSHPE.H < prev    next >
C/C++ Source or Header  |  1997-02-28  |  4KB  |  124 lines

  1. /* @(#)Z 1.6 os2/src/imaging/realshps/CompShpe.h, odimaging, od96os2, odos29646d 96/11/15 15:49:04 (96/08/23 01:42:18) */
  2. /*====START_GENERATED_PROLOG======================================
  3.  */
  4. /*
  5.  *   COMPONENT_NAME: odimaging
  6.  *
  7.  *   CLASSES:   CompositeShape
  8.  *
  9.  *   ORIGINS: 82,27
  10.  *
  11.  *
  12.  *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13.  *   All Rights Reserved
  14.  *   Licensed Materials - Property of IBM
  15.  *   US Government Users Restricted Rights - Use, duplication or
  16.  *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17.  *       
  18.  *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19.  *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20.  *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21.  *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22.  *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23.  *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24.  *   OR PERFORMANCE OF THIS SOFTWARE.
  25.  */
  26. /*====END_GENERATED_PROLOG========================================
  27.  */
  28.  
  29. /*
  30.   File:    CompShpe.h
  31.  
  32.   Contains:  CompositeShape class, private to ODShape.
  33.  
  34.   Written by:  Chuck Dumont
  35.  
  36. */
  37.  
  38. #ifndef _COMPSHPE_
  39. #define _COMPSHPE_
  40.  
  41. #ifndef _ODTYPES_
  42. #include "ODTypes.h"
  43. #endif
  44.  
  45. #ifndef _PLFMDEF_
  46. #include "PlfmDef.h"
  47. #endif
  48.  
  49. #ifndef _REALSHPE_
  50. #include "RealShpe.h"    // Base class
  51. #endif
  52.  
  53. //==============================================================================
  54. // CompositeShape
  55. //==============================================================================
  56.  
  57. ODGeometryMode     GetMode( RealShape*, RealShape* );
  58.  
  59.  
  60. class CompositeShape :public RealShape {
  61.   public:
  62.  
  63.     CompositeShape( RealShape* shap1, RealShape* shap2, ODShapeOp oper );
  64.     ~CompositeShape( );
  65.  
  66.     ODVMethod ODSize Purge(ODSize size);    // Can't purge rgn!
  67.  
  68.     ODVMethod void      GetBoundingBox( Environment*, ODRect *bounds );
  69.     ODVMethod void      GetPesimisticBoundingBox( Environment*, ODRect *bounds );
  70.     ODVMethod RealShape*  SetRectangle( const ODRect *rect );
  71.     ODVMethod void      CopyPolygon( Environment*, ODPolygon& );
  72.     ODVMethod RealShape*  SetPolygon( const ODPolygon& );
  73.  
  74.     ODVMethod ODBoolean  IsSameAs(Environment*, RealShape* compareShape);
  75.     ODVMethod ODBoolean  IsEmpty( Environment* );
  76.     ODVMethod ODBoolean  IsObviousEmpty( Environment* );
  77.     ODVMethod ODBoolean  ContainsPoint(Environment*, ODPoint point);
  78.     ODVMethod ODBoolean  IsRectangular( Environment* );
  79.     ODVMethod ODBoolean  IsObviousRectangular( Environment* );
  80.     ODVMethod ODBoolean  HasGeometry( );
  81.  
  82.     ODVMethod RealShape*  Copy( Environment* );
  83.  
  84.     ODVMethod RealShape*  Transform(Environment*, ODTransform* transform);
  85.     ODVMethod RealShape*  Outset(Environment*, ODCoordinate distance);
  86.     ODVMethod RealShape*  Subtract(Environment*, RealShape* diffShape);
  87.     ODVMethod RealShape*  Intersect(Environment*, RealShape* sectShape);
  88.     ODVMethod RealShape*  Union(Environment*, RealShape* sectShape);
  89.  
  90. //  ODBoolean HasRectangles( Environment* );
  91. //  const ODRectangles& GetRectangles( Environment* );
  92.  
  93.   protected:
  94.  
  95. //  void InitRectangles( Environment* );
  96.  
  97.     void InitQDRegion(Environment*);
  98.     void InitQDPoly(Environment*);
  99.     CompositeShape(  RealShape* shap1, RealShape* shap2, ODShapeOp oper,
  100.                                     ODPolygon fpoly, ODRgnHandle fQDReg);
  101.  
  102.     ODVMethod ODPlatformShape GetPlatformShape(Environment*, ODGraphicsSystem);
  103.  
  104.     virtual RealShape*    Clear( );
  105.  
  106.     RealShape* shape1;
  107.     RealShape* shape2;
  108.     ODShapeOp op;
  109.     ODPolygon        fPolygon;      // Cached equivalent polygon
  110.     ODTransform* fPolygonTransform;
  111.     ODTransform* fRgnTransform;
  112.     ODRect bbox;
  113.     ODBoolean bboxValid;
  114. };
  115.  
  116.  
  117. #endif /*_COMPSHPE_*/
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.