From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75951 Path: news.gmane.org!not-for-mail From: Alan BRASLAU Newsgroups: gmane.comp.tex.context Subject: Re: drawarrow and transparency Date: Thu, 3 May 2012 12:32:47 +0200 Organization: CEA DSM-IRAMIS-SPEC Message-ID: <20120503123247.7592251f@sole.extra.cea.fr> References: <20120502173518.604e1545@sole.extra.cea.fr> <20120502214224.754fa3ab@Zewz> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1336041180 4646 80.91.229.3 (3 May 2012 10:33:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 May 2012 10:33:00 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu May 03 12:32:59 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SPtLH-0006ux-4b for gctc-ntg-context-518@m.gmane.org; Thu, 03 May 2012 12:32:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4BD43101E6; Thu, 3 May 2012 12:32:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rPRv2KwhZkpo; Thu, 3 May 2012 12:32:55 +0200 (CEST) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6481B101E0; Thu, 3 May 2012 12:32:55 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EE3E6101E0 for ; Thu, 3 May 2012 12:32:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Z9iz7HAAp1zV for ; Thu, 3 May 2012 12:32:50 +0200 (CEST) Original-Received: from filter3-nij.mf.surf.net (filter3-nij.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 53EEF101CF for ; Thu, 3 May 2012 12:32:50 +0200 (CEST) Original-Received: from oxalide-out.extra.cea.fr (oxalide-out.extra.cea.fr [132.168.224.8]) by filter3-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id q43AWmbZ007228 for ; Thu, 3 May 2012 12:32:49 +0200 Original-Received: from epeire2.extra.cea.fr (epeire2.extra.cea.fr [132.167.198.32]) by oxalide.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.3) with ESMTP id q43AWmMX005819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 3 May 2012 12:32:48 +0200 Original-Received: from orpin2.extra.cea.fr (orpin2.extra.cea.fr [132.167.198.5]) by epeire2.extra.cea.fr (8.14.4/8.14.4) with ESMTP id q43AWmFc023151 for ; Thu, 3 May 2012 12:32:48 +0200 (envelope-from alan.braslau@cea.fr) Original-Received: from sole.extra.cea.fr (iram-ha-003840.extra.cea.fr [132.166.25.152]) by orpin2.extra.cea.fr (8.13.8/8.13.8/CEAnet-Intranet-out-1.2) with ESMTP id q43AWlBv024865 for ; Thu, 3 May 2012 12:32:47 +0200 In-Reply-To: <20120502214224.754fa3ab@Zewz> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) X-Bayes-Prob: 0.4954 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=132.168.224.8; country=SE; region=28; city=Dingle; latitude=58.5333; longitude=11.5667; http://maps.google.com/maps?q=58.5333,11.5667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0dH5mwNvR - d3bc32c6f01a - 20120503 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:75951 Archived-At: On Wed, 2 May 2012 21:42:24 +0200 Marco wrote: > On 2012-05-02 Alan BRASLAU 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 Yes, this is somewhat reinventing the wheel. I believe that this is somewhat a bug with transparency under MetaFun. For I tried the following: \startMPcode picture pic ; pic := image(drawarrow origin--(1cm,0)) ; draw pic withtransparency(1,.5) ; draw pic rotated 90 withtransparency(1,.5) ; \stopMPcode Here, the arrowhead is totally opaque and only the "stem" has transparency. Something is fishy. Alan ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___________________________________________________________________________________