[Therion] Point Symbol rotation in legend
Bruce Mutton
bruce at tomo.co.nz
Thu Jul 4 11:17:15 CEST 2019
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;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20190704/33b137ea/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 20274 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20190704/33b137ea/attachment.jpg>
More information about the Therion
mailing list