mirror of
https://github.com/fltk/fltk.git
synced 2026-05-29 20:45:33 +08:00
Accept empty Fl_Pixmap in Fl_RGB_Image c'tor (STR #3348).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -3,6 +3,7 @@ CHANGES IN FLTK 1.3.4rc4 RELEASED: Nov ?? 2016
|
|||||||
Bug fixes and other improvements
|
Bug fixes and other improvements
|
||||||
|
|
||||||
- MacOS: fix a crash when closing a fullscreen window.
|
- MacOS: fix a crash when closing a fullscreen window.
|
||||||
|
- Accept empty Fl_Pixmap in Fl_RGB_Image c'tor (STR #3348).
|
||||||
|
|
||||||
CHANGES IN FLTK 1.3.4rc3 RELEASED: Oct 31 2016
|
CHANGES IN FLTK 1.3.4rc3 RELEASED: Oct 31 2016
|
||||||
|
|
||||||
|
|||||||
+7
-3
@@ -294,12 +294,16 @@ Fl_RGB_Image::Fl_RGB_Image(const uchar *bits, int W, int H, int D, int LD) :
|
|||||||
*/
|
*/
|
||||||
Fl_RGB_Image::Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg):
|
Fl_RGB_Image::Fl_RGB_Image(const Fl_Pixmap *pxm, Fl_Color bg):
|
||||||
Fl_Image(pxm->w(), pxm->h(), 4),
|
Fl_Image(pxm->w(), pxm->h(), 4),
|
||||||
|
array(0),
|
||||||
|
alloc_array(0),
|
||||||
id_(0),
|
id_(0),
|
||||||
mask_(0)
|
mask_(0)
|
||||||
{
|
{
|
||||||
array = new uchar[w() * h() * d()];
|
if (pxm && pxm->w() > 0 && pxm->h() > 0) {
|
||||||
alloc_array = 1;
|
array = new uchar[w() * h() * d()];
|
||||||
fl_convert_pixmap(pxm->data(), (uchar*)array, bg);
|
alloc_array = 1;
|
||||||
|
fl_convert_pixmap(pxm->data(), (uchar*)array, bg);
|
||||||
|
}
|
||||||
data((const char **)&array, 1);
|
data((const char **)&array, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user