Hi Bill
I think that merging what you have with an interim defaultscale:=0.6; variable 
as demonstrated by Thomas Holder here 
https://therion.speleo.sk/wiki/metapost#special_symbol_examples will do the 
trick.
You probably want to keep the sc in def p_u_electriclight (expr 
pos,theta,sc,al), and multiply it by defaultscale before calling T:=identity...
Probably some trial and error involved.
Bruce

-----Original Message-----
From: Therion <[email protected]> On Behalf Of Bill Gee
Sent: Monday, 13 May 2019 06:14
To: Therion Mail List <[email protected]>
Subject: [Therion] Setting scale on custom symbol

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;
    


_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion

_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion

Reply via email to