This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Patterned fill layers and opacity

Tags: None
(comma "," separated)
User avatar
surt
Registered Member
Posts
20
Karma
0
OS

Patterned fill layers and opacity

Fri Jan 09, 2015 8:23 pm
I'm trying to put a full opacity patterned fill layer in an image, but no matter what I try it is always mostly transparent.

If I add a brand new fill layer to a brand new image, delete the empty default layer I can clearly see alpha checkers showing through.
The opacity slider is still at its default 100%.

I've tried both with the built in patterns and my own images that I know have no built-in transparency.
Always the same result: shows transparency.

Am I missing a trick somewhere?
User avatar
surt
Registered Member
Posts
20
Karma
0
OS
Posted a bug here as I can't see how this could be intended behaviour.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS
Outch... Yes, this looks very suspicious, from the code for pattern fill layers:

KisFillPainter gc(dst);
gc.setPattern(pattern);
gc.setOpacity(100);
gc.fillRect(QRect(dstInfo.topLeft(), size), pattern);
gc.end();

Meaning we always fill the layer with an opacity set to 100 out of a range of 0..255, i.e., less than half! I guess the original author assumed that the the range was 0..100%. That author was me...


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], q.ignora, watchstar