mirror of
https://github.com/fltk/fltk.git
synced 2025-12-06 18:21:51 +08:00
Fix fl_draw_image sometimes crashes when window is scaled - cont'd (#1134)
This commit is contained in:
@@ -107,6 +107,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
|
||||
}
|
||||
|
||||
void Fl_Quartz_Graphics_Driver::draw_image(const uchar* buf, int x, int y, int w, int h, int d, int l){
|
||||
d &= ~FL_IMAGE_WITH_ALPHA;
|
||||
innards(buf,x,y,w,h,d,l,(d<3&&d>-3),0,0,gc_,this);
|
||||
}
|
||||
void Fl_Quartz_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data,
|
||||
|
||||
@@ -217,7 +217,7 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
|
||||
} // for Y
|
||||
}
|
||||
|
||||
fl_draw_image(buffer, x, y, w, h, 4);
|
||||
fl_draw_image(buffer, x, y, w, h, 4 | FL_IMAGE_WITH_ALPHA);
|
||||
|
||||
delete[] buffer;
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user