diff options
-rw-r--r-- | cairomm/region.cc | 5 | ||||
-rw-r--r-- | cairomm/region.h | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/cairomm/region.cc b/cairomm/region.cc index bbbeeb1..c361e40 100644 --- a/cairomm/region.cc +++ b/cairomm/region.cc @@ -55,6 +55,11 @@ RefPtr<Region> Region::create(const RectangleInt& rectangle) return RefPtr<Region>(new Region(rectangle)); } +RefPtr<Region> Region::copy() const +{ + return RefPtr<Region> (new Region (cairo_region_copy (m_cobject), true)); +} + Region::~Region() { if(m_cobject) diff --git a/cairomm/region.h b/cairomm/region.h index d4cf7db..4e4f400 100644 --- a/cairomm/region.h +++ b/cairomm/region.h @@ -57,9 +57,8 @@ public: static RefPtr<Region> create(); static RefPtr<Region> create(const RectangleInt& rectangle); -//TODO: -//cairo_public cairo_region_t * -//cairo_region_copy (const cairo_region_t *original); + /** allocates a new region object copied from the original */ + RefPtr<Region> copy() const; virtual ~Region(); |