[NTG-context] colors in metafont

2005-12-24 Thread Hans van der Meer

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



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] colors in metafont

2005-12-24 Thread Taco Hoekwater

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
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context