diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-09-16 01:27:54 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-09-16 01:27:54 +0000 |
| commit | 07eaeb8f391513dad456cc4d1a5939d2bb2f9c65 (patch) | |
| tree | f2c503eaba0bf3ad33cd39fa78cccf281fa03e06 /src/2geom/region.h | |
| parent | add verticalpattern checkbox to path-along-path and some parameters that are ... (diff) | |
| download | inkscape-07eaeb8f391513dad456cc4d1a5939d2bb2f9c65.tar.gz inkscape-07eaeb8f391513dad456cc4d1a5939d2bb2f9c65.zip | |
merge in 2geom rev. 1154
(bzr r3756)
Diffstat (limited to 'src/2geom/region.h')
| -rw-r--r-- | src/2geom/region.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/2geom/region.h b/src/2geom/region.h index 4b434f1e5..e7eaa808b 100644 --- a/src/2geom/region.h +++ b/src/2geom/region.h @@ -34,12 +34,17 @@ class Region { if(!box) box = boost::optional<Rect>(boundary.boundsFast()); return *box; } + bool contains(Point const &p) const { if(box && !box->contains(p)) return false; return Geom::contains(boundary, p); } bool contains(Region const &other) const { return contains(other.boundary.initialPoint()); } + bool includes(Point const &p) const { + return logical_xor(!fill, contains(p)); + } + Region inverse() const { return Region(boundary.reverse(), box, !fill); } Region operator*(Matrix const &m) const; |
