Fix issue #510: image transparency is not properly processed.

This commit is contained in:
ManoloFLTK 2022-10-09 17:42:55 +02:00
parent 4d17cf310d
commit 1a5d6572e9
1 changed files with 2 additions and 1 deletions

View File

@ -778,7 +778,8 @@ void Fl_Cairo_Graphics_Driver::draw_cached_pattern_(Fl_Image *img, cairo_pattern
cairo_matrix_init_scale(&matrix, double(img->data_w())/Ws, double(img->data_h())/Hs);
cairo_matrix_translate(&matrix, -Xs + offset, -Ys + offset);
cairo_pattern_set_matrix(pat, &matrix);
cairo_mask(cairo_, pat);
if (img->d() >= 1) cairo_paint(cairo_);
else cairo_mask(cairo_, pat);
cairo_restore(cairo_);
surface_needs_commit();
}