7 #ifndef PXR_BASE_GF_RECT2I_H 
    8 #define PXR_BASE_GF_RECT2I_H 
   52         : _min(min), _max(max)
 
   59         : _min(min), _max(min + 
GfVec2i(width-1, height-1))
 
  172         return (_min + _max) / 2;
 
  177         _min += displacement;
 
  178         _max += displacement;
 
  196         return (_max[0] - _min[0]) + 1;
 
  204         return (_max[1] - _min[1]) + 1;
 
  215                                     GfMax(_min[1], that._min[1])),
 
  217                                     GfMin(_max[1], that._max[1])));
 
  234                                     GfMin(_min[1], that._min[1])),
 
  236                                     GfMax(_max[1], that._max[1])));
 
  247         return ((p[0] >= _min[0]) && (p[0] <= _max[0]) &&
 
  248                 (p[1] >= _min[1]) && (p[1] <= _max[1]));
 
  257         return r1._min == r2._min && r1._max == r2._max;
 
void SetMax(const GfVec2i &max)
Sets the max corner of the rectangle. 
 
GfRect2i(const GfVec2i &min, const GfVec2i &max)
Constructs a rectangle with min and max corners. 
 
const GfVec2i & GetMax() const 
Returns the max corner of the rectangle. 
 
GfRect2i operator+=(const GfRect2i &that)
 
unsigned long GetArea() const 
Return the area of the rectangle. 
 
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
 
friend size_t hash_value(const GfRect2i &r)
 
friend bool operator!=(const GfRect2i &r1, const GfRect2i &r2)
Returns true if r1 and r2 are different. 
 
void Translate(const GfVec2i &displacement)
Move the rectangle by displ. 
 
GLint GLsizei GLsizei height
 
GfRect2i Intersect(const GfRect2i &that) const 
 
GfRect2i()
Constructs an empty rectangle. 
 
GfVec2i GetCenter() const 
Returns the center point of the rectangle. 
 
GF_API std::ostream & operator<<(std::ostream &, const GfRect2i &)
 
GfRect2i Union(const GfRect2i &that) const 
 
static size_t Combine(Args &&...args)
Produce a hash code by combining the hash codes of several objects. 
 
GfVec2i GetSize() const 
Returns the size of the rectangle as a vector (width,height). 
 
friend GfRect2i operator+(const GfRect2i r1, const GfRect2i &r2)
 
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
 
GfRect2i GetUnion(const GfRect2i &that) const 
Computes the union of two rectangles. 
 
bool IsValid() const 
Return true if the rectangle is valid (equivalently, not empty). 
 
bool Contains(const GfVec2i &p) const 
Returns true if the specified point in the rectangle. 
 
void SetMaxX(int x)
Set the X value of the max corner. 
 
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
 
#define PXR_NAMESPACE_CLOSE_SCOPE
 
friend bool operator==(const GfRect2i &r1, const GfRect2i &r2)
Returns true if r1 and r2 are equal. 
 
const GfVec2i & GetMin() const 
Returns the min corner of the rectangle. 
 
GfRect2i GetIntersection(const GfRect2i &that) const 
Computes the intersection of two rectangles. 
 
void SetMaxY(int y)
Set the Y value of the max corner. 
 
GF_API GfRect2i GetNormalized() const 
 
void SetMin(const GfVec2i &min)
Sets the min corner of the rectangle. 
 
GfRect2i(const GfVec2i &min, int width, int height)
 
int GetMaxY() const 
Return the Y value of the max corner.