From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/29914 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: couple of metafun questions Date: Wed, 2 Aug 2006 23:56:44 +0200 Message-ID: <6faad9f00608021456n5593f403hc0c414af39c34677@mail.gmail.com> References: <0CAEC5AB-96A4-4B8E-8B12-03DBAF7BBF77@uni-bonn.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1154558198 14522 80.91.229.2 (2 Aug 2006 22:36:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 2 Aug 2006 22:36:38 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Aug 03 00:36:36 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org 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 1G8PKJ-0005ak-LU for gctc-ntg-context-518@m.gmane.org; Thu, 03 Aug 2006 00:36:31 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EC3001FEEB; Thu, 3 Aug 2006 00:36:30 +0200 (CEST) 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 14745-07-2; Thu, 3 Aug 2006 00:36:24 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DADD71FEEE; Thu, 3 Aug 2006 00:36:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id DDB901FEEB for ; Thu, 3 Aug 2006 00:36:19 +0200 (CEST) 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 14745-07 for ; Thu, 3 Aug 2006 00:36:14 +0200 (CEST) Original-Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.198]) by ronja.ntg.nl (Postfix) with SMTP id 94F6B1FEFD for ; Wed, 2 Aug 2006 23:56:46 +0200 (CEST) Original-Received: by wx-out-0102.google.com with SMTP id s12so12178wxc for ; Wed, 02 Aug 2006 14:56:45 -0700 (PDT) Original-Received: by 10.78.160.2 with SMTP id i2mr533967hue; Wed, 02 Aug 2006 14:56:44 -0700 (PDT) Original-Received: by 10.78.194.19 with HTTP; Wed, 2 Aug 2006 14:56:44 -0700 (PDT) Original-To: "mailing list for ConTeXt users" In-Reply-To: <0CAEC5AB-96A4-4B8E-8B12-03DBAF7BBF77@uni-bonn.de> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:29914 Archived-At: On 8/2/06, Thomas A. Schmitz wrote: > > 3. Is it possible to get a line/arrow dashed in two different colors, > like red and blue? Just out of curiosity I tried the following: picture dp; draw dashpattern(on 2 off 6) scaled 5pt withcolor blue; draw dashpattern(off 4 on 2 off 2) scaled 5pt withcolor red; dp := currentpicture; draw origin--(5cm,0) dashed dp; But of course "! Picture is too complicated to use as a dash pattern." So you have to draw the path twice with different color and pattern (you can write a macro for it of course if you need it often). beginfig(1); pickup pencircle scaled 2pt; picture dp[]; dp[1] := dashpattern(on 2 off 6) scaled 3pt; dp[2] := dashpattern(off 4 on 2 off 2) scaled 3pt; path p; p := (origin .. (2,1) .. (3,-1) .. (5,0)) scaled 3cm; draw p dashed dp[1] withcolor blue; draw p dashed dp[2] withcolor red; endfig; end. Mojca