D13203: Add Typewriter annotation tool in Okular
Dileep Sankhla
noreply at phabricator.kde.org
Thu May 31 07:12:38 UTC 2018
dileepsankhla added a comment.
> How about changing ui/pagepainter.cpp L668 to
>
> acolor.setAlpha( a->style().opacity() * a->style().color().alpha() );
>
> It gives us transparent background for new typewriter annotations. It should be backwards/forwards compatible with *.okular documents from other Okular versions. And I believe it's more consistent to what happens in Poppler, because I assume in Poppler color[alpha] and opacity will also get multiplied to determine the final alpha of background color for FreeText, if both values are set. But haven't verified this assumption yet.
I agree but why do we need to multiply alpha value and opacity to determine the final alpha of background color for FreeText in Poppler? It is already determined by alpha value solely. I mean isn't it enough to change the line to `acolor.setAlpha( a->style().opacity() * a->style().color().alpha() )` as you suggested? Why do we need to change the Poppler's one?
Secondly, in my opinion, we should change L 628 to `unsigned int opacity = (unsigned int)( a->style().color().alpha() * a->style().opacity() )` and here the variable `opacity` will determine the background color of FreeText.
REPOSITORY
R223 Okular
REVISION DETAIL
https://phabricator.kde.org/D13203
To: dileepsankhla
Cc: ltoscano, ngraham, tobiasdeiminger, aacid, okular-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20180531/e1d6d92b/attachment.html>
More information about the Okular-devel
mailing list