diff options
author | Jonathon Jongsma <jjongsma@gnome.org> | 2006-04-03 23:52:26 +0000 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@gnome.org> | 2006-04-03 23:52:26 +0000 |
commit | eb9070f20ea20d2982940e048eb1a0e2032ab026 (patch) | |
tree | 4ce1087031c003e7fca3139c716501be7dc01047 | |
parent | c0759862cd5e99e914377e37fc5bcfec0f234efe (diff) |
2006-04-03 Jonathon Jongsma <jonathon.jongsma@gmail.com>
* examples/text-rotate/text-rotate.cc: protect PNG functions with #ifdef in
case cairo wasn't compiled with PNG support
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | examples/text-rotate/text-rotate.cc | 5 |
2 files changed, 10 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2006-04-03 Jonathon Jongsma <jonathon.jongsma@gmail.com> + + * examples/text-rotate/text-rotate.cc: protect PNG functions with #ifdef in + case cairo wasn't compiled with PNG support + 2006-03-31 Danilo Piazzalunga <danilopiazza@gmail.com> * Makefile.am: diff --git a/examples/text-rotate/text-rotate.cc b/examples/text-rotate/text-rotate.cc index 3e210fa..9b3bceb 100644 --- a/examples/text-rotate/text-rotate.cc +++ b/examples/text-rotate/text-rotate.cc @@ -18,6 +18,7 @@ */ #include <string> +#include <iostream> #include <cairomm/cairomm.h> // This example is based on the C cairo example of the same name @@ -83,5 +84,9 @@ int main (void) Cairo::RefPtr<Cairo::ImageSurface> surface = Cairo::ImageSurface::create(Cairo::FORMAT_ARGB32, WIDTH, HEIGHT); Cairo::RefPtr<Cairo::Context> cr = Cairo::Context::create(surface); draw(cr, WIDTH, HEIGHT); +#ifdef CAIRO_HAS_PNG_FUNCTIONS surface->write_to_png("text-rotate.png"); +#else + std::cout << "You must compile cairo with PNG support for this example to work" << std::endl; +#endif } |