diff options
author | Jonathon Jongsma <jjongsma@gnome.org> | 2006-06-13 02:08:23 +0000 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@gnome.org> | 2006-06-13 02:08:23 +0000 |
commit | 4b240a5ae8bc07fb9a6dbd3a4f48bd94e52ee25d (patch) | |
tree | 0369bb49bd3463a2f5415944e3d43eb3a7c0a25c | |
parent | 7b92385b61567e87ed94a903bc7efdcd8654bf5e (diff) |
update for new cairo API cairo_surface_set_fallback_resolution()
-rw-r--r-- | cairomm/surface.cc | 24 | ||||
-rw-r--r-- | cairomm/surface.h | 25 | ||||
-rw-r--r-- | configure.in | 2 |
3 files changed, 14 insertions, 37 deletions
diff --git a/cairomm/surface.cc b/cairomm/surface.cc index b2a4b50..9d12bb6 100644 --- a/cairomm/surface.cc +++ b/cairomm/surface.cc @@ -76,6 +76,12 @@ void Surface::set_device_offset(double x_offset, double y_offset) check_object_status_and_throw_exception(*this); } +void Surface::set_fallback_resolution(double x_pixels_per_inch, double y_pixels_per_inch) +{ + cairo_surface_set_fallback_resolution(m_cobject, x_pixels_per_inch, y_pixels_per_inch); + check_object_status_and_throw_exception(*this); +} + #ifdef CAIRO_HAS_PNG_FUNCTIONS void Surface::write_to_png(const std::string& filename) { @@ -195,12 +201,6 @@ RefPtr<PdfSurface> PdfSurface::create(cairo_write_func_t write_func, void *closu return RefPtr<PdfSurface>(new PdfSurface(cobject, true /* has reference */)); } -void PdfSurface::set_dpi(double x_dpi, double y_dpi) -{ - cairo_pdf_surface_set_dpi(m_cobject, x_dpi, y_dpi); - check_object_status_and_throw_exception(*this); -} - #endif // CAIRO_HAS_PDF_SURFACE @@ -231,12 +231,6 @@ RefPtr<PsSurface> PsSurface::create(cairo_write_func_t write_func, void *closure return RefPtr<PsSurface>(new PsSurface(cobject, true /* has reference */)); } -void PsSurface::set_dpi(double x_dpi, double y_dpi) -{ - cairo_ps_surface_set_dpi(m_cobject, x_dpi, y_dpi); - check_object_status_and_throw_exception(*this); -} - #endif // CAIRO_HAS_PS_SURFACE @@ -267,12 +261,6 @@ RefPtr<SvgSurface> SvgSurface::create(cairo_write_func_t write_func, void *closu return RefPtr<SvgSurface>(new SvgSurface(cobject, true /* has reference */)); } -void SvgSurface::set_dpi(double x_dpi, double y_dpi) -{ - cairo_svg_surface_set_dpi(m_cobject, x_dpi, y_dpi); - check_object_status_and_throw_exception(*this); -} - #endif // CAIRO_HAS_SVG_SURFACE diff --git a/cairomm/surface.h b/cairomm/surface.h index 0dd621e..60a48f6 100644 --- a/cairomm/surface.h +++ b/cairomm/surface.h @@ -137,6 +137,13 @@ public: */ void set_device_offset(double x_offset, double y_offset); + /** Sets the fallback resolution of the image in dots per inch + * + * @param x_pixels_per_inch Pixels per inch in the x direction + * @param y_pixels_per_inch Pixels per inch in the y direction + */ + void set_fallback_resolution(double x_pixels_per_inch, double y_pixels_per_inch); + #ifdef CAIRO_HAS_PNG_FUNCTIONS /** Writes the contents of surface to a new file filename as a PNG image. @@ -367,12 +374,6 @@ public: */ static RefPtr<PdfSurface> create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points); - /** Sets the resolution of the image in dots per inch - * - * @param x_dpi The dpi in the x direction - * @param y_dpi The dpi in the y direction - */ - void set_dpi(double x_dpi, double y_dpi); }; #endif // CAIRO_HAS_PDF_SURFACE @@ -424,12 +425,6 @@ public: */ static RefPtr<PsSurface> create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points); - /** Sets the resolution of the image in dots per inch - * - * @param x_dpi The dpi in the x direction - * @param y_dpi The dpi in the y direction - */ - void set_dpi(double x_dpi, double y_dpi); }; @@ -483,12 +478,6 @@ public: */ static RefPtr<SvgSurface> create(cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points); - /** Sets the resolution of the image in dots per inch - * - * @param x_dpi The dpi in the x direction - * @param y_dpi The dpi in the y direction - */ - void set_dpi(double x_dpi, double y_dpi); }; #endif // CAIRO_HAS_SVG_SURFACE diff --git a/configure.in b/configure.in index 83047d2..972bd5d 100644 --- a/configure.in +++ b/configure.in @@ -90,7 +90,7 @@ fi AC_CHECK_HEADERS(string list map, , exit) -PKG_CHECK_MODULES(CAIROMM, cairo >= 1.0) +PKG_CHECK_MODULES(CAIROMM, cairo >= 1.1.7) dnl Check whether to build the documentation directory |