[Therion] ***UNCHECKED*** scaling line ornamentation - metapost

Bruce Mutton bruce at tomo.co.nz
Mon Apr 2 06:03:20 CEST 2018


Thanks Dave

I was not clear enough, -Head can have values; both, all, begin, end, whereas Q can be 0, 1, 2, 3, so some go-between is required.

 

I finally looked and found part of it in source file thline.h

 

// tags pre arrow

  TT_LINE_TAG_HEAD_BEGIN = 1,

  TT_LINE_TAG_HEAD_END = 2,

 

Presumably somewhere else NONE is set to or implied as zero and BOTH is set to BEGIN + END.

That would complete the mapping from the data type that -Head takes as input in a th2 file, to the 0, 1, 2 or 3 that ‘line arrow’ requires for variable Q.

 

I rather suspect I don’t have the requisite knowledge for this, but sometimes I feel the need to push the boundaries anyway!

 

:)

Bruce

 

 

From: Therion <therion-bounces at speleo.sk> On Behalf Of Dave Clucas via Therion
Sent: Saturday, 31 March 2018 2:28 PM
To: therion at speleo.sk
Cc: Dave Clucas <dave.clucas at icloud.com>
Subject: Re: [Therion] scaling line ornamentation - metapost (Bruce Mutton)

 

I’m not sure about this but I suspect that it doesn’t involve parsing. It’s likely that the metapost expects a parameter or parameters to be passed to it which it then assigns to the variable Q in its own procedure. It won’t care what the calling program calls it. I think the arrowhead is probably defined within an arrow class (arrow.h perhaps).

 

 

On 30 Mar 2018, at 18:00, therion-request at speleo.sk <mailto:therion-request at speleo.sk>  wrote:

 

I notice line arrow takes the special argument -head [both | none | begin].
Somewhere between the th2 file and the metapost arrow definition, the
argument -head gets changed to the variable Q that is parsed to the metapost
code, that controls which ends of the arrow line get arrow heads. I have
copied the code below.  Whereabouts is the code that tells Therion that
-head is parsed to the metapost definition as Q?



 

 

Dave Clucas
 <mailto:daveclucas at icloud.com> dave.clucas at icloud.com

Exploring the World - One cave at a time

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speleo.sk/pipermail/therion/attachments/20180402/546573bb/attachment.htm>


More information about the Therion mailing list