Bug 381629 - add arrow's option to annotation tools
Summary: add arrow's option to annotation tools
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.24.0
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-25 03:22 UTC by sebastian
Modified: 2019-06-01 15:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sebastian 2017-06-25 03:22:06 UTC
If it is possible, I want you to add an arrow's option to the annotation tools because I need it in some situation and it is difficult to make it with straight line, I don't know if there are some people who need this option too
   Thanks.
Comment 1 azzamsa 2018-11-01 01:46:49 UTC
Come here for requesting this feature too. Hope it will be implemented soon.
Comment 2 Tobias Deiminger 2018-11-01 18:22:34 UTC
Certainly a useful feature. Needs person power, and might be a student project (?).

Entry point would be to read the PDF reference, which defines "OpenArrow" and "ClosedArrow" for Line and Polyline Annotations (annotations in Okular closely follow the PDF standard, even for non-PDF documents). 

For non-PDF docs, drawing those line endings would have to be implemented in ui/pagepainter.cpp, PagePainter::paintCroppedPageOnPainter, "if ( type == Okular::Annotation::ALine )".

For PDF documents, drawing operations had to go into the poppler library, poppler/Annot.cc, AnnotLine::generateLineAppearance and AnnotPolygon::draw. Popplers core and Qt5 API is already prepared to take line ending settings. But eventually there's no life but a "// TODO: Line endings" in the code.

Of course we would also have to implement all the surrounding UI dialogs, config settings and document archive entries.
Comment 4 Tobias Deiminger 2019-05-26 08:15:20 UTC
Git commit b1c30cd0edd3540065b010730eccbb91a75faff4 by Tobias Deiminger, on behalf of Rajeesh K Nambiar.
Committed on 26/05/2019 at 08:15.
Pushed by tobiasdeiminger into branch 'master'.

Okular Annotation: add line start/end style config only for Straight Line tool

Summary:
“Inner Color” configuration of Polygon tool was overlapping with the line start/end styles intended for only Straight Line tool. Fix it.

Test Plan:
1. Configure annotations
2. Create/Edit Polygon tool
3. Observe that no Line Start/End styles are visible
4. Create/Edit Straight Line tool
5. Observe that line start/end styles can be configured

Reviewers: #okular, tobiasdeiminger

Reviewed By: tobiasdeiminger

Subscribers: tobiasdeiminger, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D21332

M  +45   -43   ui/annotationwidgets.cpp
M  +7    -7    ui/annotationwidgets.h

https://commits.kde.org/okular/b1c30cd0edd3540065b010730eccbb91a75faff4
Comment 5 Tobias Deiminger 2019-06-01 15:29:03 UTC
Git commit d0e3a77de2c3b219c94b37a0a07953635840cd7f by Tobias Deiminger.
Committed on 01/06/2019 at 15:28.
Pushed by tobiasdeiminger into branch 'master'.

Add line annotation ending arrows for non PDF documents

Summary:
This implements drawing the various line ending styles for 2 point lines in non-PDF documents.

Looks like this:
{F6833437}

Test Plan:
- open a *.txt document
- draw line annotations with different arrow styles: Square, Diamond, OpenArrow, ClosedArrow, ROpenArrow, RClosedArrow, Butt, Slash, Circle
- ... as start and as end style (start needs D21238 to be configurable in GUI)
- ... filled or not (fill color can't be configured in GUI yet)
- ... with different leader line settings
- ... at various angles
- rotate and scale page
- leader line with setting 100 gives 100 pixel line at 100% zoom (use kruler to verify)

Reviewers: #okular, aacid, sander

Reviewed By: sander

Subscribers: ngraham, sander, knambiar, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D21248

M  +0    -4    ui/annotationwidgets.cpp
M  +295  -70   ui/pagepainter.cpp
M  +51   -0    ui/pagepainter.h

https://commits.kde.org/okular/d0e3a77de2c3b219c94b37a0a07953635840cd7f
Comment 6 Tobias Deiminger 2019-06-01 15:45:30 UTC
Resolved by adding arrow option to straight line tool. Will be released with KDE Applications 19.08.0.