Do I understand ypu correctly then that:
(1) textext delivers a picture containing what it did typeset, regardless of the setting of drawop
(2) drawoptions (withcolor red) then applies the color to that picture?
But then there is a complication.
On input textext("\tfb text") the above seems to apply, but submitting textext("\orange\tfb text") makes the text orange coloured in spit of the drawoptions setting. Thus textext seems to behave differently for getting an explicit color for its content or not.
Before ripping the program for a minimal example I would like to first have a clear understanding of the functioning of textext in relation to metapost. It seems that as yet I do not have a clear enough picture of that process.
Hans van der Meer
On 28 aug. 2013, at 21:20, Aditya Mahajan
On 2013-08-28, at 1:40 PM, "Meer, H. van der"
wrote: I am using textext to draw text from inside a metapost program. The drawoptions macro is used by metapost to set drawing options such as color. As I understand, the textext call is handled by the tex-side of the metapost-context system, initiated of course from the metapost side. My impression is that this occurs asynchronously, judging by the problem I encountered.
On the metapost side I have:
drawoptions(withcolor blue); pic := textext(labeltext); drawoptions(); % the pic is output later
Can you posts complete minimal example? Drawoptions are only taken into consideration when the picture is drawn, and textext does not draw the picture. So, it is not surprising that when you actually draw the picture, the current draw options are used.
Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________