One more thing, if I create a user defined symbol, like Bill Gee's electric light, it behaves just like I would like my redefined entrance symbol to behave.
ie not rotated in the legend, and it honours the -orientation setting in the drawing file. So why is, for example, a u:xxx symbol behaving differently to an entrance symbol or a dig symbol, which both behave badly, but in different ways? def p_u_electriclight (expr pos,theta,sc,al) = U:=(0.7u, 0.7u); % Reduce size of the symbol. The default size is too big. interim defaultscale:=0.4sc; T:=identity rotated theta aligned al scaled defaultscale shifted pos; %corrected to rotate THEN align pickup PenC; thdraw fullcircle scaled 0.5u shifted (0.0u, 0.7u); thdraw (-0.5u, -0.6u) -- (-0.5u, 0.0u); thdraw (-0.5u, 0.0u) .. (-0.35u, 0.55u) .. (0.0u, 0.7u); thdraw (0.0u, 0.7u) .. (0.35u, 0.55u) .. (0.5u, 0.0u); thdraw (0.5u,0.0u) -- (0.5u, -0.6u); thdraw (-0.7u, -0.6u) -- (0.7u, -0.6u); enddef; endcode From: Therion <therion-boun...@speleo.sk> On Behalf Of Bruce Mutton Sent: Thursday, 4 July 2019 21:17 To: 'List for Therion users' <therion@speleo.sk> Subject: [Therion] Point Symbol rotation in legend A quick quiz. Who knows where the code is that makes some point symbols rotate 90 degrees in the legend, and others not rotate? For example I have an entrance and dig symbol that are both defined to have rotation parsed to them, and yet one can be rotated, and the other cannot. And one is rotated 90 degrees in the legend, and the other not. OK, so the dig T: transformation does not include a rotation parameter, which explains why it does not follow -orientation settings, but that does not explain why symbols that do include a rotation parameter have their legend entries rotated (like entrance and gradient). For example, my gradient and slope points are rotated 90 deg in the legend, and can be rotated using the -orientation option. Whereas my dig point is not rotated in the legend and cannot be rotated using the -orientation option. I want to be able to rotate by omega entrance symbol (as in the drawing below) but I don't want it to rotate 90 degrees in the legend. Although legend symbols like gradient and water flow should continue to be rotated 90 deg. The code samples below produce the above symbols, and it is easy to see why the dig does not rotate in the drawing, but this does not explain why the dig symbol is not rotated 90 deg in the legend like the others. Any insights appreciated. Bruce def p_dig_UIS (expr pos,r,s,al) = U:=(.4u, .5u); T:=identity aligned al shifted pos; thfill ((-.075u,-.5u){down} .. {up}(0.075u, -.5u) -- (0.075u, .15u) -- (0.3u, 0.15u) -- (0.3u, 0.5u) -- (-.3u, .5u) -- (-.3u, .15u) -- (-.075u, .15u) -- cycle) rotated 45; enddef; def p_entrance (expr pos,theta,sc,al)= U:=(.35u,.3u); T:=identity rotated theta aligned al scaled sc shifted pos; %#rotated theta ##adding theta rotation to T: allows entrance symbol to be rotated on drawing, but causes entrance symbol to be rotated 90 deg in legend # If the T: parameters are changed, then the SYMBOL PARAMETER INDICATOR CODE below needs modifying as well pickup PenX; if known colour_entrance: thdraw (-.3u,-.25u) -- (-.2u,-.25u){dir 135} .. (0, .25u) .. {dir 225}(.2u,-.25u) -- (.3u,-.25u) withcolor colour_entrance; else: thdraw (-.3u,-.25u) -- (-.2u,-.25u){dir 135} .. (0, .25u) .. {dir 225}(.2u,-.25u) -- (.3u,-.25u); fi; enddef; endcode def p_gradient_BCRA (expr pos,theta,sc,al)= U:=(.25u,0.7u); T:=identity aligned al rotated theta scaled sc shifted pos; thfill (-.25u,-0.7u)--(0,.7u)--(.25u,-.7u)--cycle; enddef;
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion