[Therion] Height numbers in square boxes
Martin Budaj
m.budaj at gmail.com
Wed Oct 3 20:06:40 CEST 2018
On Tue, Oct 2, 2018 at 9:07 PM Bruce Mutton via Therion <therion at speleo.sk>
wrote:
> If I wanted to box just one or two text labels, night it be possible to
> pass this parameter using a standard ‘point label’ entity with a ‘mode’
> option?
>
> Or would we have to go down a user defined label route?
>
Hi,
there is no such option, but you can use custom attribute, let's name it
"label_mode":
-attr label_mode 6
Than you just need to redefine the label macro to use it:
vardef p_label@#(expr txt,pos,rot,mode_) =
if known ATTR_label_mode:
mode := scantokens(ATTR_label_mode);
else:
mode := mode_;
fi;
if (mode=1) or (mode=7): interim labeloffset:=(u/8) fi;
lab:=thelabel@#(txt, pos);
if mode>1: pickup PenD fi;
if mode=1:
pickup pencircle scaled (u/6);
drawdot(pos);
process_label(pos,0);
elseif mode=2: process_uplabel;
elseif mode=3: process_downlabel;
elseif mode=4: process_updownlabel;
elseif mode=5: process_circledlabel;
elseif mode=6: process_boxedlabel;
elseif mode=7: process_label(pos,rot); % station name
elseif mode=8: process_filledlabel(pos, rot);
else: process_label(pos,rot); fi;
enddef;
Best regards,
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20181003/4334c4ee/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 124198 bytes
Desc: not available
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20181003/4334c4ee/attachment.png>
More information about the Therion
mailing list