Good evening I'd like to make a user defined symbol that is simply an ascii text string. A quick and dirty adhoc symbol if you like. If I was going to be fancy, I would add a box around it like in the example of Dave Clucas that I have copied and modified below.
So rather than defining the shape of the omega symbol using metapost, I'd like to hard code an ascii character, say "E". The yellow shaded text below needs to be replaced with some simple metapost, but I am too lazy to research and trial things. I notice that other examples tend to use a copy of the p_label definition, and modify that. I would rather not head down that route, as then my custom code would overwrite potential future improvements to Therion's source code. My plan is not really to create an alternative to the entrance symbol, but rather to create a template quick and dirty creation of single use or unusual symbols, that can be enumerated in the legend. Does anyone happen to know how to modify the code below to do what I describe? Thanks Bruce <https://therion.speleo.sk/wiki/_detail/metapost:entrancesymbol.png?id=metap ost> code metapost def p_u_ent (expr pos,theta,sc,al)= U:=(.2u,.5u); T:=identity aligned al rotated theta scaled sc shifted pos; path p; p = (-.3u,-.25u) -- (-.2u,-.25u){dir 135} .. (0u, .25u) .. {dir 225}(.2u,-.25u) -- (.3u,-.25u); % define omega shape thdraw p withpen PenA; % draw it with fat pen thdraw unitsquare scaled u shifted (-0.5u,-0.5u) rotated 45 withpen PenD; % diagonal box with thin pen enddef; initsymbol("p_u_ent") def p_u_ent_legend = p_u_ent( <I forget where to find code for point drawing in the legend> ) enddef; endcode text en "point u:ent" "E for entrance" #text to appear in legend
_______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion