diff options
22 files changed, 76 insertions, 65 deletions
diff --git a/MSVC_Net2005/cairomm/cairomm.rc.in b/MSVC_Net2005/cairomm/cairomm.rc.in index 79c0eee..d968c4d 100644 --- a/MSVC_Net2005/cairomm/cairomm.rc.in +++ b/MSVC_Net2005/cairomm/cairomm.rc.in @@ -33,8 +33,8 @@ END #endif // APSTUDIO_INVOKED VS_VERSION_INFO VERSIONINFO - FILEVERSION @GENERIC_MAJOR_VERSION@,@GENERIC_MINOR_VERSION@,@GENERIC_MICRO_VERSION@,1 - PRODUCTVERSION @GENERIC_MAJOR_VERSION@,@GENERIC_MINOR_VERSION@,@GENERIC_MICRO_VERSION@,1 + FILEVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1 + PRODUCTVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L diff --git a/MSVC_Net2005/examples/image-surface/image-surface.vcproj b/MSVC_Net2005/examples/image-surface/image-surface.vcproj index b265cac..b9e6c29 100644 --- a/MSVC_Net2005/examples/image-surface/image-surface.vcproj +++ b/MSVC_Net2005/examples/image-surface/image-surface.vcproj @@ -44,7 +44,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2005/examples/pdf-surface/pdf-surface.vcproj b/MSVC_Net2005/examples/pdf-surface/pdf-surface.vcproj index 1427782..438479e 100644 --- a/MSVC_Net2005/examples/pdf-surface/pdf-surface.vcproj +++ b/MSVC_Net2005/examples/pdf-surface/pdf-surface.vcproj @@ -44,7 +44,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2005/examples/ps-surface/ps-surface.vcproj b/MSVC_Net2005/examples/ps-surface/ps-surface.vcproj index 49aa233..150606c 100644 --- a/MSVC_Net2005/examples/ps-surface/ps-surface.vcproj +++ b/MSVC_Net2005/examples/ps-surface/ps-surface.vcproj @@ -44,7 +44,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2005/examples/svg-surface/svg-surface.vcproj b/MSVC_Net2005/examples/svg-surface/svg-surface.vcproj index 3e3b3ce..1e28799 100644 --- a/MSVC_Net2005/examples/svg-surface/svg-surface.vcproj +++ b/MSVC_Net2005/examples/svg-surface/svg-surface.vcproj @@ -44,7 +44,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2005/examples/text-rotate/text-rotate.vcproj b/MSVC_Net2005/examples/text-rotate/text-rotate.vcproj index 5ad9053..3b269b3 100644 --- a/MSVC_Net2005/examples/text-rotate/text-rotate.vcproj +++ b/MSVC_Net2005/examples/text-rotate/text-rotate.vcproj @@ -44,7 +44,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2005/examples/toy-text/toy-text.vcproj b/MSVC_Net2005/examples/toy-text/toy-text.vcproj index a16dee8..f6fe84a 100644 --- a/MSVC_Net2005/examples/toy-text/toy-text.vcproj +++ b/MSVC_Net2005/examples/toy-text/toy-text.vcproj @@ -44,7 +44,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_MATH_DEFINES" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_USE_MATH_DEFINES" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2005/examples/user-font/user-font.vcproj b/MSVC_Net2005/examples/user-font/user-font.vcproj index 64d2248..443e041 100644 --- a/MSVC_Net2005/examples/user-font/user-font.vcproj +++ b/MSVC_Net2005/examples/user-font/user-font.vcproj @@ -44,7 +44,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_MATH_DEFINES" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_USE_MATH_DEFINES" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2008/cairomm/cairomm.rc.in b/MSVC_Net2008/cairomm/cairomm.rc.in index 79c0eee..d968c4d 100644 --- a/MSVC_Net2008/cairomm/cairomm.rc.in +++ b/MSVC_Net2008/cairomm/cairomm.rc.in @@ -33,8 +33,8 @@ END #endif // APSTUDIO_INVOKED VS_VERSION_INFO VERSIONINFO - FILEVERSION @GENERIC_MAJOR_VERSION@,@GENERIC_MINOR_VERSION@,@GENERIC_MICRO_VERSION@,1 - PRODUCTVERSION @GENERIC_MAJOR_VERSION@,@GENERIC_MINOR_VERSION@,@GENERIC_MICRO_VERSION@,1 + FILEVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1 + PRODUCTVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1 FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L diff --git a/MSVC_Net2008/examples/image-surface/image-surface.vcproj b/MSVC_Net2008/examples/image-surface/image-surface.vcproj index 67e91b2..822b579 100644 --- a/MSVC_Net2008/examples/image-surface/image-surface.vcproj +++ b/MSVC_Net2008/examples/image-surface/image-surface.vcproj @@ -45,7 +45,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2008/examples/pdf-surface/pdf-surface.vcproj b/MSVC_Net2008/examples/pdf-surface/pdf-surface.vcproj index 1ccc60a..c60029c 100644 --- a/MSVC_Net2008/examples/pdf-surface/pdf-surface.vcproj +++ b/MSVC_Net2008/examples/pdf-surface/pdf-surface.vcproj @@ -45,7 +45,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2008/examples/ps-surface/ps-surface.vcproj b/MSVC_Net2008/examples/ps-surface/ps-surface.vcproj index a2dbc17..bb64bae 100644 --- a/MSVC_Net2008/examples/ps-surface/ps-surface.vcproj +++ b/MSVC_Net2008/examples/ps-surface/ps-surface.vcproj @@ -45,7 +45,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2008/examples/svg-surface/svg-surface.vcproj b/MSVC_Net2008/examples/svg-surface/svg-surface.vcproj index 6fa3e60..3ce00e8 100644 --- a/MSVC_Net2008/examples/svg-surface/svg-surface.vcproj +++ b/MSVC_Net2008/examples/svg-surface/svg-surface.vcproj @@ -45,7 +45,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2008/examples/text-rotate/text-rotate.vcproj b/MSVC_Net2008/examples/text-rotate/text-rotate.vcproj index 58e2e32..bc52ffd 100644 --- a/MSVC_Net2008/examples/text-rotate/text-rotate.vcproj +++ b/MSVC_Net2008/examples/text-rotate/text-rotate.vcproj @@ -45,7 +45,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2008/examples/toy-text/toy-text.vcproj b/MSVC_Net2008/examples/toy-text/toy-text.vcproj index 265fd84..715e9e6 100644 --- a/MSVC_Net2008/examples/toy-text/toy-text.vcproj +++ b/MSVC_Net2008/examples/toy-text/toy-text.vcproj @@ -45,7 +45,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_MATH_DEFINES" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_USE_MATH_DEFINES" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/MSVC_Net2008/examples/user-font/user-font.vcproj b/MSVC_Net2008/examples/user-font/user-font.vcproj index 1231c73..07d93f5 100644 --- a/MSVC_Net2008/examples/user-font/user-font.vcproj +++ b/MSVC_Net2008/examples/user-font/user-font.vcproj @@ -45,7 +45,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_MATH_DEFINES" MinimalRebuild="true" BasicRuntimeChecks="3" @@ -125,7 +125,7 @@ /> <Tool Name="VCCLCompilerTool" - AdditionalIncludeDirectories=""$(SolutionDir)\.."" + AdditionalIncludeDirectories=""$(SolutionDir)\cairomm","$(SolutionDir)\.."" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_USE_MATH_DEFINES" RuntimeLibrary="2" RuntimeTypeInfo="true" diff --git a/cairomm/context.cc b/cairomm/context.cc index d758fe1..c5d10ed 100644 --- a/cairomm/context.cc +++ b/cairomm/context.cc @@ -16,6 +16,11 @@ * 02110-1301, USA. */ +/* M_PI is defined in math.h in the case of Microsoft Visual C++ */ +#if defined(_MSC_VER) +#define _USE_MATH_DEFINES +#endif + #include <cairommconfig.h> #include <cairomm/context.h> #include <cairomm/context_private.h> @@ -155,8 +160,11 @@ void Context::set_line_join(LineJoin line_join) void Context::set_dash(std::valarray<double>& dashes, double offset) { - cairo_set_dash(cobj(), &dashes[0], dashes.size(), offset); - check_object_status_and_throw_exception(*this); + std::vector<double> v(dashes.size()); + for(size_t i = 0; i < dashes.size(); ++i) + v[i] = dashes[i]; + + set_dash(v, offset); } void Context::set_dash(std::vector<double>& dashes, double offset) @@ -167,8 +175,11 @@ void Context::set_dash(std::vector<double>& dashes, double offset) void Context::set_dash(const std::valarray<double>& dashes, double offset) { - cairo_set_dash(cobj(), &dashes[0], dashes.size(), offset); - check_object_status_and_throw_exception(*this); + std::vector<double> v(dashes.size()); + for(size_t i = 0; i < dashes.size(); ++i) + v[i] = dashes[i]; + + set_dash(v, offset); } void Context::set_dash(const std::vector<double>& dashes, double offset) diff --git a/examples/surfaces/image-surface.cc b/examples/surfaces/image-surface.cc index 3a349f2..d8ea451 100644 --- a/examples/surfaces/image-surface.cc +++ b/examples/surfaces/image-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() diff --git a/examples/surfaces/pdf-surface.cc b/examples/surfaces/pdf-surface.cc index a742918..630f196 100644 --- a/examples/surfaces/pdf-surface.cc +++ b/examples/surfaces/pdf-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() diff --git a/examples/surfaces/ps-surface.cc b/examples/surfaces/ps-surface.cc index 73d630d..4e5bd2a 100644 --- a/examples/surfaces/ps-surface.cc +++ b/examples/surfaces/ps-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() 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() diff --git a/examples/text/text-rotate.cc b/examples/text/text-rotate.cc index 530c2f7..69e02ff 100644 --- a/examples/text/text-rotate.cc +++ b/examples/text/text-rotate.cc @@ -16,11 +16,6 @@ * 02110-1301, USA. */ -#include <string> -#include <iostream> -#include <cairommconfig.h> -#include <cairomm/cairomm.h> - /* M_PI is defined in math.h in the case of Microsoft Visual C++, and * Solaris needs math.h for M_PI and floor() */ @@ -28,6 +23,11 @@ #define _USE_MATH_DEFINES #endif +#include <string> +#include <iostream> +#include <cairommconfig.h> +#include <cairomm/cairomm.h> + #include <cmath> // This example is based on the C cairo example of the same name |