diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h index cffe98d8f8..6033a9d3ee 100644 --- a/include/wx/android/setup.h +++ b/include/wx/android/setup.h @@ -727,19 +727,14 @@ #define wxUSE_WEBVIEW_WEBKIT 0 #endif -// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced -// 2D drawing API. (Still somewhat experimental) -// -// Please note that on Windows gdiplus.dll is loaded dynamically which means -// that nothing special needs to be done as long as you don't use -// wxGraphicsContext at all or only use it on XP and later systems but you -// still do need to distribute it yourself for an application using -// wxGraphicsContext to be runnable on pre-XP systems. +// Enable wxGraphicsContext and related classes for a modern 2D drawing API. // // Default is 1 except if you're using a non-Microsoft compiler under Windows -// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. -// mingw32) you may need to install the headers (and just the headers) -// yourself. If you do, change the setting below manually. +// as only MSVC is known to ship with at least gdiplus.h which is required to +// compile GDI+-based implementation of wxGraphicsContext (MSVC10 and later +// versions also include d2d1.h required for Direct2D-based implementation). +// For other compilers (e.g. mingw32) you may need to install the headers (and +// just the headers) yourself. If you do, change the setting below manually. // // Recommended setting: 1 if supported by the compilation environment diff --git a/include/wx/gtk/setup0.h b/include/wx/gtk/setup0.h index 29351a6891..0bf61bf0b4 100644 --- a/include/wx/gtk/setup0.h +++ b/include/wx/gtk/setup0.h @@ -728,19 +728,14 @@ #define wxUSE_WEBVIEW_WEBKIT 0 #endif -// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced -// 2D drawing API. (Still somewhat experimental) -// -// Please note that on Windows gdiplus.dll is loaded dynamically which means -// that nothing special needs to be done as long as you don't use -// wxGraphicsContext at all or only use it on XP and later systems but you -// still do need to distribute it yourself for an application using -// wxGraphicsContext to be runnable on pre-XP systems. +// Enable wxGraphicsContext and related classes for a modern 2D drawing API. // // Default is 1 except if you're using a non-Microsoft compiler under Windows -// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. -// mingw32) you may need to install the headers (and just the headers) -// yourself. If you do, change the setting below manually. +// as only MSVC is known to ship with at least gdiplus.h which is required to +// compile GDI+-based implementation of wxGraphicsContext (MSVC10 and later +// versions also include d2d1.h required for Direct2D-based implementation). +// For other compilers (e.g. mingw32) you may need to install the headers (and +// just the headers) yourself. If you do, change the setting below manually. // // Recommended setting: 1 if supported by the compilation environment @@ -1472,6 +1467,35 @@ /* --- end common options --- */ /* --- start MSW options --- */ +// ---------------------------------------------------------------------------- +// Graphics backends choices for Windows +// ---------------------------------------------------------------------------- + +// The options here are only taken into account if wxUSE_GRAPHICS_CONTEXT is 1. + +// Enable support for GDI+-based implementation of wxGraphicsContext. +// +// Default is 1. +// +// Recommended setting: 1 if you need to support XP, as Direct2D is not +// available there. +#define wxUSE_GRAPHICS_GDIPLUS 1 + +// Enable support for Direct2D-based implementation of wxGraphicsContext. +// +// Default is 1 for compilers which support it, i.e. VC10+ currently. If you +// use an earlier MSVC version or another compiler and installed the necessary +// SDK components manually, you need to change this setting. +// +// Recommended setting: 1 for faster and better quality graphics under Windows +// 7 and later systems (if wxUSE_GRAPHICS_GDIPLUS is also enabled, earlier +// systems will fall back on using GDI+). +#if defined(_MSC_VER) && _MSC_VER >= 1600 + #define wxUSE_GRAPHICS_DIRECT2D 1 +#else + #define wxUSE_GRAPHICS_DIRECT2D 0 +#endif + // ---------------------------------------------------------------------------- // Windows-only settings // ---------------------------------------------------------------------------- diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index 1765e59413..8d7c4095c7 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -728,19 +728,14 @@ #define wxUSE_WEBVIEW_WEBKIT 0 #endif -// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced -// 2D drawing API. (Still somewhat experimental) -// -// Please note that on Windows gdiplus.dll is loaded dynamically which means -// that nothing special needs to be done as long as you don't use -// wxGraphicsContext at all or only use it on XP and later systems but you -// still do need to distribute it yourself for an application using -// wxGraphicsContext to be runnable on pre-XP systems. +// Enable wxGraphicsContext and related classes for a modern 2D drawing API. // // Default is 1 except if you're using a non-Microsoft compiler under Windows -// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. -// mingw32) you may need to install the headers (and just the headers) -// yourself. If you do, change the setting below manually. +// as only MSVC is known to ship with at least gdiplus.h which is required to +// compile GDI+-based implementation of wxGraphicsContext (MSVC10 and later +// versions also include d2d1.h required for Direct2D-based implementation). +// For other compilers (e.g. mingw32) you may need to install the headers (and +// just the headers) yourself. If you do, change the setting below manually. // // Recommended setting: 1 if supported by the compilation environment diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 2705a44f29..04a95f3a79 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -728,11 +728,17 @@ #define wxUSE_WEBVIEW_WEBKIT 0 #endif -// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced -// 2D drawing API. (Still somewhat experimental) +// Enable wxGraphicsContext and related classes for a modern 2D drawing API. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC is known to ship with at least gdiplus.h which is required to +// compile GDI+-based implementation of wxGraphicsContext (MSVC10 and later +// versions also include d2d1.h required for Direct2D-based implementation). +// For other compilers (e.g. mingw32) you may need to install the headers (and +// just the headers) yourself. If you do, change the setting below manually. // // Recommended setting: 1 if supported by the compilation environment -// + // notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is // included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined #ifdef _MSC_VER @@ -746,60 +752,6 @@ # define wxUSE_GRAPHICS_CONTEXT 0 #endif -// Enable wxGraphicsContext implementation using the GDI+ API. -// -// Please note that on Windows gdiplus.dll is loaded dynamically which means -// that nothing special needs to be done as long as you don't use -// wxGraphicsContext at all or only use it on XP and later systems but you -// still do need to distribute it yourself for an application using -// wxGraphicsContext to be runnable on pre-XP systems. -// -// Default is 1 except if you're using a non-Microsoft compiler under Windows -// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. -// mingw32) you may need to install the headers (and just the headers) -// yourself. If you do, change the setting below manually. -// -// Recommended setting: 1 if supported by the compilation environment -// -// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is -// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined -#ifdef _MSC_VER -# define wxUSE_GRAPHICS_GDIPLUS 1 -#else - // Disable support for other Windows compilers, enable it if your compiler - // comes with new enough SDK or you installed the headers manually. - // - // Notice that this will be set by configure under non-Windows platforms - // anyhow so the value there is not important. -# define wxUSE_GRAPHICS_GDIPLUS 0 -#endif - -// Enable wxGraphicsContext implementation using the Direct2D API. -// -// The Direct2D API requires Windows 7 or Windows Vista with Service -// Pack 2 (SP2) and Platform Update for Windows Vista and later. -// -// Default is 1 when available -// -// Recommended setting: 1 if supported by the Windows platform. -// -// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is -// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined -#ifdef _MSC_VER -# if _MSC_VER >= 1500 -# define wxUSE_GRAPHICS_DIRECT2D 1 -# else -# define wxUSE_GRAPHICS_DIRECT2D 0 -# endif -#else - // Disable support for other Windows compilers, enable it if your compiler - // comes with new enough SDK or you installed the headers manually. - // - // Notice that this will be set by configure under non-Windows platforms - // anyhow so the value there is not important. -# define wxUSE_GRAPHICS_DIRECT2D 0 -#endif - // Enable wxGraphicsContext implementation using Cairo library. // // This is not needed under Windows and detected automatically by configure @@ -1515,6 +1467,35 @@ /* --- end common options --- */ /* --- start MSW options --- */ +// ---------------------------------------------------------------------------- +// Graphics backends choices for Windows +// ---------------------------------------------------------------------------- + +// The options here are only taken into account if wxUSE_GRAPHICS_CONTEXT is 1. + +// Enable support for GDI+-based implementation of wxGraphicsContext. +// +// Default is 1. +// +// Recommended setting: 1 if you need to support XP, as Direct2D is not +// available there. +#define wxUSE_GRAPHICS_GDIPLUS 1 + +// Enable support for Direct2D-based implementation of wxGraphicsContext. +// +// Default is 1 for compilers which support it, i.e. VC10+ currently. If you +// use an earlier MSVC version or another compiler and installed the necessary +// SDK components manually, you need to change this setting. +// +// Recommended setting: 1 for faster and better quality graphics under Windows +// 7 and later systems (if wxUSE_GRAPHICS_GDIPLUS is also enabled, earlier +// systems will fall back on using GDI+). +#if defined(_MSC_VER) && _MSC_VER >= 1600 + #define wxUSE_GRAPHICS_DIRECT2D 1 +#else + #define wxUSE_GRAPHICS_DIRECT2D 0 +#endif + // ---------------------------------------------------------------------------- // Windows-only settings // ---------------------------------------------------------------------------- diff --git a/include/wx/msw/setup_inc.h b/include/wx/msw/setup_inc.h index ea53b075cb..5cb1404ab7 100644 --- a/include/wx/msw/setup_inc.h +++ b/include/wx/msw/setup_inc.h @@ -7,6 +7,35 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// +// ---------------------------------------------------------------------------- +// Graphics backends choices for Windows +// ---------------------------------------------------------------------------- + +// The options here are only taken into account if wxUSE_GRAPHICS_CONTEXT is 1. + +// Enable support for GDI+-based implementation of wxGraphicsContext. +// +// Default is 1. +// +// Recommended setting: 1 if you need to support XP, as Direct2D is not +// available there. +#define wxUSE_GRAPHICS_GDIPLUS 1 + +// Enable support for Direct2D-based implementation of wxGraphicsContext. +// +// Default is 1 for compilers which support it, i.e. VC10+ currently. If you +// use an earlier MSVC version or another compiler and installed the necessary +// SDK components manually, you need to change this setting. +// +// Recommended setting: 1 for faster and better quality graphics under Windows +// 7 and later systems (if wxUSE_GRAPHICS_GDIPLUS is also enabled, earlier +// systems will fall back on using GDI+). +#if defined(_MSC_VER) && _MSC_VER >= 1600 + #define wxUSE_GRAPHICS_DIRECT2D 1 +#else + #define wxUSE_GRAPHICS_DIRECT2D 0 +#endif + // ---------------------------------------------------------------------------- // Windows-only settings // ---------------------------------------------------------------------------- diff --git a/include/wx/msw/wince/setup.h b/include/wx/msw/wince/setup.h index 494f1b5bb4..569b23f5f8 100644 --- a/include/wx/msw/wince/setup.h +++ b/include/wx/msw/wince/setup.h @@ -728,19 +728,14 @@ #define wxUSE_WEBVIEW_WEBKIT 0 #endif -// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced -// 2D drawing API. (Still somewhat experimental) -// -// Please note that on Windows gdiplus.dll is loaded dynamically which means -// that nothing special needs to be done as long as you don't use -// wxGraphicsContext at all or only use it on XP and later systems but you -// still do need to distribute it yourself for an application using -// wxGraphicsContext to be runnable on pre-XP systems. +// Enable wxGraphicsContext and related classes for a modern 2D drawing API. // // Default is 1 except if you're using a non-Microsoft compiler under Windows -// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. -// mingw32) you may need to install the headers (and just the headers) -// yourself. If you do, change the setting below manually. +// as only MSVC is known to ship with at least gdiplus.h which is required to +// compile GDI+-based implementation of wxGraphicsContext (MSVC10 and later +// versions also include d2d1.h required for Direct2D-based implementation). +// For other compilers (e.g. mingw32) you may need to install the headers (and +// just the headers) yourself. If you do, change the setting below manually. // // Recommended setting: 1 if supported by the compilation environment diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h index adbd454d3f..b32448329d 100644 --- a/include/wx/osx/setup0.h +++ b/include/wx/osx/setup0.h @@ -729,19 +729,14 @@ #define wxUSE_WEBVIEW_WEBKIT 0 #endif -// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced -// 2D drawing API. (Still somewhat experimental) -// -// Please note that on Windows gdiplus.dll is loaded dynamically which means -// that nothing special needs to be done as long as you don't use -// wxGraphicsContext at all or only use it on XP and later systems but you -// still do need to distribute it yourself for an application using -// wxGraphicsContext to be runnable on pre-XP systems. +// Enable wxGraphicsContext and related classes for a modern 2D drawing API. // // Default is 1 except if you're using a non-Microsoft compiler under Windows -// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. -// mingw32) you may need to install the headers (and just the headers) -// yourself. If you do, change the setting below manually. +// as only MSVC is known to ship with at least gdiplus.h which is required to +// compile GDI+-based implementation of wxGraphicsContext (MSVC10 and later +// versions also include d2d1.h required for Direct2D-based implementation). +// For other compilers (e.g. mingw32) you may need to install the headers (and +// just the headers) yourself. If you do, change the setting below manually. // // Recommended setting: 1 if supported by the compilation environment diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index 20d4c3ca38..14b719215f 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -724,19 +724,14 @@ #define wxUSE_WEBVIEW_WEBKIT 0 #endif -// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced -// 2D drawing API. (Still somewhat experimental) -// -// Please note that on Windows gdiplus.dll is loaded dynamically which means -// that nothing special needs to be done as long as you don't use -// wxGraphicsContext at all or only use it on XP and later systems but you -// still do need to distribute it yourself for an application using -// wxGraphicsContext to be runnable on pre-XP systems. +// Enable wxGraphicsContext and related classes for a modern 2D drawing API. // // Default is 1 except if you're using a non-Microsoft compiler under Windows -// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. -// mingw32) you may need to install the headers (and just the headers) -// yourself. If you do, change the setting below manually. +// as only MSVC is known to ship with at least gdiplus.h which is required to +// compile GDI+-based implementation of wxGraphicsContext (MSVC10 and later +// versions also include d2d1.h required for Direct2D-based implementation). +// For other compilers (e.g. mingw32) you may need to install the headers (and +// just the headers) yourself. If you do, change the setting below manually. // // Recommended setting: 1 if supported by the compilation environment diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index aafd15ea1a..fe56759b67 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -727,19 +727,14 @@ #define wxUSE_WEBVIEW_WEBKIT 0 #endif -// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced -// 2D drawing API. (Still somewhat experimental) -// -// Please note that on Windows gdiplus.dll is loaded dynamically which means -// that nothing special needs to be done as long as you don't use -// wxGraphicsContext at all or only use it on XP and later systems but you -// still do need to distribute it yourself for an application using -// wxGraphicsContext to be runnable on pre-XP systems. +// Enable wxGraphicsContext and related classes for a modern 2D drawing API. // // Default is 1 except if you're using a non-Microsoft compiler under Windows -// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. -// mingw32) you may need to install the headers (and just the headers) -// yourself. If you do, change the setting below manually. +// as only MSVC is known to ship with at least gdiplus.h which is required to +// compile GDI+-based implementation of wxGraphicsContext (MSVC10 and later +// versions also include d2d1.h required for Direct2D-based implementation). +// For other compilers (e.g. mingw32) you may need to install the headers (and +// just the headers) yourself. If you do, change the setting below manually. // // Recommended setting: 1 if supported by the compilation environment diff --git a/setup.h.in b/setup.h.in index ccad90f739..c5440def1c 100644 --- a/setup.h.in +++ b/setup.h.in @@ -634,6 +634,16 @@ /* --- start MSW options --- */ + +#define wxUSE_GRAPHICS_GDIPLUS 0 + +#if defined(_MSC_VER) && _MSC_VER >= 1600 + #define wxUSE_GRAPHICS_DIRECT2D 0 +#else + #define wxUSE_GRAPHICS_DIRECT2D 0 +#endif + + #define wxUSE_MFC 0 #define wxUSE_OLE 0