diff options
author | Jonathon Jongsma <jjongsma@gnome.org> | 2010-12-30 16:47:13 -0600 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@gnome.org> | 2010-12-30 17:18:58 -0600 |
commit | cf1631b88225aff9fae2a0552ddb1f226c361ec3 (patch) | |
tree | dc2e639b47d3667b8f03cdb62d089b20ccebec8e | |
parent | 8439d62c975adca31c05f102c3570e09680d4bb4 (diff) |
Wrap Region::copy()
-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(); |