[Therion] Setting scale on custom symbol
Bill Gee
bgee at campercaver.net
Sun May 12 20:14:27 CEST 2019
Hello everyone -
I have defined a custom symbol for electric light fixtures. The MetaPost code is below. Now that I have used it, I find that it draws the symbol too large. I tried using "-scale small" and "-scale tiny", and that helps. Rather than go through and add that to every point, I would like to change the MetaPost so it draws the symbol a bit smaller.
And I am lazy! I could replot all the points for each of the lines. It seems to me there should be a simpler way. I tried messing with the U:= parameters, but they seem to make no difference whatever.
Is there a way I can declare a multiplier in the MetaPost code? Perhaps declaring u = 0.6u?
Thanks!
--
Bill Gee
# This code defines an artificial electric light. Used in tourist sections of a cave.
def p_u_electriclight (expr pos,theta,sc,al) =
U:=(0.3u, 0.3u);
T:=identity aligned al rotated theta scaled sc shifted pos;
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;
More information about the Therion
mailing list