Skip to content

Commit

Permalink
gui: remove bitmapFromMem macro
Browse files Browse the repository at this point in the history
Not needed anymore and this is in wxWidgets upstream meanwhile.

re #222
  • Loading branch information
bk138 committed Oct 6, 2024
1 parent 59fca83 commit 3c912ac
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/gui/bitmapFromMem.h
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
#ifndef BITMAPFROMMEM_H
#define BITMAPFROMMEM_H

#include <wx/mstream.h>
#include <wx/bmpbndl.h>
#include <wx/filename.h>
#include <wx/stdpaths.h>

#define bitmapFromMem(name) _GetBitmapFromMemory(name, sizeof(name))

inline wxBitmap _GetBitmapFromMemory(const unsigned char *data, int length)
{
wxMemoryInputStream is(data, length);
return wxBitmap(wxImage(is, wxBITMAP_TYPE_ANY, -1), -1);
}

#define bitmapBundleFromSVGResource(name) wxBitmapBundle::FromSVGFile(wxFileName(wxStandardPaths::Get().GetResourcesDir(), name, "svg").GetFullPath(), wxSize(24,24))

#endif
Expand Down

0 comments on commit 3c912ac

Please sign in to comment.