Fix line annotation leader line angle
ClosedPublic

Authored by tobiasdeiminger on May 10 2019, 11:48 PM.

Details

Summary

For "Straight Line" annotations, the "Leader Lines" (if any) shall be perpendicular to the main line segment. Current code missed to consider page aspect ratio when calculating the main segment angle, which caused non-perpendicular leader lines.

Note: Bug is only visible with non-PDF documents (i.e. where Okular draws line annotation, instead of generator).

Before:

After:

Test Plan
  • open a txt file, the generated page will have aspect ratio 3:4
  • configure a "Straight Line" annotation with long leader line
  • create a line annotation at 45 degree angle
  • check the leader line, it shall be perpendicular to the main line

Diff Detail

Repository
R223 Okular
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: Okular. · View Herald TranscriptMay 10 2019, 11:48 PM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
tobiasdeiminger requested review of this revision.May 10 2019, 11:48 PM
tobiasdeiminger edited the summary of this revision. (Show Details)May 10 2019, 11:53 PM
sander accepted this revision.May 14 2019, 10:02 AM
This revision is now accepted and ready to land.May 14 2019, 10:02 AM

@aacid Should this small fix land on Applications/19.04 branch, or master only?

aacid added a comment.May 14 2019, 8:57 PM

it's a bugfix that doesn't seem to carry any danger, so 19.04 and then merge to master

This revision was automatically updated to reflect the committed changes.