summaryrefslogtreecommitdiff
path: root/examples/text-rotate/text-rotate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'examples/text-rotate/text-rotate.cc')
-rw-r--r--examples/text-rotate/text-rotate.cc5
1 files changed, 5 insertions, 0 deletions
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
}