From 882a339a486c75516a8679290d070dc26a01223a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 2 Dec 2021 15:25:06 +0100 Subject: [PATCH] Move wxHAS_SVG definition to wx/features.h This is more consistent with the other wxHAS_XXXs and makes it possible to only include wx/bmpbndl.h in bmpsvg.cpp if SVG support is indeed available. --- include/wx/bmpbndl.h | 7 ------- include/wx/features.h | 9 +++++++++ src/generic/bmpsvg.cpp | 3 +-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/wx/bmpbndl.h b/include/wx/bmpbndl.h index 5f2b414c7b..a77a6cc791 100644 --- a/include/wx/bmpbndl.h +++ b/include/wx/bmpbndl.h @@ -18,13 +18,6 @@ class wxBitmapBundleImpl; class WXDLLIMPEXP_FWD_CORE wxImageList; class WXDLLIMPEXP_FWD_CORE wxWindow; -// It should be possible to implement SVG rasterizing without raw bitmap -// support using wxDC::DrawSpline(), but currently we don't do it and so -// FromSVG() is only available in the ports providing raw bitmap access. -#ifdef wxHAS_RAW_BITMAP - #define wxHAS_SVG -#endif - // ---------------------------------------------------------------------------- // wxBitmapBundle provides 1 or more versions of a bitmap, all bundled together // ---------------------------------------------------------------------------- diff --git a/include/wx/features.h b/include/wx/features.h index c40265ca73..7f28d4915e 100644 --- a/include/wx/features.h +++ b/include/wx/features.h @@ -95,6 +95,15 @@ #define wxHAVE_RAW_BITMAP #endif +/* + While it should be possible to implement SVG rasterizing without raw bitmap + support using wxDC::DrawSpline(), currently we don't do it and so FromSVG() + is only available in the ports providing raw bitmap access. + */ +#ifdef wxHAS_RAW_BITMAP + #define wxHAS_SVG +#endif + // Previously this symbol wasn't defined for all compilers as Bind() couldn't // be implemented for some of them (notably MSVC 6), but this is not the case diff --git a/src/generic/bmpsvg.cpp b/src/generic/bmpsvg.cpp index 8517508896..e1ecd3759e 100644 --- a/src/generic/bmpsvg.cpp +++ b/src/generic/bmpsvg.cpp @@ -19,8 +19,6 @@ // for compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/bmpbndl.h" - #ifdef wxHAS_SVG // Try to help people updating their sources from Git and forgetting to @@ -42,6 +40,7 @@ #include "wx/utils.h" // Only for wxMin() #endif // WX_PRECOMP +#include "wx/bmpbndl.h" #ifdef wxUSE_FFILE #include "wx/ffile.h" #elif wxUSE_FILE