Draw line caption for non-PDF documents
Needs ReviewPublic

Authored by tobiasdeiminger on May 29 2019, 9:52 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Maniphest Tasks
T11014: Dimension line annotation tool
Summary

Line captions are already implemented in poppler / PDF generator (can't be enabled in okular UI yet, but that's another story).

This adds the drawing code for non-PDF documents.

Looks like this:

TODO:

  • obey inline / top setting
  • precombine transformation matrix
  • if inline, partially spare out main segment
  • figure out which font size and color to use
  • adjust placement under some conditions (e.g. avoid upside down text)?

Depends on D21248

Diff Detail

Repository
R223 Okular
Branch
feature/linecaption
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12262
Build 12280: arc lint + arc unit
Restricted Application added a project: Okular. · View Herald TranscriptMay 29 2019, 9:52 PM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
tobiasdeiminger requested review of this revision.May 29 2019, 9:52 PM
tobiasdeiminger edited the summary of this revision. (Show Details)May 29 2019, 9:54 PM

Does anybody feel like adding a nice UI for this feature? :-)

In it's simplest form it would be a "show caption" checkbox in the straight line tool.

Line captions, so cool!!! Maybe @simgunz is interested in the UI angle as a part of his annotations UI overhaul?

Hi,
yes I can try to think of something to expose this feature. As @tobiasdeiminger suggested, I would open a task regarding the straight line tool, where we can also discuss the point on how to deal with the proper line ending (see BUG: 407463). I would like to first push my changes regarding the new annotation toolbar, so we can discuss how to expose this feature, also taking into consideration that new interface.