Logo Search packages:      
Sourcecode: inkscape version File versions

Point Geom::D2< Interval >::corner ( unsigned  i  )  const [inline]

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

Definition at line 88 of file rect.h.

References Geom::max(), and Geom::min().

Referenced by Inkscape::Text::Layout::createSelectionShape().

                                   {
        switch(i % 4) {
            case 0:  return Point(f[X].min(), f[Y].min());
            case 1:  return Point(f[X].max(), f[Y].min());
            case 2:  return Point(f[X].max(), f[Y].max());
            default: return Point(f[X].min(), f[Y].max());
        }
    }


Generated by  Doxygen 1.6.0   Back to index