[Therion] Two minor bugs in metapost defs
Martin Budaj
m.budaj at gmail.com
Tue Dec 9 14:10:46 CET 2008
Thanks for pointing it out. I am not sure whether thin pen in some
wall subtypes was intentional or not -- perhaps it is better to make
it consistent.
BTW, there is a special page for submitting bugs and patches
http://savannah.nongnu.org/projects/therion/ -- in the mailing list
they might sometimes be overlooked or forgotten among all the mail.
Martin
2008/12/6 Xavier Pennec <Xavier.Pennec at sophia.inria.fr>:
>
> I found a few bugs in the metapost definitions that could be usefully
> corrected in the next versions:
> In the subtype clay of wall, "Pickup PenA" is missing before drawing the
> wall line at the end, and the effect is that the line is drawn with PenC
> (thin).
>
> def l_wall_clay_SKBB (expr P) =
> T:=identity;
> cas := 0;
> dlzka := arclength P;
> mojkrok:=adjust_step(dlzka, .5u);
> pickup PenC;
> q := (-0.15u,0){up}..{down}origin..{up}(0.15u,0);
> forever:
> t := arctime (cas + mojkrok/2) of P;
> thdraw q shifted (point t of P + .25u * unitvector(thdir(P,t) rotated
> -90));
> cas := cas + mojkrok;
> exitif cas > dlzka - (2*mojkrok/3); % for rounding errors
> endfor;
>>>>>> Pickup PenA
> thdraw P;
> enddef;
>
> I also noticed that sometimes the margin around a text is changed by the
> presence (or absence) of a point label.
> After many trials, I finally identified that it comes from the value of
> bboxmargin which is reset in process_label.
> It seems to me that an interim is missing before resetting bboxmargin in
> order to keep this change localized.
>
> def process_label (expr cent, rot) =
> begingroup
> <<<< bboxmargin:=0.8bp; >>>> interim bboxmargin:=2bp;
> q:=((bbox lab) smoothed 2) rotatedaround (cent, rot);
> draw lab rotatedaround (cent, rot);
> write_circ_bbox(q); % without corners smoothing it was enough to use
> % write_bbox(q);
> endgroup;
> enddef;
>
>
> Xavier
>
>
>
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> http://mailman.speleo.sk/mailman/listinfo/therion
>
>
More information about the Therion
mailing list