diff options
author | Jonathon Jongsma <jjongsma@gnome.org> | 2007-11-10 20:57:50 -0600 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@gnome.org> | 2007-11-10 20:57:50 -0600 |
commit | 60f1af39bb971115b86b09ced8f20e96a59c0a6d (patch) | |
tree | 1c883e02ab2b24e7f530565f85676d7730838c30 | |
parent | 931299ba607eb0ee2d84659520a2727ffb55fd99 (diff) |
[Surface] add copy_page(), show_page()
* cairomm/surface.cc:
* cairomm/surface.h: add Surface::copy_page() and Surface::show_page()
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | cairomm/surface.cc | 12 | ||||
-rw-r--r-- | cairomm/surface.h | 20 |
3 files changed, 36 insertions, 1 deletions
@@ -1,5 +1,10 @@ 2007-11-10 Jonathon Jongsma <jjongsma@gnome.org> + * cairomm/surface.cc: + * cairomm/surface.h: add Surface::copy_page() and Surface::show_page() + +2007-11-10 Jonathon Jongsma <jjongsma@gnome.org> + * configure.in: bump version and minimum cairo version so that we can start implementing the 1.5.x features diff --git a/cairomm/surface.cc b/cairomm/surface.cc index 90cc303..af672b4 100644 --- a/cairomm/surface.cc +++ b/cairomm/surface.cc @@ -94,6 +94,18 @@ SurfaceType Surface::get_type() const return static_cast<SurfaceType>(surface_type); } +void Surface::copy_page() +{ + cairo_surface_copy_page(m_cobject); + check_object_status_and_throw_exception(*this); +} + +void Surface::show_page() +{ + cairo_surface_show_page(m_cobject); + check_object_status_and_throw_exception(*this); +} + #ifdef CAIRO_HAS_PNG_FUNCTIONS void Surface::write_to_png(const std::string& filename) { diff --git a/cairomm/surface.h b/cairomm/surface.h index 15f0f9b..fd9029b 100644 --- a/cairomm/surface.h +++ b/cairomm/surface.h @@ -151,6 +151,24 @@ public: SurfaceType get_type() const; + /** + * Emits the current page for backends that support multiple pages, + * but doesn't clear it, so that the contents of the current page will + * be retained for the next page. Use show_page() if you want to get an empty + * page after the emission. + * + * @since 1.6 + */ + void copy_page(); + + /** + * Emits and clears the current page for backends that support multiple pages. + * Use copy_page() if you don't want to clear the page. + * + * @since 1.6 + */ + void show_page(); + #ifdef CAIRO_HAS_PNG_FUNCTIONS /** Writes the contents of surface to a new file filename as a PNG image. @@ -574,7 +592,7 @@ public: * will be empty if version isn't valid. See get_versions() for a way to get * the list of valid version ids. * - * Since: 1.2 + * since: 1.2 */ static std::string version_to_string(SvgVersion version); }; |