From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/23506 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Drawing oriented paths in MetaFun Date: Wed, 16 Nov 2005 17:15:34 +0100 Message-ID: <437B5B26.3000906@wxs.nl> References: <934068063.20051116154847@iol.it> <1685015719.20051116164044@iol.it> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1132157884 1267 80.91.229.2 (16 Nov 2005 16:18:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 16 Nov 2005 16:18:04 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Nov 16 17:17:52 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1EcPwk-0000X1-Gg for gctc-ntg-context-518@m.gmane.org; Wed, 16 Nov 2005 17:15:42 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 770381280A; Wed, 16 Nov 2005 17:15:41 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18546-01-4; Wed, 16 Nov 2005 17:15:36 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B6DD812803; Wed, 16 Nov 2005 17:15:36 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AF6A712803 for ; Wed, 16 Nov 2005 17:15:35 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18546-01-3 for ; Wed, 16 Nov 2005 17:15:34 +0100 (CET) Original-Received: from controller-1 (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with ESMTP id C9FA712802 for ; Wed, 16 Nov 2005 17:15:34 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 3509 for ; Wed, 16 Nov 2005 17:19:08 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <1685015719.20051116164044@iol.it> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:23506 Archived-At: Giuseppe Bilotta wrote: >Wednesday, November 16, 2005 Giuseppe Bilotta wrote: > > > >>Does MetaFun provide some macro to draw oriented paths? I >>would like it to basically add a small arrow *in the middle* >>of the path? Such a macro >> >> > > > >>draworiented somepath somespecs ; >> >> > > > >>would have to act like >> >> > > > >>drawarrow firsthalf(somepath) somespecs ; >>draw secondhalf(somepath) somespecs ; >> >> > > > >>Is it available already, or should I roll my own? >> >> > > >Hm. I came up with > >def draworiented expr c = > path _c_ ; _c_ := c ; > do_draworiented >enddef ; > >def do_draworiented text t = > draw _c_ t ; > drawarrow subpath(0, length(_c_)/2) of _c_ ; >enddef; > >which works, although I have to do > >draworiented (reverse p1) > >Is there an easy way to have it work with > >draworiented reverse p1 ? > > > add another step (do_do_) , first pick up 'reverse p1' as expression, save that in a path variable, and then pick up the text Hans