[GRASS-dev] [GRASS GIS] #250: ps.map: new parameter to set line cap style of vector lines

#250: ps.map: new parameter to set line cap style of vector lines
-----------------------------------------+----------------------------------
Reporter: alf | Owner: grass-dev@lists.osgeo.org
     Type: enhancement | Status: new
Priority: major | Milestone: 6.4.0
Component: ps.map | Version: svn-develbranch6
Keywords: line cap style vector round | Platform: All
      Cpu: x86-32 |
-----------------------------------------+----------------------------------
Hello,

The code patch attached adds the 'cap' parameter to the vlines section of
ps.map, allowing to control the look of the ends of a vector line, or the
ends of the dashes in the case of a dashed line.

Three are the possible values: 'butt' (the default), 'round' for rounded
ends and 'extbutt' for extended butt ends. More detals are reported in
the updated documentation herein.

Please review it, test it and apply, if possible.

Regards,

Alessandro Frigeri

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/250&gt;
GRASS GIS <http://grass.osgeo.org>

#250: ps.map: new parameter to set line cap style of vector lines
--------------------------+-------------------------------------------------
  Reporter: alf | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: major | Milestone: 6.4.0
Component: ps.map | Version: svn-develbranch6
Resolution: | Keywords: line cap style vector round
  Platform: All | Cpu: x86-32
--------------------------+-------------------------------------------------
Comment (by hamish):

Hi,

patch looks good.

minor typo in docs: hald -> half line width.
Please break HTML at column 75-80.

maybe initialize linecap to -1 instead of testing to see if it is NULL.
(??)

before applying I'd like to hear ideas from the list on the added control
vs. lost simplicity aspects. also, any ideas on how best to implement
pattern=dashed and dotted? ("solid" is already there as an alias)

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/250#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#250: ps.map: new parameter to set line cap style of vector lines
--------------------------+-------------------------------------------------
  Reporter: alf | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: major | Milestone: 6.4.0
Component: ps.map | Version: svn-develbranch6
Resolution: | Keywords: line cap style vector round
  Platform: All | Cpu: x86-32
--------------------------+-------------------------------------------------
Comment (by hamish):

screenshot examples of line-end types:
   http://local.wasp.uwa.edu.au/~pbourke/dataformats/postscript/

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/250#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#250: ps.map: new parameter to set line cap style of vector lines
--------------------------+-------------------------------------------------
  Reporter: alf | Owner: hamish
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: ps.map | Version: svn-develbranch6
Resolution: | Keywords: line cap style vector round
  Platform: All | Cpu: x86-32
--------------------------+-------------------------------------------------
Changes (by hamish):

  * status: new => assigned
  * owner: grass-dev@lists.osgeo.org => hamish
* cc: grass-dev@lists.osgeo.org (added)

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/250#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#250: ps.map: new parameter to set line cap style of vector lines
--------------------------+-------------------------------------------------
  Reporter: alf | Owner: hamish
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: ps.map | Version: svn-develbranch6
Resolution: | Keywords: line cap style vector round
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by hamish):

  * cpu: x86-32 => All

Comment:

I had a look to do a similar thing with the region instruction, which is
currently drawn as a series of individually stroked lines which do not
connect and look ugly if line width is set thick. These lines are plotted
using the do_plt.c plotting instruction tmp file.
It can't be passed as a rectangle plot instruction as it subdivides the
horizontal line into three sections in case the region goes the long way
around a LL world.

I expect the easiest solution for the (sub)region box will be to put PS
writing code directly into r_wind.c, but I worry that that code is
executed before the main ps.map box is calculated and rendered.

So as a second solution for that- perhaps we should add a "Y" polyline
instruction to the do_plt.c set of internal drawing commands. ??

As for the main wish, I am still waiting on any feedback wrt the level of
control we should provide before applying the patch.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/250#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#250: ps.map: connected lines for region instruction box
--------------------------+-------------------------------------------------
  Reporter: alf | Owner: hamish
      Type: enhancement | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: ps.map | Version: svn-develbranch6
Resolution: | Keywords: line cap style vector round
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by hamish):

  * summary: ps.map: new parameter to set line cap style of vector lines
              => ps.map: connected lines for region
              instruction box

Comment:

linecap instruction and "dashed", "dotted", & "dashdotted" line patterns
added in SVN.
(r33487 - r33489)

region box still needs to connected lines, so changing the ticket summary.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/250#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#250: ps.map: connected lines for region instruction box
--------------------------+-------------------------------------------------
  Reporter: alf | Owner: grass-dev@lists.osgeo.org
      Type: enhancement | Status: new
  Priority: major | Milestone: 6.4.0
Component: ps.map | Version: svn-develbranch6
Resolution: | Keywords: line cap style vector round
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by hamish):

  * status: assigned => new
  * owner: hamish => grass-dev@lists.osgeo.org
* cc: grass-dev@lists.osgeo.org (removed)

Comment:

reassigning the region box problem back to the dev-pool.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/250#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#250: ps.map: connected lines for region instruction box
-----------------------------------------+----------------------------------
Reporter: alf | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: Ps.map | Version: svn-trunk
Keywords: line cap style vector round | Platform: All
      Cpu: All |
-----------------------------------------+----------------------------------
Changes (by neteler):

  * priority: major => normal
  * version: svn-develbranch6 => svn-trunk
  * milestone: 6.4.0 => 7.0.0

Comment:

Since patches were only applied to trunk, updating milestone.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/250#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>