Feature #584

Specify solid pen style in -W option

Added by Mikhail over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:2014-06-28
Priority:NormalDue date:
Assignee:Paul% Done:

100%

Category:-
Target version:Candidate for next bugfix release
Platform:

Description

Hi,

Currently pen styles are only for dashed lines. If pen style is omitted it does not default
to solid line, but to the previous style (which can be dashed) defined by MAP_DEFAULT_PEN.

The suggestion is to allow explicit style specification like:

-Wthin,red,solid

OR

if style is omitted, always use solid, regardless of previous defined variables.

Just a suggestion.

Best Regards
Mikhail

dotted.png - Should be it just sequence of dots? (35.5 KB) Mikhail, 2014-06-29 17:01

History

#1 Updated by Paul over 3 years ago

  • Status changed from New to Resolved
  • Assignee set to Paul
  • Target version set to Candidate for next bugfix release
  • % Done changed from 0 to 100

I fixed this so "solid" is a valid style that overrides any default style the pen has been initialized with. While at it I added "dashed" and "dotted" as valid longforms for single "-" and ".". Also updated the usage message that had GMT4 short-hands "a" and "o" listed as valid styles. Finally, under compatibility mode we now accept those old "a" and "o" but give the usual deprecated message. In r13301.

#2 Updated by Mikhail over 3 years ago

Hi Paul,

It works as expected. If no option is given then it takes MAP_DEFAULT_PEN.
If solid, it makes it solid.

I am a bit puzzled with "dotted" Please see attached sample. I would
expect dotted to be like ......... and not combination of dots and dashes.
"Dashed" looks similar to the sample but has long and short dashes.

Thank you very much!

Mikhail

#3 Updated by Paul over 3 years ago

Hm, I cannot recreate that. Could you please send me a command that gives the wrong result?

#4 Updated by Mikhail over 3 years ago

Hi Paul,

this was a fault in my script. Sorry for bothering you. Everything works as expected.

Thank you very much!

Mikhail

#5 Updated by Paul over 3 years ago

Great. I also added protection against long sequences since I learned the hard way (trying –..–..) that the PostScript language has a limit of 11 items for the setdash operator. In r13303.

#6 Updated by Paul over 3 years ago

  • Status changed from Resolved to Closed

Closing this issue as fixed.

Also available in: Atom PDF