Logo Search packages:      
Sourcecode: inkscape version File versions

Point NR::Rect::corner ( unsigned  i  )  const

returns the four corners of the rectangle in order (clockwise if +Y is up, anticlockwise if +Y is down)

returns the four corners of the rectangle in the correct winding order

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

                                   {
      switch (i % 4) {
      case 0:
            return _min;
      case 1:
            return Point(_max[X], _min[Y]);
      case 2:
            return _max;
      default: /* i.e. 3 */
            return Point(_min[X], _max[Y]);
      }
}


Generated by  Doxygen 1.6.0   Back to index