summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@gnome.org>2006-07-01 02:58:49 +0000
committerJonathon Jongsma <jjongsma@gnome.org>2006-07-01 02:58:49 +0000
commit4e59f53f781df475fdab5c789e2be7c0316d47ff (patch)
tree69f46437dec365649333ec1626c8470ac792d0cc
parente840c2eb1834c3407d5505f6244639d1c4b2f41f (diff)
2006-06-30 Jonathon Jongsma <jonathon.jongsma@gmail.com>
* cairomm/xlib_surface.cc, cairomm/xlib_surface.h: add new get_height() and get_width() API to XlibSurface
-rw-r--r--ChangeLog5
-rw-r--r--cairomm/xlib_surface.cc14
-rw-r--r--cairomm/xlib_surface.h8
3 files changed, 27 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ffceb1b..6b16e38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-30 Jonathon Jongsma <jonathon.jongsma@gmail.com>
+
+ * cairomm/xlib_surface.cc, cairomm/xlib_surface.h: add new get_height() and
+ get_width() API to XlibSurface
+
2006-06-27 Jonathon Jongsma <jonathon.jongsma@gmail.com>
* cairomm/enums.h: Added enum types to support the new get_type() and SVG
diff --git a/cairomm/xlib_surface.cc b/cairomm/xlib_surface.cc
index d959be4..8514c9b 100644
--- a/cairomm/xlib_surface.cc
+++ b/cairomm/xlib_surface.cc
@@ -116,6 +116,20 @@ int XlibSurface::get_depth() const
return depth;
}
+int XlibSurface::get_height() const
+{
+ int h = cairo_xlib_surface_get_height(m_cobject);
+ check_object_status_and_throw_exception(*this);
+ return h;
+}
+
+int XlibSurface::get_width() const
+{
+ int w = cairo_xlib_surface_get_width(m_cobject);
+ check_object_status_and_throw_exception(*this);
+ return w;
+}
+
#endif // CAIRO_HAS_XLIB_SURFACE
} //namespace Cairo
diff --git a/cairomm/xlib_surface.h b/cairomm/xlib_surface.h
index 995dcc8..f09bbdd 100644
--- a/cairomm/xlib_surface.h
+++ b/cairomm/xlib_surface.h
@@ -124,6 +124,14 @@ public:
const Visual* get_visual() const;
int get_depth() const;
+ /** Get the height in pixels of the X Drawable underlying the surface
+ */
+ int get_height() const;
+
+ /** Get the width in pixels of the X Drawable underlying the surface
+ */
+ int get_width() const;
+
};
#endif // CAIRO_HAS_XLIB_SURFACE