From 8b6c20ce55440492310634c7725edc48e4423f0b Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 14 Apr 2008 18:41:06 +0000 Subject: [PATCH] Also set wxHAVE_RAW_BITMAP for Mac and GTK2, use it in wxSTC git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/platform.h | 3 +++ src/stc/PlatWX.cpp | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/wx/platform.h b/include/wx/platform.h index 26115817cc..8f6545c3f4 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -617,6 +617,9 @@ # define wxHAVE_RAW_BITMAP # endif #endif +#if defined(__WXGTK20__) || defined(__WXMAC__) +# define wxHAVE_RAW_BITMAP +#endif /* Handle Darwin gcc universal compilation. Don't do this in an Apple- diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 79bb27b801..821e7392d4 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -32,7 +32,9 @@ #include "wx/imaglist.h" #include "wx/tokenzr.h" +#ifdef wxHAVE_RAW_BITMAP #include "wx/rawbmp.h" +#endif #include "Platform.h" #include "PlatWX.h" @@ -366,6 +368,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill, ColourAllocated outline, int alphaOutline, int /*flags*/) { +#ifdef wxHAVE_RAW_BITMAP // TODO: do something with cornerSize wxUnusedVar(cornerSize); @@ -426,6 +429,13 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, // Draw the bitmap hdc->DrawBitmap(bmp, r.x, r.y, true); + +#else + wxUnusedVar(cornerSize); + wxUnusedVar(alphaFill); + wxUnusedVar(alphaOutline); + RectangleDraw(rc, outline, fill); +#endif } void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) { -- 2.45.2