Fix fl_draw_image sometimes crashes when window is scaled - cont'd (#1134)

This commit is contained in:
ManoloFLTK
2024-11-20 10:18:26 +01:00
parent 1f05a0df44
commit 0952d594f8
2 changed files with 2 additions and 1 deletions

View File

@@ -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){ 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); 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, void Fl_Quartz_Graphics_Driver::draw_image(Fl_Draw_Image_Cb cb, void* data,

View File

@@ -217,7 +217,7 @@ int fl_draw_pixmap(const char*const* cdata, int x, int y, Fl_Color bg) {
} // for Y } // 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; delete[] buffer;
return 1; return 1;