#include "wx/icon.h"
#include "wx/math.h"
#include "wx/image.h"
+ #include "wx/colour.h"
#endif
#include "wx/rawbmp.h"
// one bit per pixel, each row starts on a byte boundary
const size_t out_size = size_t((w + 7) / 8) * unsigned(h);
wxByte* out = new wxByte[out_size];
- // set bits are white
+ // set bits are unmasked
memset(out, 0xff, out_size);
unsigned bit_index = 0;
if (bitmap.HasPixbuf())
{
public:
wxBitmapRefData();
- ~wxBitmapRefData();
+ virtual ~wxBitmapRefData();
GdkPixmap *m_pixmap;
GdkPixbuf *m_pixbuf;
// one bit per pixel, each row starts on a byte boundary
const size_t out_size = size_t((w + 7) / 8) * unsigned(h);
wxByte* out = new wxByte[out_size];
- // set bits are white
+ // set bits are black
memset(out, 0xff, out_size);
const wxByte* in = image.GetData();
unsigned bit_index = 0;
wxASSERT( gdk_pixbuf_get_width(pixbuf) == width );
wxASSERT( gdk_pixbuf_get_height(pixbuf) == height );
- SetDepth(wxTheApp->GetGdkVisual()->depth);
+ SetDepth(32);
SetPixbuf(pixbuf);
// Copy the data:
GdkPixmap* pixmap_invert = NULL;
if (GetDepth() == 1)
{
- // mono bitmaps are inverted
+ // mono bitmaps are inverted, i.e. 0 is white
pixmap_invert = gdk_pixmap_new(pixmap, w, h, 1);
GdkGC* gc = gdk_gc_new(pixmap_invert);
gdk_gc_set_function(gc, GDK_COPY_INVERT);