On 2012-05-02 Alan BRASLAU <[email protected]> wrote:
> For example, in the minimal example below, how can one obtain
> a transparent arrow without getting an X-ray vision of the
> arrowhead?
Maybe I'm reinventing the wheel here, but you can write a small
macro that only draws the lines you want. Here is an idea:
\starttext
\startMPpage
linecap := squared;
penscale := .5bp;
pickup pencircle scaled penscale;
def drawmyarrow expr p = _apth:=p; _myfinarr enddef;
def _myfinarr text t =
draw _apth cutafter point (-ahlength+.1penscale) on _apth t;
fill arrowhead _apth t
enddef;
drawarrow origin -- (1cm,0) withtransparency(1,.5) ;
drawarrow origin -- (0,1cm) withtransparency(1,.5) ;
drawmyarrow (1.5cm,0) -- (2.5cm,0) withtransparency(1,.5) ;
drawmyarrow (1.5cm,0) -- (1.5cm,1cm) withtransparency(1,.5) ;
\stopMPpage
\stoptext
The (-ahlength+.1penscale) are of course empiric. You should find
the correct formula to always have a nice match of line and arrow
whatever ahlength and ahangle values are in use.
Marco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________