[Therion] Need metapost wizard: new text label
Tarquin Wilton-Jones
tarquin.wilton-jones at ntlworld.com
Thu Feb 27 00:37:06 CET 2020
Hi Benedikt,
> txt := "123";
> txt := ATTR__text; % does not work. How do i get the value from
You are so nearly right.
Two underscores for Therion's built in properties. One underscore for
-attr properties.
ATTR_text
I have an example here:
https://therion.speleo.sk/wiki/metapost#rope_lengths
Regarding your main question, no I don't know how to create custom label
ornamentation (it looks like black magic to me). But you can see what I
have learned here:
https://therion.speleo.sk/wiki/metapost#adding_custom_styled_labels_at_any_point_linepoint
And then you need to look through the Metapost debugging output for:
vardef p_label@#(expr txt,pos,rot,mode) =
That is the code that actually draws labels with ornamentation. It then
calls functions like this: process_circledlabel
That in turn - after writing a label - uses some kind of bounding box
measuring to decide how to ornament it. Check out the function:
def write_circ_bbox expr q =
Good luck sir. If you work it out, please document it so we can all
learn how it all works. :)
Cheers,
Tarquin
More information about the Therion
mailing list