Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

plrect.h

Go to the documentation of this file.
00001 /*
00002 /--------------------------------------------------------------------
00003 |
00004 |      $Id: plrect.h,v 1.1 2004/05/21 21:02:53 maxx Exp $
00005 |
00006 |      Copyright (c) 1996-1998 Ulrich von Zadow
00007 |
00008 \--------------------------------------------------------------------
00009 */
00010 
00011 #ifndef INCL_PLRECT
00012 #define INCL_PLRECT
00013 
00014 #include "plpoint.h"
00015 
00017 class PLRect
00018 {
00019 public:
00020   PLPoint tl;
00021   PLPoint br;
00022 
00024   PLRect
00025   ();
00026 
00028   PLRect
00029   ( int left,
00030     int top,
00031     int right,
00032     int bottom
00033   );
00034 
00036   PLRect
00037   ( const PLPoint& TL,
00038     const PLPoint& BR
00039   );
00040 
00042   bool operator ==
00043   ( const PLRect & rect
00044   ) const;
00045 
00047   bool operator !=
00048   ( const PLRect & rect
00049   ) const;
00050 
00052   int Width 
00053   () const;
00054 
00056   int Height
00057   () const;
00058 
00059 };
00060 
00061 inline PLRect::PLRect
00062 ()
00063 {}
00064 
00065 inline PLRect::PLRect
00066   ( const PLPoint& TL,
00067     const PLPoint& BR
00068   ): tl(TL), br(BR)
00069 {}
00070 
00071 inline PLRect::PLRect
00072   ( int left,
00073     int top,
00074     int right,
00075     int bottom
00076   ) : tl(left, top), 
00077       br (right, bottom)
00078 {}
00079 
00080 inline bool PLRect::operator ==
00081 ( const PLRect & rect
00082 ) const
00083 {
00084   return (tl == rect.tl && br == rect.br);
00085 }
00086 
00087 inline bool PLRect::operator !=
00088 ( const PLRect & rect
00089 ) const
00090 {
00091   return !(rect==*this);
00092 }
00093 
00094 inline int PLRect::Width 
00095 () const
00096 {
00097   return br.x-tl.x;
00098 }
00099 
00100 inline int PLRect::Height
00101 () const
00102 {
00103   return br.y-tl.y;
00104 }
00105 
00106 #endif
00107 
00108 /*
00109 /--------------------------------------------------------------------
00110 |
00111 |      $Log: plrect.h,v $
00112 |      Revision 1.1  2004/05/21 21:02:53  maxx
00113 |      Initial Version of vuVolume, moderatly changed to make it compile on my windows and linux machine.
00114 |
00115 |      Revision 1.1  2002/11/13 01:58:22  mspindle
00116 |      *** empty log message ***
00117 |
00118 |      Revision 1.2  2001/09/28 19:50:56  uzadow
00119 |      Added some 24 bpp stuff & other minor features.
00120 |
00121 |      Revision 1.1  2001/09/24 14:24:52  uzadow
00122 |      Added PLRect.
00123 |
00124 |      Revision 1.4  2001/09/16 19:03:22  uzadow
00125 |      Added global name prefix PL, changed most filenames.
00126 |
00127 |      Revision 1.3  2000/11/21 20:20:36  uzadow
00128 |      Changed bool to bool.
00129 |
00130 |      Revision 1.2  2000/01/10 23:52:59  Ulrich von Zadow
00131 |      Changed formatting & removed tabs.
00132 |
00133 |      Revision 1.1  1999/12/09 16:35:58  Ulrich von Zadow
00134 |      Added PLRect.
00135 |
00136 |
00137 \--------------------------------------------------------------------
00138 */

Generated on Wed Dec 15 21:20:30 2004 for vuVolume by  doxygen 1.3.9.1