From ccf6e828c570151b447449a10d759a4031a3c076 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 9 Apr 2020 16:43:46 +0200 Subject: WIP: Highlioghts and clicks re-enabled. --- plugingui/painter.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugingui/painter.cc') diff --git a/plugingui/painter.cc b/plugingui/painter.cc index cc7c66e..7f7b6c8 100644 --- a/plugingui/painter.cc +++ b/plugingui/painter.cc @@ -496,7 +496,12 @@ void Painter::drawRestrictedImageStretched(int x0, int y0, auto& c = image.getPixel(lx, ly); if(c == restriction_colour && c.alpha() > 0) { - pixbuf.addPixel(x0 + x, y0 + y, restriction_colour); + Colour col(restriction_colour); + int alpha = col.data()[3]; + alpha *= c.alpha(); + col.data()[3] = alpha / 255; + pixbuf.addPixel(x0 + x, y0 + y, col); + //pixbuf.addPixel(x0 + x, y0 + y, restriction_colour); } } } -- cgit v1.2.3