summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@gnome.org>2008-12-12 22:13:38 -0600
committerJonathon Jongsma <jjongsma@gnome.org>2008-12-12 22:13:38 -0600
commit6000e9a229e81089411f115f1961204a0a9f6484 (patch)
treeaea79976a78f2acc3ed62b7b2f9c9c3f2b448485
parent2dba9ab377f0fbe5195f0fd7abe5cccda228b89b (diff)
Minor changes to text-rotate example
* .gitignore: ignore the new example executable names * examples/text/Makefile.am: normalize the text-rotate example executable name * examples/text/text-rotate.cc: print a message to the terminal explaining that a file was written
-rw-r--r--.gitignore10
-rw-r--r--ChangeLog8
-rw-r--r--examples/text/Makefile.am2
-rw-r--r--examples/text/text-rotate.cc8
4 files changed, 19 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 0ecc64e..3a9c60d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,11 +45,11 @@ missing
*.lo
*.la
-examples/pdf-surface/example_pdf_file
-examples/png_file/example_png_file
-examples/ps-surface/example_ps_file
-examples/svg-surface/example_svg_file
-examples/text/text_rotate
+examples/surfaces/pdf-surface
+examples/surfaces/image-surface
+examples/surfaces/ps-surface
+examples/surfaces/svg-surface
+examples/text/text-rotate
examples/text/toy-text
examples/text/user-font
diff --git a/ChangeLog b/ChangeLog
index ff30bc5..14fc375 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2008-12-12 Jonathon Jongsma <jonathon@quotidian.org>
+ * .gitignore: ignore the new example executable names
+ * examples/text/Makefile.am: normalize the text-rotate example
+ executable name
+ * examples/text/text-rotate.cc: print a message to the terminal explaining
+ that a file was written
+
+2008-12-12 Jonathon Jongsma <jonathon@quotidian.org>
+
* cairomm/surface.h: add the surface examples to the doxygen documentation
2008-12-12 Jonathon Jongsma <jonathon@quotidian.org>
diff --git a/examples/text/Makefile.am b/examples/text/Makefile.am
index 19f6e70..9369eec 100644
--- a/examples/text/Makefile.am
+++ b/examples/text/Makefile.am
@@ -1,7 +1,7 @@
include $(top_srcdir)/examples/Makefile.am_fragment
# build the executable but don't install it
-noinst_PROGRAMS = text_rotate toy-text user-font
+noinst_PROGRAMS = text-rotate toy-text user-font
text_rotate_SOURCES = text-rotate.cc
toy_text_SOURCES=toy-text.cc
diff --git a/examples/text/text-rotate.cc b/examples/text/text-rotate.cc
index 4a78829..214ede1 100644
--- a/examples/text/text-rotate.cc
+++ b/examples/text/text-rotate.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 The cairomm Development Team
+/* Copyright (C) 2008 The cairomm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -73,7 +73,7 @@ void draw(Cairo::RefPtr<Cairo::Context> cr, int width, int height)
y_off = (int) - floor(0.5 + extents.height / 2.0);
x_off = (int) floor(0.5 + (extents.height + 1.0) / (2.0 * tan (M_PI / NUM_TEXT)));
}
-
+
for (i=0; i < NUM_TEXT; i++)
{
cr->save();
@@ -96,7 +96,9 @@ int main (void)
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");
+ const char* filename = "text-rotate.png";
+ surface->write_to_png(filename);
+ std::cout << "Wrote file " << filename << std::endl;
#else
std::cout << "You must compile cairo with PNG support for this example to work" << std::endl;
#endif