ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Taco Hoekwater <taco@elvenkind.com>
Subject: Re: colors in metafont
Date: Sun, 25 Dec 2005 08:52:44 +0100	[thread overview]
Message-ID: <43AE4FCC.2030300@elvenkind.com> (raw)
In-Reply-To: <7B6E5C2C-FD0F-4A09-AA31-81DB04979F07@science.uva.nl>

Hans van der Meer wrote:
> Normally metapost/metafun starts out drawing in black.
> 
> Is it possible to change this globally, so that "withcolor xyz" is  not 
> needed everytime another color is wanted?
> 
> Also is it possible to "get/save/restore" the current drawing color  (a 
> la savepen) in metapost/metafun?
> 
> I searched through various manuals but I might have missed the  reference.

not precisely, but drawoptions() comes close.

   beginfig(1);
   drawoptions(withcolor red);
   fill unitsquare scaled 20;
   drawoptions();
   fill unitsquare scaled 10;
   endfig;

Cheers, Taco

      reply	other threads:[~2005-12-25  7:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-24 16:59 Hans van der Meer
2005-12-25  7:52 ` Taco Hoekwater [this message]

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=43AE4FCC.2030300@elvenkind.com \
    --to=taco@elvenkind.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).