[Therion] My map-connection symbol has broken recently
Martin Budaj
m.budaj at gmail.com
Sat Apr 24 18:43:30 CEST 2021
Hi Bruce,
it should be fixed now. The conversion from MetaPost to PDF has been
substantially changed after 5.5.7 so there might still be some issues like
this. If you spot something unusual, just let us know.
Cheers
Martin
On Sat, Apr 24, 2021 at 11:22 AM Bruce Mutton <bruce at tomo.co.nz> wrote:
> Somewhere between Therion 5.5.7+67fffb0 (2021-02-22) and Therion
> 5.5.7+c43b32a (2021-03-08) (hope those are the right versions – I might
> have got confused) the behaviour of my line arrows and map-connections has
> changed.
>
> I use some modified/customised code for these, which I last edited in
> 2018, so while this recent change in behaviour might be a consequence of my
> clumsy coding, the change is triggered somewhere between those two
> development releases.
>
> Therion calls the metapost definition l_arrow to draw both arrows and map
> connections, so to some extent the appearance of each is tied together.
>
>
>
> I’m just wondering if I should tidy up my symbol definition code (I know I
> should) or whether something has been broken slightly in the recent Therion
> versions?
>
>
>
> This is what I used to have, with Therion 5.5.7+67fffb0 (2021-02-22) and
> earlier.
>
>
>
> And for arrows, these small filled heads are what I used to get
>
>
>
>
>
>
>
> With Therion 5.5.7+c43b32a (2021-03-08) this is what I now get
>
>
>
>
>
>
>
>
>
> Same is happening with Therion 5.5.7+f94faef (2021-04-23)
>
>
>
> Looks like the arrow heads on a line arrow now are drawn wider, such that
> a gap appears inside of the arrow head, dependant on the arc of the line on
> which it is drawn.
>
> And somehow the arrow head on the map-connection line has become fat and
> blobby. The pen width appears to have grown very wide.
>
>
>
> As though my custom code is no longer being used for arrow heads?
>
>
>
> My custom code for map-connections, last edited in May 2018 as below.
>
> Aside from the problem I have described above, I would like the arrow
> lines to be narrower than the map connection lines, and the arrow heads for
> line arrows to be small and the arrow heads for map connections to be large.
>
> Three years ago when I tried I could not make it work, but maybe as a
> result of this someone can give some guidance.
>
> Having mapconnection call l_arrow brings about a nice degree of
> consistency, but can be frustrating where discrete differences are desired.
>
>
>
> If anyone knows how to morph the arrow heads to follow the curve of the
> line, that would be great as well. To avoid the disjointed examples on the
> left above.
>
>
>
> Bruce
>
>
>
> #ARROW and MAP-CONNECTION REDEFINITIONS
>
> #--------------------------
>
> code metapost
>
> % Q = 0 -- no arrows
>
> % 1 -- end
>
> % 2 -- begin
>
> % 3 -- both
>
> *def l_arrow (expr P, Q) =*
>
> T:=identity;
>
> pickup PenB;
>
> thdraw P;
>
> p := (-.1u,-.5u)--(0,0)--(.1u,-.5u)--cycle;
>
> % 0.25 changed to .5 and close end to get nicer arrowhead
>
> if odd Q:
>
> thfilldraw p rotated (angle(thdir(P,0))+90)
>
> shifted (point 0 of P);
>
> fi;
>
> if Q>1:
>
> thfilldraw p rotated (angle(thdir(P,length P))-90)
>
> shifted (point infinity of P);
>
> fi;
>
> enddef;
>
>
>
> *def l_mapconnection (expr P) =*
>
> thdrawoptions(dashed dashpattern(on 1bp off 2bp on 1bp off 2bp)
>
>
>
> scaled (2 * optical_zoom) withpen PenB);
>
> %draw map-connection line with arrowhead at end
>
> l_arrow(P,1); %How to double or triple arrowhead size with this call?
>
>
>
> %draw dot at start of map-connection line
>
> thdraw point infinity of P withpen pencircle scaled 0.3u;
>
> %Why infinity and not 0 for dot at start of line??
>
> %If point before arrow head, then point does not render in legend but does
> on map??
>
>
>
> thdrawoptions();
>
> enddef;
>
> endcode
>
>
>
>
>
>
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> https://mailman.speleo.sk/listinfo/therion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 7975 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 137703 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0012.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 76683 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0013.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 22713 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0014.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.png
Type: image/png
Size: 33663 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0015.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.png
Type: image/png
Size: 22213 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0016.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image012.png
Type: image/png
Size: 9217 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0017.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image014.png
Type: image/png
Size: 139141 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0018.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image016.png
Type: image/png
Size: 15273 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0019.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image018.png
Type: image/png
Size: 20384 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0020.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image020.png
Type: image/png
Size: 14153 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20210424/032785f2/attachment-0021.png>
More information about the Therion
mailing list