summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cairomm/enums.h19
-rw-r--r--cairomm/region.cc4
-rw-r--r--cairomm/region.h21
3 files changed, 22 insertions, 22 deletions
diff --git a/cairomm/enums.h b/cairomm/enums.h
index 230add7..4611c4a 100644
--- a/cairomm/enums.h
+++ b/cairomm/enums.h
@@ -170,25 +170,6 @@ typedef enum
TEXT_CLUSTER_FLAG_BACKWARD = CAIRO_TEXT_CLUSTER_FLAG_BACKWARD
} TextClusterFlags;
-//TODO: Documentation
-typedef enum
-{
- /**
- * Completely inside region
- */
- REGION_OVERLAP_IN = CAIRO_REGION_OVERLAP_IN,
-
- /**
- * Completely outside region
- */
- REGION_OVERLAP_OUT = CAIRO_REGION_OVERLAP_OUT,
-
- /**
- * Partly inside region
- */
- REGION_OVERLAP_PART = CAIRO_REGION_OVERLAP_PART
-} RegionOverlap;
-
/**
* A set of synthesis options to control how FreeType renders the glyphs for a
* particular font face.
diff --git a/cairomm/region.cc b/cairomm/region.cc
index 1a7ea56..c262889 100644
--- a/cairomm/region.cc
+++ b/cairomm/region.cc
@@ -131,9 +131,9 @@ bool Region::empty() const
return cairo_region_is_empty(m_cobject);
}
-RegionOverlap Region::contains_rectangle(const RectangleInt& rectangle) const
+Region::Overlap Region::contains_rectangle(const RectangleInt& rectangle) const
{
- return (RegionOverlap)cairo_region_contains_rectangle(m_cobject, &rectangle);
+ return (Overlap)cairo_region_contains_rectangle(m_cobject, &rectangle);
}
bool Region::contains_point(int x, int y) const
diff --git a/cairomm/region.h b/cairomm/region.h
index 686d3f1..0695094 100644
--- a/cairomm/region.h
+++ b/cairomm/region.h
@@ -50,6 +50,25 @@ private:
Region(const RectangleInt *rects, int count);
public:
+ //TODO: Documentation
+ enum class Overlap
+ {
+ /**
+ * Completely inside region
+ */
+ IN = CAIRO_REGION_OVERLAP_IN,
+
+ /**
+ * Completely outside region
+ */
+ OUT = CAIRO_REGION_OVERLAP_OUT,
+
+ /**
+ * Partly inside region
+ */
+ REGION_OVERLAP_PART = CAIRO_REGION_OVERLAP_PART
+ };
+
/** Create a C++ wrapper for the C instance. This C++ instance should then be given to a RefPtr.
* @param cobject The C instance.
* @param has_reference Whether we already have a reference. Otherwise, the constructor will take an extra reference.
@@ -85,7 +104,7 @@ public:
/** Checks whether @a rectangle is inside, outside, or partially contained in
* the region
*/
- RegionOverlap contains_rectangle(const RectangleInt& rectangle) const;
+ Overlap contains_rectangle(const RectangleInt& rectangle) const;
/** Checks whether (x,y) is contained in the region */
bool contains_point(int x, int y) const;