diff options
-rw-r--r-- | .cvsignore | 1 | ||||
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | MSVC/.cvsignore | 4 | ||||
-rw-r--r-- | MSVC/Makefile.am | 3 | ||||
-rw-r--r-- | MSVC/README | 12 | ||||
-rw-r--r-- | MSVC/blank.cpp | 11 | ||||
-rw-r--r-- | MSVC/cairomm.sln | 73 | ||||
-rw-r--r-- | MSVC/cairomm/.cvsignore | 8 | ||||
-rw-r--r-- | MSVC/cairomm/Makefile.am | 5 | ||||
-rw-r--r-- | MSVC/cairomm/cairomm.rc.in | 72 | ||||
-rw-r--r-- | MSVC/cairomm/cairomm.vcproj | 310 | ||||
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | cairomm/context.cc | 6 | ||||
-rw-r--r-- | cairomm/scaledfont.cc | 6 | ||||
-rw-r--r-- | configure.in | 13 | ||||
-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 |
20 files changed, 567 insertions, 2 deletions
@@ -11,3 +11,4 @@ install-sh missing mkinstalldirs *.swp +.project @@ -1,3 +1,16 @@ +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 synamic 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. + 2006-08-18 Jonathon Jongsma <jonathon.jongsma@gmail.com> * cairomm/context.cc: diff --git a/MSVC/.cvsignore b/MSVC/.cvsignore new file mode 100644 index 0000000..77fd409 --- /dev/null +++ b/MSVC/.cvsignore @@ -0,0 +1,4 @@ +Makefile +Makefile.in +cairomm.ncb +cairomm.suo diff --git a/MSVC/Makefile.am b/MSVC/Makefile.am new file mode 100644 index 0000000..976d5a5 --- /dev/null +++ b/MSVC/Makefile.am @@ -0,0 +1,3 @@ +SUBDIRS = gendef cairomm examples + +EXTRA_DIST = blank.cpp cairomm.sln README diff --git a/MSVC/README b/MSVC/README new file mode 100644 index 0000000..81886cd --- /dev/null +++ b/MSVC/README @@ -0,0 +1,12 @@ +Building cairomm-1.0 with Visual Studio .NET 2005 + +* You will need Visual Studio .NET 2005 (MSVC 8.0). Earlier versions of the compiler, including 6.0 and 7.0 might also work but have not been tested. +* Install the latest Win32 GTK+ Development Environment from the Glade for Windows project, http://gladewin32.sourceforge.net. +* Add libsigc++ to the include and lib paths in Visual Studio. +* Load the cairomm/MSVC3/cairomm.sln solution. +* Build the entire solution. +* Run the tests. + +Cedric Gustin +08/18/2006 + diff --git a/MSVC/blank.cpp b/MSVC/blank.cpp new file mode 100644 index 0000000..98feb66 --- /dev/null +++ b/MSVC/blank.cpp @@ -0,0 +1,11 @@ +// This file may very well be the most annoying workaround of all time. +// It is included here to simplify working with glibmm using the +// MSVC IDE. +// +// This file is included in all of the MSVC projects to force the +// IDE to display the C/C++ property pages for editing. Apparently, +// the MSVC IDE does not recognize .cc files as C++ source code, even +// though the compiler does! +// +// Tim Shead, tshead@k-3d.com +// 10/12/2004 diff --git a/MSVC/cairomm.sln b/MSVC/cairomm.sln new file mode 100644 index 0000000..ebedfae --- /dev/null +++ b/MSVC/cairomm.sln @@ -0,0 +1,73 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual C++ Express 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gendef", "gendef\gendef.vcproj", "{07324745-C9BE-4D65-B08A-9C88188C0C28}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cairomm-1.0", "cairomm\cairomm.vcproj", "{58B2B53C-C4FF-47FD-817B-095E45B7F7D4}" + ProjectSection(ProjectDependencies) = postProject + {07324745-C9BE-4D65-B08A-9C88188C0C28} = {07324745-C9BE-4D65-B08A-9C88188C0C28} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_pdf-surface", "examples\pdf-surface\pdf-surface.vcproj", "{129ECC08-6D30-4884-B824-4AF96EF0A45C}" + ProjectSection(ProjectDependencies) = postProject + {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_png_file", "examples\png_file\png_file.vcproj", "{45EEED29-0231-45C6-9682-CAB2E042C51E}" + ProjectSection(ProjectDependencies) = postProject + {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_ps-surface", "examples\ps-surface\ps-surface.vcproj", "{CAE46373-7375-4607-AAB7-0EBA8F0E5B55}" + ProjectSection(ProjectDependencies) = postProject + {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_svg-surface", "examples\svg-surface\svg-surface.vcproj", "{BCA44D2B-1832-41F5-9EE9-FE1F709EE584}" + ProjectSection(ProjectDependencies) = postProject + {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples_text-rotate", "examples\text-rotate\text-rotate.vcproj", "{F4D455E4-464D-49CC-A120-DB9B8AE0207E}" + ProjectSection(ProjectDependencies) = postProject + {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} = {58B2B53C-C4FF-47FD-817B-095E45B7F7D4} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {07324745-C9BE-4D65-B08A-9C88188C0C28}.Debug|Win32.ActiveCfg = Debug|Win32 + {07324745-C9BE-4D65-B08A-9C88188C0C28}.Debug|Win32.Build.0 = Debug|Win32 + {07324745-C9BE-4D65-B08A-9C88188C0C28}.Release|Win32.ActiveCfg = Release|Win32 + {07324745-C9BE-4D65-B08A-9C88188C0C28}.Release|Win32.Build.0 = Release|Win32 + {58B2B53C-C4FF-47FD-817B-095E45B7F7D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {58B2B53C-C4FF-47FD-817B-095E45B7F7D4}.Debug|Win32.Build.0 = Debug|Win32 + {58B2B53C-C4FF-47FD-817B-095E45B7F7D4}.Release|Win32.ActiveCfg = Release|Win32 + {58B2B53C-C4FF-47FD-817B-095E45B7F7D4}.Release|Win32.Build.0 = Release|Win32 + {129ECC08-6D30-4884-B824-4AF96EF0A45C}.Debug|Win32.ActiveCfg = Debug|Win32 + {129ECC08-6D30-4884-B824-4AF96EF0A45C}.Debug|Win32.Build.0 = Debug|Win32 + {129ECC08-6D30-4884-B824-4AF96EF0A45C}.Release|Win32.ActiveCfg = Release|Win32 + {129ECC08-6D30-4884-B824-4AF96EF0A45C}.Release|Win32.Build.0 = Release|Win32 + {45EEED29-0231-45C6-9682-CAB2E042C51E}.Debug|Win32.ActiveCfg = Debug|Win32 + {45EEED29-0231-45C6-9682-CAB2E042C51E}.Debug|Win32.Build.0 = Debug|Win32 + {45EEED29-0231-45C6-9682-CAB2E042C51E}.Release|Win32.ActiveCfg = Release|Win32 + {45EEED29-0231-45C6-9682-CAB2E042C51E}.Release|Win32.Build.0 = Release|Win32 + {CAE46373-7375-4607-AAB7-0EBA8F0E5B55}.Debug|Win32.ActiveCfg = Debug|Win32 + {CAE46373-7375-4607-AAB7-0EBA8F0E5B55}.Debug|Win32.Build.0 = Debug|Win32 + {CAE46373-7375-4607-AAB7-0EBA8F0E5B55}.Release|Win32.ActiveCfg = Release|Win32 + {CAE46373-7375-4607-AAB7-0EBA8F0E5B55}.Release|Win32.Build.0 = Release|Win32 + {BCA44D2B-1832-41F5-9EE9-FE1F709EE584}.Debug|Win32.ActiveCfg = Debug|Win32 + {BCA44D2B-1832-41F5-9EE9-FE1F709EE584}.Debug|Win32.Build.0 = Debug|Win32 + {BCA44D2B-1832-41F5-9EE9-FE1F709EE584}.Release|Win32.ActiveCfg = Release|Win32 + {BCA44D2B-1832-41F5-9EE9-FE1F709EE584}.Release|Win32.Build.0 = Release|Win32 + {F4D455E4-464D-49CC-A120-DB9B8AE0207E}.Debug|Win32.ActiveCfg = Debug|Win32 + {F4D455E4-464D-49CC-A120-DB9B8AE0207E}.Debug|Win32.Build.0 = Debug|Win32 + {F4D455E4-464D-49CC-A120-DB9B8AE0207E}.Release|Win32.ActiveCfg = Release|Win32 + {F4D455E4-464D-49CC-A120-DB9B8AE0207E}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/MSVC/cairomm/.cvsignore b/MSVC/cairomm/.cvsignore new file mode 100644 index 0000000..2858914 --- /dev/null +++ b/MSVC/cairomm/.cvsignore @@ -0,0 +1,8 @@ +Makefile +Makefile.in +Debug +Release +cairomm.def +cairomm_d.def +cairomm.rc +cairomm.aps diff --git a/MSVC/cairomm/Makefile.am b/MSVC/cairomm/Makefile.am new file mode 100644 index 0000000..b0c0ced --- /dev/null +++ b/MSVC/cairomm/Makefile.am @@ -0,0 +1,5 @@ +BUILT_SOURCES = cairomm.rc + +MAINTAINERCLEANFILES = $(built_sources) + +EXTRA_DIST = cairomm.vcproj cairomm.rc diff --git a/MSVC/cairomm/cairomm.rc.in b/MSVC/cairomm/cairomm.rc.in new file mode 100644 index 0000000..8c968cf --- /dev/null +++ b/MSVC/cairomm/cairomm.rc.in @@ -0,0 +1,72 @@ +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS + +#include "afxres.h" + +#undef APSTUDIO_READONLY_SYMBOLS + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +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 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "The cairomm development team (see AUTHORS)" + VALUE "FileDescription", "The official C++ wrapper for cairo" + VALUE "FileVersion", "@VERSION@" + VALUE "LegalCopyright", "Distribution is under the LGPL (see COPYING)" + VALUE "OriginalFilename", "cairomm-1.0" + VALUE "ProductName", "cairomm" + VALUE "ProductVersion", "@VERSION@" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (U.S.) resources + +#ifndef APSTUDIO_INVOKED + +#endif // not APSTUDIO_INVOKED diff --git a/MSVC/cairomm/cairomm.vcproj b/MSVC/cairomm/cairomm.vcproj new file mode 100644 index 0000000..ff0136d --- /dev/null +++ b/MSVC/cairomm/cairomm.vcproj @@ -0,0 +1,310 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="cairomm-1.0" + ProjectGUID="{58B2B53C-C4FF-47FD-817B-095E45B7F7D4}" + RootNamespace="glibmm" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=".;../.." + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;GLIBMM_BUILD" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + RuntimeTypeInfo="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + Description="Generate cairomm def file" + CommandLine="$(SolutionDir)gendef\$(ConfigurationName)\gendef $(ConfigurationName)\$(InputName).def $(TargetFileName) $(IntDir)\*.obj" + ExcludedFromBuild="false" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="cairo.lib" + OutputFile="$(OutDir)/$(ProjectName)d.dll" + GenerateManifest="true" + ModuleDefinitionFile="$(ConfigurationName)\$(InputName).def" + GenerateDebugInformation="true" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalIncludeDirectories=".;../.." + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;GLIBMM_BUILD" + RuntimeLibrary="2" + RuntimeTypeInfo="true" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + Description="Generate cairomm def file" + CommandLine="$(SolutionDir)gendef\$(ConfigurationName)\gendef $(ConfigurationName)\$(InputName).def $(TargetFileName) $(IntDir)\*.obj" + ExcludedFromBuild="false" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="cairo.lib" + GenerateManifest="true" + ModuleDefinitionFile="$(ConfigurationName)\$(InputName).def" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\blank.cpp" + > + </File> + <File + RelativePath="..\..\cairomm\context.cc" + > + </File> + <File + RelativePath="..\..\cairomm\exception.cc" + > + </File> + <File + RelativePath="..\..\cairomm\fontface.cc" + > + </File> + <File + RelativePath="..\..\cairomm\fontoptions.cc" + > + </File> + <File + RelativePath="..\..\cairomm\path.cc" + > + </File> + <File + RelativePath="..\..\cairomm\pattern.cc" + > + </File> + <File + RelativePath="..\..\cairomm\private.cc" + > + </File> + <File + RelativePath="..\..\cairomm\scaledfont.cc" + > + </File> + <File + RelativePath="..\..\cairomm\surface.cc" + > + </File> + <File + RelativePath="..\..\cairomm\win32_surface.cc" + > + </File> + <File + RelativePath="..\..\cairomm\xlib_surface.cc" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath="..\..\cairomm\cairomm.h" + > + </File> + <File + RelativePath="..\..\cairomm\context.h" + > + </File> + <File + RelativePath="..\..\cairomm\enums.h" + > + </File> + <File + RelativePath="..\..\cairomm\exception.h" + > + </File> + <File + RelativePath="..\..\cairomm\fontface.h" + > + </File> + <File + RelativePath="..\..\cairomm\fontoptions.h" + > + </File> + <File + RelativePath="..\..\cairomm\path.h" + > + </File> + <File + RelativePath="..\..\cairomm\pattern.h" + > + </File> + <File + RelativePath="..\..\cairomm\private.h" + > + </File> + <File + RelativePath="..\..\cairomm\refptr.h" + > + </File> + <File + RelativePath="..\..\cairomm\scaledfont.h" + > + </File> + <File + RelativePath="..\..\cairomm\surface.h" + > + </File> + <File + RelativePath="..\..\cairomm\win32_surface.h" + > + </File> + <File + RelativePath="..\..\cairomm\xlib_surface.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + <File + RelativePath=".\cairomm.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/Makefile.am b/Makefile.am index 2fdb7f3..8a0a39e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = cairomm examples $(DOCS_SUBDIR) +SUBDIRS = cairomm examples MSVC $(DOCS_SUBDIR) #docs examples EXTRA_DIST = MAINTAINERS cairomm-1.0.pc.in diff --git a/cairomm/context.cc b/cairomm/context.cc index 49fdb7a..5f502c5 100644 --- a/cairomm/context.cc +++ b/cairomm/context.cc @@ -19,6 +19,12 @@ #include <cairomm/context.h> #include <cairomm/private.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 + namespace Cairo { diff --git a/cairomm/scaledfont.cc b/cairomm/scaledfont.cc index 90c26e8..02fb11c 100644 --- a/cairomm/scaledfont.cc +++ b/cairomm/scaledfont.cc @@ -55,12 +55,16 @@ void ScaledFont::glyph_extents(const std::vector<Glyph>& glyphs, TextExtents& ex // copy the data from the vector to a standard C array. I don't believe // this will be a frequently used function so I think the performance hit is // more than offset by the increased flexibility of the STL interface. - Glyph glyph_array[glyphs.size()]; + + // Use new to allocate memory as MSCV complains about non-const array size with + // Glyph glyph_array[glyphs.size()] + Glyph* glyph_array= new Glyph[glyphs.size()]; std::copy(glyphs.begin(), glyphs.end(), glyph_array); cairo_scaled_font_glyph_extents(m_cobject, glyph_array, glyphs.size(), static_cast<cairo_text_extents_t*>(&extents)); check_object_status_and_throw_exception(*this); + delete[] glyph_array; } RefPtr<FontFace> ScaledFont::get_font_face() const diff --git a/configure.in b/configure.in index 2fc1e05..7a6c82a 100644 --- a/configure.in +++ b/configure.in @@ -135,4 +135,17 @@ AC_CONFIG_FILES( cairomm-1.0.pc ) +AC_CONFIG_FILES([ + MSVC/Makefile + MSVC/gendef/Makefile + MSVC/cairomm/Makefile + MSVC/cairomm/cairomm.rc + MSVC/examples/Makefile + MSVC/examples/pdf-surface/Makefile + MSVC/examples/png_file/Makefile + MSVC/examples/ps-surface/Makefile + MSVC/examples/svg-surface/Makefile + MSVC/examples/text-rotate/Makefile +]) + AC_OUTPUT() 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; |