ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: couple of metafun questions
Date: Wed, 2 Aug 2006 23:56:44 +0200	[thread overview]
Message-ID: <6faad9f00608021456n5593f403hc0c414af39c34677@mail.gmail.com> (raw)
In-Reply-To: <0CAEC5AB-96A4-4B8E-8B12-03DBAF7BBF77@uni-bonn.de>

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

  reply	other threads:[~2006-08-02 21:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02 10:25 Thomas A. Schmitz
2006-08-02 21:56 ` Mojca Miklavec [this message]
2006-08-03  9:38   ` Thomas A. Schmitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6faad9f00608021456n5593f403hc0c414af39c34677@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).