tobiasdeiminger added a comment.

  In D20760#455307 <https://phabricator.kde.org/D20760#455307>, @knambiar wrote:
  
  > In D20760#455290 <https://phabricator.kde.org/D20760#455290>, 
@tobiasdeiminger wrote:
  >
  > > Would it be useful if I tried to provide an SVG as replacement for the 
unicode symbols in an upcoming version, to resemble the exact line end drawing 
instructions as we do them in poppler code 
<https://gitlab.freedesktop.org/poppler/poppler/blob/master/poppler/Annot.cc#L1710>?
  >
  >
  > Certainly. Meanwhile I read the documentation and see that 
`QComboBox::setItemIcon` can be used to set the icon for combo box text.
  
  
  It just came to my mind that we should better reuse Okulars own line ending 
drawing code for the icon, instead of an SVG. Then I realized that code doesn't 
even exist yet :-/
  
  I mean the `if ( type == Okular::Annotation::ALine )` path in 
`PagePainter::paintCroppedPageOnPainter`. It is responsible to draw line 
annotations for non-PDF documents, where the backend doesn't know about the 
concept of annotations.
  It should handle `LineAnnotation::TermStyle`, but it doesn't.
  
  So your drop down selection will currently be ignored for EPUB, DjVu, ..., 
only PDF works. @ngraham: Do you think the patch could land as PDF-only, or do 
we need multi-format support from the beginning?
  
  > P.S.: I couldn't find the drawing methods in poppler at `Annot.cc:1710`, 
assuming it is at line 1576, method `AnnotAppearanceBuilder::drawLineEnding`.
  
  The link should get you to `AnnotAppearanceBuilder::drawLineEndArrow`. It's 
just one example. There are multiple methods, like 
`AnnotAppearanceBuilder::drawLineEndDiamond`, 
`AnnotAppearanceBuilder::drawLineEndCircle`, basically one for each style.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D20760

To: knambiar, #okular, #vdg
Cc: tobiasdeiminger, ngraham, okular-devel, joaonetto, tfella, darcyshen, aacid

Reply via email to