diff options
author | Armin Burgmeier <armin@arbur.net> | 2010-10-25 23:27:28 +0200 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2010-11-03 09:07:40 +0100 |
commit | 0ccf049d1c8e0bfb6369d5851ae070d72b3f0ba2 (patch) | |
tree | c7194d3662d266bcffcad8c1b978a4e6f80d5f5e /examples/surfaces/svg-surface.cc | |
parent | 0da1fff3723f2e073ebabca3b26180ff1f15af60 (diff) |
Fix the build with MSVC (really)
The previous commit only included the ChangeLog for some reason.
2009-10-26 Armin Burgmeier <armin@arbur.net>
* MSVC_Net2005/cairomm/cairomm.rc.in:
* MSVC_Net2008/cairomm/cairomm.rc.in: Replaced GENERIC_MAJOR_VERSION
et al. by CAIROMM_MAJOR_VERSION, so that they are properly replaced
during configure.
* MSVC_Net2005/examples/image-surface/image-surface.vcproj:
* MSVC_Net2005/examples/pdf-surface/pdf-surface.vcproj:
* MSVC_Net2005/examples/ps-surface/ps-surface.vcproj:
* MSVC_Net2005/examples/svg-surface/svg-surface.vcproj:
* MSVC_Net2005/examples/text-rotate/text-rotate.vcproj:
* MSVC_Net2005/examples/toy-text/toy-text.vcproj:
* MSVC_Net2005/examples/user-font/user-font.vcproj:
* MSVC_Net2008/examples/image-surface/image-surface.vcproj:
* MSVC_Net2008/examples/pdf-surface/pdf-surface.vcproj:
* MSVC_Net2008/examples/ps-surface/ps-surface.vcproj:
* MSVC_Net2008/examples/svg-surface/svg-surface.vcproj:
* MSVC_Net2008/examples/text-rotate/text-rotate.vcproj:
* MSVC_Net2008/examples/toy-text/toy-text.vcproj:
* MSVC_Net2008/examples/user-font/user-font.vcproj: Added
$(SolutionDir)/cairomm to the include search paths, so that
cairommconfig.h is found even if configure did not run.
* cairomm/fontface.cc: MSVC does not allow to reinterpret_cast a bool
to void*, so use an int instead.
* examples/surfaces/image-surface.cc:
* examples/surfaces/pdf-surface.cc:
* examples/surfaces/ps-surface.cc:
* examples/surfaces/svg-surface.cc:
* examples/text/text-rotate.cc: Define _USE_MATH_DEFINES before
including anything, to make sure we get the defines even if math.h
is included indirectly via another header.
* cairomm/context.cc: In set_dash(std::valarray<double>), copy the
valarray into a vector and then call set_dash(std::vector<double>).
The reason is that there is no guarantee that the memory in a
std::valarray is contiguous, and also that in MSVC's STL (and also in
the C++ standard) std::valarray<T>::operator[](size_t) const returns
a T, not a const T&, so &dashes[0] is a compiler error if dashes is a
const std::valarray<double>&.
Diffstat (limited to 'examples/surfaces/svg-surface.cc')
-rw-r--r-- | examples/surfaces/svg-surface.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/surfaces/svg-surface.cc b/examples/surfaces/svg-surface.cc index 38f96c9..56e101d 100644 --- a/examples/surfaces/svg-surface.cc +++ b/examples/surfaces/svg-surface.cc @@ -1,9 +1,3 @@ -#include <string> -#include <iostream> -#include <cairommconfig.h> -#include <cairomm/context.h> -#include <cairomm/surface.h> - /* M_PI is defined in math.h in the case of Microsoft Visual C++, Solaris, * et. al. */ @@ -11,6 +5,12 @@ #define _USE_MATH_DEFINES #endif +#include <string> +#include <iostream> +#include <cairommconfig.h> +#include <cairomm/context.h> +#include <cairomm/surface.h> + #include <cmath> int main() |