From ac7c40b14162080da504cdf4cd80d4ee5ba2a1f2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 9 Jun 2020 18:01:16 +0200 Subject: [PATCH] Add dummy wxBitmap::HasAlpha() to wxX11 This allows to write code using this function without any preprocessor checks. It should arguably be added to wxBitmapBase to ensure that it's available in all ports, but should be done together with UseAlpha(), which is not quite trivial, so leave it for later. --- include/wx/x11/bitmap.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/wx/x11/bitmap.h b/include/wx/x11/bitmap.h index b188a5b140..4e7c418b7c 100644 --- a/include/wx/x11/bitmap.h +++ b/include/wx/x11/bitmap.h @@ -139,6 +139,10 @@ public: WXDisplay *GetDisplay() const; + // This is provided only for compatibility with the other ports, there is + // no alpha support in X11 bitmaps. + bool HasAlpha() const { return false; } + protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;