Make the names for the guards for ETL private headers consistent WRT the number of...
[synfig.git] / ETL / trunk / ETL / _rect.h
index d19959b..6f506a5 100644 (file)
@@ -1,7 +1,7 @@
 /*! ========================================================================
 ** Extended Template Library
 ** Rectangle Basic Class Implementation
 /*! ========================================================================
 ** Extended Template Library
 ** Rectangle Basic Class Implementation
-** $Id: _rect.h,v 1.1.1.1 2005/01/04 01:31:48 darco Exp $
+** $Id$
 **
 ** Copyright (c) 2002 Adrian Bentley
 **
 **
 ** Copyright (c) 2002 Adrian Bentley
 **
@@ -24,8 +24,8 @@
 
 /* === S T A R T =========================================================== */
 
 
 /* === S T A R T =========================================================== */
 
-#ifndef __ETL_RECT_H
-#define __ETL_RECT_H
+#ifndef __ETL__RECT_H
+#define __ETL__RECT_H
 
 /* === H E A D E R S ======================================================= */
 
 
 /* === H E A D E R S ======================================================= */
 
@@ -47,48 +47,48 @@ public: //type niceties
        typedef T       value_type;
 
 public: //representation
        typedef T       value_type;
 
 public: //representation
-       
+
        value_type      minx,maxx,miny,maxy;
 
 public: //interface
        value_type      minx,maxx,miny,maxy;
 
 public: //interface
-       
+
        rect() {}
        rect() {}
-       
+
        rect(const value_type &x1,const value_type &y1)
        {
                set_point(x1,y1);
        }
        rect(const value_type &x1,const value_type &y1)
        {
                set_point(x1,y1);
        }
-       
+
        rect(const value_type &x1,const value_type &y1,
                        const value_type &x2,const value_type &y2)
        {
                set_point(x1,y1);
                expand(x2,y2);
        }
        rect(const value_type &x1,const value_type &y1,
                        const value_type &x2,const value_type &y2)
        {
                set_point(x1,y1);
                expand(x2,y2);
        }
-       
+
        rect(const rect<T> &o)
        :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy)
        {}
        rect(const rect<T> &o)
        :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy)
        {}
-               
+
        template < typename U >
        rect(const rect<U> &o)
        :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy)
        {}
        template < typename U >
        rect(const rect<U> &o)
        :minx(o.minx),maxx(o.maxx),miny(o.miny),maxy(o.maxy)
        {}
-       
+
        void set_point(const value_type &x1,const value_type &y1)
        {
                minx = maxx = x1;
        void set_point(const value_type &x1,const value_type &y1)
        {
                minx = maxx = x1;
-               miny = maxy = y1;               
+               miny = maxy = y1;
        }
        }
-       
+
        void expand(const value_type &x1,const value_type &y1)
        {
                minx = std::min(minx,x1);
                maxx = std::max(maxx,x1);
                miny = std::min(miny,y1);
        void expand(const value_type &x1,const value_type &y1)
        {
                minx = std::min(minx,x1);
                maxx = std::max(maxx,x1);
                miny = std::min(miny,y1);
-               maxy = std::max(maxy,y1);               
+               maxy = std::max(maxy,y1);
        }
        }
-       
+
        void set(const value_type &x1,const value_type &y1,
                        const value_type &x2,const value_type &y2)
        {
        void set(const value_type &x1,const value_type &y1,
                        const value_type &x2,const value_type &y2)
        {
@@ -101,7 +101,7 @@ public: //interface
        {
                return valid(std::less<T>());
        }
        {
                return valid(std::less<T>());
        }
-       
+
        template < typename F >
        bool valid(const F & func) const
        {
        template < typename F >
        bool valid(const F & func) const
        {
@@ -113,18 +113,18 @@ template < typename T, typename F >
 inline bool intersect(const rect<T> &r1, const rect<T> &r2, const F & func)
 {
        /* We wan to do the edge compare test
 inline bool intersect(const rect<T> &r1, const rect<T> &r2, const F & func)
 {
        /* We wan to do the edge compare test
-                         |-----|       
+                         |-----|
                |------|         intersecting
                |------|         intersecting
-       
+
                |-----|
                                |-----| not intersecting
                |-----|
                                |-----| not intersecting
-       
+
                So we want to compare the mins of the one against the maxs of the other, and
                visa versa
                So we want to compare the mins of the one against the maxs of the other, and
                visa versa
-       
+
                by default (exclude edge sharing) less will not be true if they are equal...
        */
                by default (exclude edge sharing) less will not be true if they are equal...
        */
-       
+
        return func(r1.minx,r2.maxx) &&
            func(r2.minx,r1.maxx) &&
            func(r1.miny,r2.maxy) &&
        return func(r1.minx,r2.maxx) &&
            func(r2.minx,r1.maxx) &&
            func(r1.miny,r2.maxy) &&