[metapost] augment drawoptions
Stephan Hennig
mailing_list at arcor.de
Sat Apr 12 14:54:57 CEST 2008
Taco Hoekwater schrieb:
> You cannot save _op_ because it is a macro, not a variable.
>
> You could do explicit macro definitions and restores with expandafter:
>
> def savedrawoptions =
> expandafter def expandafter _savedop_ expandafter = _op_ enddef;
> enddef
>
> def restoredrawoptions =
> expandafter def expandafter _op_ expandafter = _savedop_ enddef;
> enddef
>
> But it is not very elegant.
Thank you! Although, I guess you cannot save and modify drawoptions
over multiple levels this way, it is sufficient for my purposes.
> In fact, I cannot come up an elegant solution to the problem that
> does not require rewriting quite a bit of plain.mp.
I would find native support for local draw options (and altering draw
options) a useful addition to MetaPost. What do people think?
Best regards,
Stephan Hennig
More information about the metapost
mailing list