Fix wxUSE_GRAPHICS_DIRECT2D definition in setup.h files.

Define it in wx/msw/setup_inc.h and not in wx/msw/setup0.h itself to ensure
that it survives the regeneration of this file using build/update-setup-h.

Also only set wxUSE_GRAPHICS_DIRECT2D to 1 for VC10+ and not VC9 as the latter
lacks Direct2D header in its default SDK version.

Finally also update comments to explain the various settings more clearly and
remove outdated information (wxGraphicsContext is not experimental any more).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-09-10 16:52:28 +00:00
parent c2d70a0340
commit 56d51c311a
10 changed files with 148 additions and 134 deletions

View File

@ -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

View File

@ -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
// ----------------------------------------------------------------------------

View File

@ -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

View File

@ -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
// ----------------------------------------------------------------------------

View File

@ -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
// ----------------------------------------------------------------------------

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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