From cde301823699742f97bfc9c37ac8d9eafa915553 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 15 Sep 2014 17:27:50 +0000 Subject: [PATCH] Don't define wxUSE_GRAPHICS_GDIPLUS as 1 by default. Define it and wxUSE_GRAPHICS_DIRECT2D, when it's supposed to be enabled, as wxUSE_GRAPHICS_CONTEXT instead. This ensures they are set to 0 if the use of wxGraphicsContext is entirely disabled, as is the case when using MinGW under MSW by default for example. Closes #16558. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/setup0.h | 4 ++-- include/wx/msw/setup0.h | 4 ++-- include/wx/msw/setup_inc.h | 4 ++-- setup.h.in | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/wx/gtk/setup0.h b/include/wx/gtk/setup0.h index 0bf61bf0b4..f97c5d8d13 100644 --- a/include/wx/gtk/setup0.h +++ b/include/wx/gtk/setup0.h @@ -1479,7 +1479,7 @@ // // Recommended setting: 1 if you need to support XP, as Direct2D is not // available there. -#define wxUSE_GRAPHICS_GDIPLUS 1 +#define wxUSE_GRAPHICS_GDIPLUS wxUSE_GRAPHICS_CONTEXT // Enable support for Direct2D-based implementation of wxGraphicsContext. // @@ -1491,7 +1491,7 @@ // 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 + #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT #else #define wxUSE_GRAPHICS_DIRECT2D 0 #endif diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 04a95f3a79..c6d6b3112e 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -1479,7 +1479,7 @@ // // Recommended setting: 1 if you need to support XP, as Direct2D is not // available there. -#define wxUSE_GRAPHICS_GDIPLUS 1 +#define wxUSE_GRAPHICS_GDIPLUS wxUSE_GRAPHICS_CONTEXT // Enable support for Direct2D-based implementation of wxGraphicsContext. // @@ -1491,7 +1491,7 @@ // 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 + #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT #else #define wxUSE_GRAPHICS_DIRECT2D 0 #endif diff --git a/include/wx/msw/setup_inc.h b/include/wx/msw/setup_inc.h index 5cb1404ab7..21baf4e092 100644 --- a/include/wx/msw/setup_inc.h +++ b/include/wx/msw/setup_inc.h @@ -19,7 +19,7 @@ // // Recommended setting: 1 if you need to support XP, as Direct2D is not // available there. -#define wxUSE_GRAPHICS_GDIPLUS 1 +#define wxUSE_GRAPHICS_GDIPLUS wxUSE_GRAPHICS_CONTEXT // Enable support for Direct2D-based implementation of wxGraphicsContext. // @@ -31,7 +31,7 @@ // 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 + #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT #else #define wxUSE_GRAPHICS_DIRECT2D 0 #endif diff --git a/setup.h.in b/setup.h.in index c5440def1c..2dd14ffb0e 100644 --- a/setup.h.in +++ b/setup.h.in @@ -635,10 +635,10 @@ /* --- start MSW options --- */ -#define wxUSE_GRAPHICS_GDIPLUS 0 +#define wxUSE_GRAPHICS_GDIPLUS wxUSE_GRAPHICS_CONTEXT #if defined(_MSC_VER) && _MSC_VER >= 1600 - #define wxUSE_GRAPHICS_DIRECT2D 0 + #define wxUSE_GRAPHICS_DIRECT2D wxUSE_GRAPHICS_CONTEXT #else #define wxUSE_GRAPHICS_DIRECT2D 0 #endif