diff options
author | Jonathon Jongsma <jjongsma@gnome.org> | 2006-08-19 01:22:51 +0000 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@gnome.org> | 2006-08-19 01:22:51 +0000 |
commit | 8cc7a64eaa12623fbf1f7947a7885aa0e3221ded (patch) | |
tree | f571258d56c1d27ce5625e16083eaae21f4984a3 /examples | |
parent | 89be006272f2edebaf110ea76f91ed0ed47a45df (diff) |
2006-08-18 Cedric Gustin <cedric.gustin@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.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/pdf-surface/main.cc | 6 | ||||
-rw-r--r-- | examples/png_file/main.cc | 6 | ||||
-rw-r--r-- | examples/ps-surface/main.cc | 6 | ||||
-rw-r--r-- | examples/svg-surface/main.cc | 6 | ||||
-rw-r--r-- | examples/text-rotate/text-rotate.cc | 6 |
5 files changed, 30 insertions, 0 deletions
diff --git a/examples/pdf-surface/main.cc b/examples/pdf-surface/main.cc index 7a7f887..1f2e858 100644 --- a/examples/pdf-surface/main.cc +++ b/examples/pdf-surface/main.cc @@ -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) { #ifdef CAIRO_HAS_PDF_SURFACE diff --git a/examples/png_file/main.cc b/examples/png_file/main.cc index da4a4e2..0ed059b 100644 --- a/examples/png_file/main.cc +++ b/examples/png_file/main.cc @@ -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 = diff --git a/examples/ps-surface/main.cc b/examples/ps-surface/main.cc index 2d4fc7f..c699e34 100644 --- a/examples/ps-surface/main.cc +++ b/examples/ps-surface/main.cc @@ -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) { #ifdef CAIRO_HAS_PS_SURFACE diff --git a/examples/svg-surface/main.cc b/examples/svg-surface/main.cc index 2732f5e..463a2bf 100644 --- a/examples/svg-surface/main.cc +++ b/examples/svg-surface/main.cc @@ -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) { #ifdef CAIRO_HAS_SVG_SURFACE diff --git a/examples/text-rotate/text-rotate.cc b/examples/text-rotate/text-rotate.cc index 9b3bceb..2dbe798 100644 --- a/examples/text-rotate/text-rotate.cc +++ b/examples/text-rotate/text-rotate.cc @@ -21,6 +21,12 @@ #include <iostream> #include <cairomm/cairomm.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 + // This example is based on the C cairo example of the same name const int WIDTH = 150; |