D13203: Add Typewriter annotation tool in Okular

Tobias Deiminger noreply at phabricator.kde.org
Thu May 31 06:48:52 UTC 2018


tobiasdeiminger added a comment.


  In D13203#270937 <https://phabricator.kde.org/D13203#270937>, @tobiasdeiminger wrote:
  
  > In D13203#270910 <https://phabricator.kde.org/D13203#270910>, @dileepsankhla wrote:
  >
  > > In ui/pagepainter.cpp L 668, we can comment out `acolor.setAlpha( opacity )` as here the value of opacity is 255 but changing the L 659 or 668 should be consistent in the case of other annotations too. Is commenting out L 668 accepted?
  >
  >
  >   if ( inplaceIntent == Okular::TextAnnotation::InplaceIntent ) acolor.setAlpha(0);
  >
  > in PagePainter.
  >
  > Any other ideas?
  
  
  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.

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/b4e641b1/attachment.html>


More information about the Okular-devel mailing list