mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 15:46:52 +08:00
Patch from Bill - not freeing bitmap array?
git-svn-id: file:///fltk/svn/fltk/trunk@276 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+4
-6
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// "$Id: Fl_Pixmap.cxx,v 1.8 1999/01/07 19:17:24 mike Exp $"
|
// "$Id: Fl_Pixmap.cxx,v 1.9 1999/02/16 15:10:53 mike Exp $"
|
||||||
//
|
//
|
||||||
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
|
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
|
||||||
//
|
//
|
||||||
@@ -66,8 +66,8 @@ void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
|||||||
fl_mask_bitmap = &bitmap;
|
fl_mask_bitmap = &bitmap;
|
||||||
fl_draw_pixmap(data, 0, 0, FL_BLACK);
|
fl_draw_pixmap(data, 0, 0, FL_BLACK);
|
||||||
fl_mask_bitmap = 0;
|
fl_mask_bitmap = 0;
|
||||||
#ifdef WIN32 // Matt: mask done
|
|
||||||
if (bitmap) {
|
if (bitmap) {
|
||||||
|
#ifdef WIN32 // Matt: mask done
|
||||||
// this won't work ehen the user changes display mode during run or
|
// this won't work ehen the user changes display mode during run or
|
||||||
// has two screens with differnet depths
|
// has two screens with differnet depths
|
||||||
static uchar hiNibble[16] =
|
static uchar hiNibble[16] =
|
||||||
@@ -114,14 +114,12 @@ void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
|
|||||||
}
|
}
|
||||||
mask = (ulong)CreateBitmap(w, h, np, bpp, newarray);
|
mask = (ulong)CreateBitmap(w, h, np, bpp, newarray);
|
||||||
delete[] newarray;
|
delete[] newarray;
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if (bitmap) {
|
|
||||||
mask = XCreateBitmapFromData(fl_display, fl_window,
|
mask = XCreateBitmapFromData(fl_display, fl_window,
|
||||||
(const char*)bitmap, (w+7)&-8, h);
|
(const char*)bitmap, (w+7)&-8, h);
|
||||||
|
#endif
|
||||||
delete[] bitmap;
|
delete[] bitmap;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
fl_end_offscreen();
|
fl_end_offscreen();
|
||||||
}
|
}
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@@ -196,5 +194,5 @@ void Fl_Pixmap::label(Fl_Menu_Item* o) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// End of "$Id: Fl_Pixmap.cxx,v 1.8 1999/01/07 19:17:24 mike Exp $".
|
// End of "$Id: Fl_Pixmap.cxx,v 1.9 1999/02/16 15:10:53 mike Exp $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user