Logo Search packages:      
Sourcecode: inkscape version File versions

Rect NR::Rect::union_bounds ( const Rect a,
const Rect b 
) [static]

Returns the smallest rectangle that encloses both rectangles.

returns the smallest rectangle containing both rectangles

Definition at line 214 of file nr-rect.cpp.

References _max, and _min.

                                                    {
      Rect r;
      for ( int i=0; i < 2 ; i++ ) {
            r._min[i] = MIN(a._min[i], b._min[i]);
            r._max[i] = MAX(a._max[i], b._max[i]);
      }
      return r;
}


Generated by  Doxygen 1.6.0   Back to index