From cc99d6a9d32a28861292b56217339c0f6df9362e Mon Sep 17 00:00:00 2001 From: Jonathon Jongsma Date: Thu, 30 Dec 2010 17:27:18 -0600 Subject: Wrap cairo_region_xor_* --- cairomm/region.cc | 12 ++++++++++++ cairomm/region.h | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/cairomm/region.cc b/cairomm/region.cc index 1233f2c..55b6154 100644 --- a/cairomm/region.cc +++ b/cairomm/region.cc @@ -182,6 +182,18 @@ void Region::do_union(const RectangleInt& rectangle) check_status_and_throw_exception (status); } +void Region::do_xor(const RefPtr& other) +{ + ErrorStatus status = cairo_region_xor(m_cobject, (other ? other->cobj() : 0)); + check_status_and_throw_exception (status); +} + +void Region::do_xor(const RectangleInt& rectangle) +{ + ErrorStatus status = cairo_region_xor_rectangle(m_cobject, &rectangle); + check_status_and_throw_exception (status); +} + } //namespace Cairo diff --git a/cairomm/region.h b/cairomm/region.h index 67b891b..37d7b21 100644 --- a/cairomm/region.h +++ b/cairomm/region.h @@ -92,6 +92,10 @@ public: void do_union(const RectangleInt& rectangle); + void do_xor(const RefPtr& other); + + void do_xor(const RectangleInt& rectangle); + typedef cairo_region_t cobject; -- cgit v1.2.3