/[paragui]/paragui/include/pgrect.h
ViewVC logotype

Diff of /paragui/include/pgrect.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3.6.1.2.1 by braindead, Mon Nov 24 09:17:21 2003 UTC revision 1.3.6.1.2.2 by braindead, Tue Dec 2 15:27:58 2003 UTC
# Line 29  Line 29 
29  #ifndef PG_RECT_H  #ifndef PG_RECT_H
30  #define PG_RECT_H  #define PG_RECT_H
31    
32  #ifdef SWIG  #include "SDL.h"
33  %include "swigcommon.h"  #include "pgpoint.h"
 %module pgrect  
 %include "pgrect.h"  
 #endif  
   
 #include "paragui.h"  
34    
35  /**  /**
36          @author Alexander Pipelka          @author Alexander Pipelka
# Line 125  public: Line 120  public:
120                  return ( (x <= p.x) && (p.x <= x + w) && (y <= p.y) && (p.y <= y + h) );                  return ( (x <= p.x) && (p.x <= x + w) && (y <= p.y) && (p.y <= y + h) );
121          }          }
122    
 #ifndef SWIG  
123          /**          /**
124          Intersect two rectangles          Intersect two rectangles
125          @param  p                                       reference rectangle          @param  p                                       reference rectangle
# Line 133  public: Line 127  public:
127          @return                                         resulting intersection rectangle          @return                                         resulting intersection rectangle
128          */          */
129          static PG_Rect IntersectRect(const PG_Rect& p, const PG_Rect& c);          static PG_Rect IntersectRect(const PG_Rect& p, const PG_Rect& c);
 #endif  
130    
131          /**          /**
132          Intersect two rectangles          Intersect two rectangles
# Line 175  public: Line 168  public:
168          \param p, c rectangles to check for overlap          \param p, c rectangles to check for overlap
169          \return true if the rectangles overlap, false otherwise          \return true if the rectangles overlap, false otherwise
170          */          */
 #ifndef SWIG  
171          inline bool OverlapRect(const PG_Rect& p, const PG_Rect& c) {          inline bool OverlapRect(const PG_Rect& p, const PG_Rect& c) {
172                  return !( (p.x + p.w < c.x) || (p.x > c.x + c.w) || (p.y + p.h < c.y) || (p.y > c.y + c.h)  || (p.IntersectRect(c).IsNull()) );                  return !( (p.x + p.w < c.x) || (p.x > c.x + c.w) || (p.y + p.h < c.y) || (p.y > c.y + c.h)  || (p.IntersectRect(c).IsNull()) );
173          }          }
 #endif  
174    
175          //! Check if this rectangle overlap another one          //! Check if this rectangle overlap another one
176          /*!          /*!
# Line 199  public: Line 190  public:
190                  return OverlapRect(*p, *this);                  return OverlapRect(*p, *this);
191          }          }
192                    
 #ifndef SWIG  
193          Sint16& my_xpos;          Sint16& my_xpos;
194          Sint16& my_ypos;          Sint16& my_ypos;
195          Uint16& my_width;          Uint16& my_width;
196          Uint16& my_height;          Uint16& my_height;
 #endif  
197  };  };
198    
199  #endif  // PG_RECT_H  #endif  // PG_RECT_H

Legend:
Removed from v.1.3.6.1.2.1  
changed lines
  Added in v.1.3.6.1.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26