Bug 159023 - shape tool improvements
Summary: shape tool improvements
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-09 16:04 UTC by albert
Modified: 2008-04-07 01:15 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description albert 2008-03-09 16:04:45 UTC
Version:            (using KDE 4.0.1)
Installed from:    Ubuntu Packages

I think the shape tool requires some refinements:
1) An option to insert a shape without outline
2) A way to choose the outline thickness
3) Multiply blending mode, that we can rename "Highlighter Mode". It may be useful as an highlighter for scanned documents that haven't got OCR text associated to: for those documents the normal highlighter tool doesn't work.
Comment 1 Pino Toscano 2008-03-09 16:12:08 UTC
> I think the shape tool requires some refinements

Which "shape tool"?

> 3) Multiply blending mode, that we can rename "Highlighter Mode".

Tried changing the opacity?
Comment 2 albert 2008-03-09 19:36:04 UTC
1) The review tool named "Cyan Ellipse", that actually is a shape tool because it allows insertion of rectangular also and even not cyan colored.

2) Low opacity can be used for that purpose but it reduces to some degree the text visibility. Multiply blending mode, instead, has no "contraindications".
Comment 3 Pino Toscano 2008-03-09 20:53:48 UTC
Then I don't understand why you want to remove the outline, as the outline _is_ the shape. You can always set an inner color close (if not the same) as the color of the shape.

About the thickness: we currently have our annotation tools matching as close as possible the PDF annotations. Because of that, I don't want to add options that we will not be able to eventually write back to the PDF some (not so remote) day. So, this is out, sorry.

For the blending mode: the tool is designed to draw a shape on the document, not to really highlight (as in cover) a zone of text. I'm not sure that Acrobat does that.
Comment 4 albert 2008-03-10 16:59:22 UTC
>About the thickness: we currently have our annotation tools matching as close as possible the PDF annotations. Because of that, I don't want to add options that we will not be able to eventually write back to the PDF some (not so remote) day. So, this is out, sorry.
 
This is an extract from: PDF Reference, Sixth Edition, version 1.7 (http://www.adobe.com/devnet/acrobat/pdfs/pdf_reference_1-7.pdf), page 630 and following.

Circle and square annotations are described by an annotation dictionary. The entries specific to these types of annotations are:

KEY		TYPE       	VALUE
Subtype 		name      	 (Required) The type of annotation that this dictionary describes; must be Square
                   			or Circle for a square or circle annotation, respectively.

BS      		dictionary 	(Optional) A border style dictionary (see Table 8.17 on page 611) specifying the
                   			line width and dash pattern to be used in drawing the rectangle or ellipse.
                   			Note: The annotation dictionary’s AP entry, if present, takes precedence over the
                   			Rect and BS entries; see Table 8.15 on page 606 and Section 8.4.4, “Appearance
                   			Streams.”

IC     		 array      	(Optional; PDF 1.4) An array of numbers in the range 0.0 to 1.0 specifying the
                   			interior color with which to fill the annotation’s rectangle or ellipse. The number
                   			of array elements determines the color space in which the color is defined:
                       			0    No color; transparent
                       			1    DeviceGray
                       			3    DeviceRGB
                       			4    DeviceCMYK

BE      		dictionary 	(Optional; PDF 1.5) A border effect dictionary describing an effect applied to the
                   			border described by the BS entry (see Table 8.18).

The entries of Border Style dictionary (BS) are:

KEY  		TYPE   		VALUE

Type 		name   		(Optional) The type of PDF object that this dictionary describes; if present, must be
            				Border for a border style dictionary.

W    		number 		(Optional) The border width in points. If this value is 0, no border is drawn. Default
            				value: 1.

S    		name   		(Optional) The border style:
                			S    (Solid) A solid rectangle surrounding the annotation.
                			D    (Dashed) A dashed rectangle surrounding the annotation. The dash pattern
                 			      is specified by the D entry (see below).
                			B    (Beveled) A simulated embossed rectangle that appears to be raised above the
                			     surface of the page.
                			I    (Inset) A simulated engraved rectangle that appears to be recessed below the
                			     surface of the page.
                			U    (Underline) A single line along the bottom of the annotation rectangle.
            				      Other border styles may be defined in the future. Default value: S.

D    		array  		(Optional) A dash array defining a pattern of dashes and gaps to be used in drawing a
            				dashed border (border style D above). The dash array is specified in the same format
            				as in the line dash pattern parameter of the graphics state (see “Line Dash Pattern” on
            				page 217). The dash phase is not specified and is assumed to be 0. For example, a D
            				entry of [ 3 2 ] specifies a border drawn with 3-point dashes alternating with 2-point
            				gaps. Default value: [ 3 ].

As you can see to be compatible with PDF Specifications, border width must be editable (0, no border, is allowed and default is 1 point not 18 points).

Ciao...
Comment 5 Pino Toscano 2008-04-07 01:15:00 UTC
SVN commit 794223 by pino:

Allow to configure (not to zero) the pen width of a geometric annotation.

CCBUG: 159023


 M  +9 -0      annotationwidgets.cpp  
 M  +1 -0      annotationwidgets.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=794223