mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
Fix type problem with wxWidgets 3.0: Use enum wxRasterOperationMode instead of int. [Patch 0022] from martin@steghoefer.eu
This change from the old int type to the real enum wxRasterOperationMode was missed during the fix of similar problems in r13403 (when similar fixes were applied), probably because ImageRoll and the affected variable are currently unused and the problem therefore doesn't cause a compilation error and is only fixed preventively. Compatibility with wxWidgets 2.8 is assured thanks to a conditional definition of wxRasterOperationMode as int in ImageRoll.h, introduced in r13403.
This commit is contained in:
parent
6b010662a4
commit
34b9133031
@ -312,7 +312,7 @@ void ImageRoll::DrawBitmap(wxDC &dc, wxBitmap &bitmap,
|
||||
}
|
||||
}
|
||||
|
||||
void ImageRoll::Draw(wxDC &dc, wxRect rect, int WXUNUSED(logicalFunc))
|
||||
void ImageRoll::Draw(wxDC &dc, wxRect rect, wxRasterOperationMode WXUNUSED(logicalFunc))
|
||||
{
|
||||
int width = rect.width;
|
||||
int height = rect.height;
|
||||
@ -435,7 +435,7 @@ ImageRollPanel::ImageRollPanel(wxWindow *parent,
|
||||
mImageRoll.GetMaxSize());
|
||||
}
|
||||
|
||||
void ImageRollPanel::SetLogicalFunction(int func)
|
||||
void ImageRollPanel::SetLogicalFunction(wxRasterOperationMode func)
|
||||
{
|
||||
mLogicalFunction = func;
|
||||
}
|
||||
|
@ -13,9 +13,11 @@
|
||||
#define __AUDACITY_IMAGE_ROLL__
|
||||
|
||||
#include <wx/dc.h>
|
||||
#include <wx/dcclient.h>
|
||||
#include <wx/defs.h>
|
||||
#include <wx/dynarray.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/version.h>
|
||||
|
||||
#if !wxCHECK_VERSION(3,0,0)
|
||||
#define wxRasterOperationMode int
|
||||
@ -45,7 +47,7 @@ class ImageRoll
|
||||
wxSize GetMaxSize() const { return mMaxSize; }
|
||||
|
||||
void Draw(wxDC &dc, wxRect rect,
|
||||
int logicalFunc = wxCOPY);
|
||||
wxRasterOperationMode logicalFunc = wxCOPY);
|
||||
|
||||
static ImageArray SplitH(const wxImage &src, wxColour magicColor);
|
||||
static ImageArray SplitV(const wxImage &src, wxColour magicColor);
|
||||
@ -77,7 +79,7 @@ class ImageRollPanel : public wxPanel
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxTAB_TRAVERSAL);
|
||||
|
||||
void SetLogicalFunction(int func);
|
||||
void SetLogicalFunction(wxRasterOperationMode func);
|
||||
|
||||
void OnPaint(wxPaintEvent &evt);
|
||||
void OnSize(wxSizeEvent &evt);
|
||||
@ -85,7 +87,7 @@ class ImageRollPanel : public wxPanel
|
||||
protected:
|
||||
ImageRoll mImageRoll;
|
||||
|
||||
int mLogicalFunction;
|
||||
wxRasterOperationMode mLogicalFunction;
|
||||
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user