[cairo-commit] cairomm/examples/png_file main.cc,1.3,1.4

Jonathon Jongsma commit at pdx.freedesktop.org
Fri Aug 18 18:22:54 PDT 2006


Committed by: jjongsma

Update of /cvs/cairo/cairomm/examples/png_file
In directory kemper:/tmp/cvs-serv1157/examples/png_file

Modified Files:
	main.cc 
Log Message:
2006-08-18  Cedric Gustin  <cedric.gustin at gmail.com>

	* cairomm/context.cc: Define M_PI for MSVC.
	* cairomm/scaledfont.cc: Allocate glyph_array as a dynamic array
	as MSVC does not like non-const arguments as array size.
	* examples/pdf-surface/main.cc, examples/png_file/main.cc,
	examples/ps-surface/main.cc, examples/svg-surface/main.cc,
	examples/text-rotate/text-rotate.cc: Define M_PI for MSVC. 
	* configure.in, Makefile.am: Generate Makefiles in the MSVC
	subdirectories.  
	* .cvsignore: Added Eclipse .project to the list of ignored files.
	* MSVC/*: Added project and resource files for Visual Studio 2005.


Index: main.cc
===================================================================
RCS file: /cvs/cairo/cairomm/examples/png_file/main.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- main.cc	1 Mar 2006 02:23:43 -0000	1.3
+++ main.cc	19 Aug 2006 01:22:52 -0000	1.4
@@ -3,6 +3,12 @@
 #include <cairomm/context.h>
 #include <cairomm/surface.h>
 
+/* M_PI is defined in math.h in the case of Microsoft Visual C++ */
+#if defined(_MSC_VER)
+#define _USE_MATH_DEFINES
+#include <math.h>
+#endif 
+
 int main(int argc, char** argv)
 {
     Cairo::RefPtr<Cairo::ImageSurface> surface =



More information about the cairo-commit mailing list