ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* colors in metafont
@ 2005-12-24 16:59 Hans van der Meer
  2005-12-25  7:52 ` Taco Hoekwater
  0 siblings, 1 reply; 2+ messages in thread
From: Hans van der Meer @ 2005-12-24 16:59 UTC (permalink / raw)


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.

yours sincerely,
dr. H. van der Meer

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: colors in metafont
  2005-12-24 16:59 colors in metafont Hans van der Meer
@ 2005-12-25  7:52 ` Taco Hoekwater
  0 siblings, 0 replies; 2+ messages in thread
From: Taco Hoekwater @ 2005-12-25  7:52 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-25  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-24 16:59 colors in metafont Hans van der Meer
2005-12-25  7:52 ` Taco Hoekwater

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).