1 #include <libnr/nr-rect-l.h>
3 boost::optional<NR::Rect> NRRectL::upgrade() const {
4 if (nr_rect_l_test_empty_ptr(this)) {
5 return boost::optional<NR::Rect>();
6 } else {
7 return NR::Rect(NR::Point(x0, y0), NR::Point(x1, y1));
8 }
9 }
11 namespace NR {
13 IRect::IRect(Rect const &r) :
14 _min(int(floor(r.min()[X])), int(floor(r.min()[Y]))),
15 _max(int(ceil(r.min()[X])), int(ceil(r.min()[Y])))
16 {
17 }
19 }
21 /*
22 Local Variables:
23 mode:c++
24 c-file-style:"stroustrup"
25 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
26 indent-tabs-mode:nil
27 fill-column:99
28 End:
29 */
30 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :