[cairo-commit] cairomm/cairomm xlib_surface.cc, 1.4,
1.5 xlib_surface.h, 1.4, 1.5
Jonathon Jongsma
commit at pdx.freedesktop.org
Fri Jun 30 19:58:51 PDT 2006
Committed by: jjongsma
Update of /cvs/cairo/cairomm/cairomm
In directory kemper:/tmp/cvs-serv3908/cairomm
Modified Files:
xlib_surface.cc xlib_surface.h
Log Message:
2006-06-30 Jonathon Jongsma <jonathon.jongsma at gmail.com>
* cairomm/xlib_surface.cc, cairomm/xlib_surface.h: add new get_height() and
get_width() API to XlibSurface
Index: xlib_surface.cc
===================================================================
RCS file: /cvs/cairo/cairomm/cairomm/xlib_surface.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- xlib_surface.cc 27 Jun 2006 01:46:14 -0000 1.4
+++ xlib_surface.cc 1 Jul 2006 02:58:49 -0000 1.5
@@ -116,6 +116,20 @@
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
Index: xlib_surface.h
===================================================================
RCS file: /cvs/cairo/cairomm/cairomm/xlib_surface.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- xlib_surface.h 27 Jun 2006 01:46:14 -0000 1.4
+++ xlib_surface.h 1 Jul 2006 02:58:49 -0000 1.5
@@ -124,6 +124,14 @@
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
More information about the cairo-commit
mailing list