summaryrefslogtreecommitdiffstats
path: root/src/2geom/generic-interval.h
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-07-22 02:09:27 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-07-22 02:09:27 +0000
commit328fad57dbfb65e3bd31062021d5cc3081e68515 (patch)
tree55b02cfb325a87d994fefb0e4ea88311812e9444 /src/2geom/generic-interval.h
parentClean up some commented-out code (diff)
downloadinkscape-328fad57dbfb65e3bd31062021d5cc3081e68515.tar.gz
inkscape-328fad57dbfb65e3bd31062021d5cc3081e68515.zip
Replace direct use of Cairo contexts and surfaces in the rendering tree
with wrappers which keep some extra information about the surface, amd NRRect and NRRectL use with Geom::Rect and Geom::IntRect. Should simplify implementing filter primitive subregions. (bzr r10347.1.17)
Diffstat (limited to 'src/2geom/generic-interval.h')
-rw-r--r--src/2geom/generic-interval.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/2geom/generic-interval.h b/src/2geom/generic-interval.h
index d719c16c8..a32e97d4b 100644
--- a/src/2geom/generic-interval.h
+++ b/src/2geom/generic-interval.h
@@ -106,11 +106,11 @@ public:
/// @{
/** @brief Check whether the interval includes this number. */
bool contains(C val) const {
- return CoordTraits<C>::contains(min(), max(), val, val);
+ return min() <= val && val <= max();
}
/** @brief Check whether the interval includes the given interval. */
bool contains(Self const &val) const {
- return CoordTraits<C>::contains(min(), max(), val.min(), val.max());
+ return min() <= val.min() && val.max() <= max();
}
/** @brief Check whether the intervals have any common elements. */
bool intersects(Self const &val) const {