|
From: Mojca M. <moj...@gm...> - 2014-06-03 12:55:56
|
On Mon, Jun 2, 2014 at 5:39 PM, sfeam wrote: > On Monday, 02 June 2014 11:18:08 AM Christoph Bersch wrote: >> >> Zitat von sfeam <sf...@us...>: >> >> > On Sunday, 01 June 2014 07:34:53 PM Christoph Bersch wrote: >> > >> >> I've seen, that different terminals handle the `dashlength` option >> >> differently: >> >> >> >> set termoption dashlength 1 >> >> plot x dt 2, 2*x dt '.-' >> >> pause -1 >> >> >> >> set termoption dashlength 3 >> >> replot >> >> >> >> `qt`: dashlength affects only the custom dash pattern >> >> `wxt`: both patterns are stretched >> >> `post`: only the builtin patterns are affected >> >> >> >> This behaviour should be equal for all terminals. >> > >> > Good point. >> >> I've had a quick look at the Qt-documentation, but I couldn't find an >> option to change the dash length for the builtin patterns. > > Correct. > >> Another thing I've seen is, that for some terminals the dash pattern >> length depends on the linewidth, e.g. for the `qt` terminal. For >> others, like the `wxt` terminal it doesn't. > > Qt docs: "the dash pattern is specified in units of the pens width" > >> [...] we should try to have similar >> behavior across the terminals, or at least try to. > > For output devices that really do provide their own dash types > we can't do much other than use them as provided. But wxt isn't a black box that simply draws dashed lines with "please give me dash type 3" and could probably be fixed. I'm attaching an example of a patch that fixes at least some cases (please note that I'm not familiar with wxt code, I haven't verified or tested the patch extensively, it's just a quick hack and it's possible that I made mistakes; use it only as a proof-of-principle for now). > But we can aim for consistent behavior of the new "custom" > dashtypes. I kind of like the Qt approach of scaling the > dashlength with the line width. I'm not certain that would > work for all terminal types but it's something to think about. I agree. Scaling the dash length with the pen width certainly makes sense. In all terminals where this can be supported. Mojca |