[NTG-context] colors in metafont

Taco Hoekwater taco at elvenkind.com
Sun Dec 25 08:52:44 CET 2005

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.

   drawoptions(withcolor red);
   fill unitsquare scaled 20;
   fill unitsquare scaled 10;

Cheers, Taco

More information about the ntg-context mailing list