Opened 16 years ago

Last modified 5 years ago

#250 new enhancement

ps.map: connected lines for region instruction box

Reported by: alf Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Ps.map Version: svn-trunk
Keywords: line cap style vector round Cc: afrigeri@…, thare@…
CPU: All Platform: All

Description

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

Attachments (1)

psmap_linecap.diff (3.5 KB ) - added by alf 16 years ago.
ps.map patch for line cap style - includes also documentation updates

Download all attachments as: .zip

Change History (16)

by alf, 16 years ago

Attachment: psmap_linecap.diff added

ps.map patch for line cap style - includes also documentation updates

comment:1 by hamish, 16 years ago

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

comment:2 by hamish, 16 years ago

screenshot examples of line-end types:

http://local.wasp.uwa.edu.au/~pbourke/dataformats/postscript/

Hamish

comment:3 by hamish, 16 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to hamish
Status: newassigned

comment:4 by hamish, 16 years ago

CPU: x86-32All

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

comment:5 by hamish, 16 years ago

Summary: ps.map: new parameter to set line cap style of vector linesps.map: connected lines for region instruction box

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

comment:6 by hamish, 15 years ago

Cc: grass-dev@… removed
Owner: changed from hamish to grass-dev@…
Status: assignednew

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

Hamish

comment:7 by neteler, 12 years ago

Milestone: 6.4.07.0.0
Priority: majornormal
Version: svn-develbranch6svn-trunk

Since patches were only applied to trunk, updating milestone.

comment:8 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:9 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:10 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:11 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:12 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:13 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:14 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:15 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.