From 471aca03bc18b59851500391f32d7b943fded87c Mon Sep 17 00:00:00 2001 From: Cyprinus Carpio Date: Sun, 28 Jul 2024 21:53:40 +0200 Subject: GDI: fix StretchBlt mode setting --- src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx index 22f6d6d32..b369d1de4 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx @@ -619,7 +619,7 @@ void Fl_GDI_Graphics_Driver::draw_rgb(Fl_RGB_Image *rgb, int XP, int YP, int WP, if ( (rgb->d() % 2) == 0 ) { alpha_blend_(this->floor(XP), this->floor(YP), WP, HP, new_gc, 0, 0, rgb->data_w(), rgb->data_h()); } else { - SetStretchBltMode(gc_, HALFTONE); + SetStretchBltMode(gc_, (Fl_Image::scaling_algorithm() == FL_RGB_SCALING_BILINEAR ? HALFTONE : BLACKONWHITE)); StretchBlt(gc_, this->floor(XP), this->floor(YP), WP, HP, new_gc, 0, 0, rgb->data_w(), rgb->data_h(), SRCCOPY); } RestoreDC(new_gc, save); -- cgit v1.2.3