Vit Zyka wrote: > Mojca Miklavec wrote: > > Thomas A. Schmitz wrote: > > > >>I am still at a loss how to achieve one thing in ConTeXt that was > >>pretty easy in Keynote or (shudder) Powerpoint: When I wanted to > >>highlight something on a map or a picture, I would just draw a red > >>circle around it. What would be the proper way to do this in ConTeXt? > >>Adding a layer with a red circle drawn in Metapost, then positioning > >>it by trial and error? Or can anyone point to a better solution? > > ... > > In this case it would be fine to have a \framed[...foreground=...] command > > :) > > Use > > \framed > [background={foreground,BgFront}] > {\externalfigure[Kochloewe_c][width=10cm]}} > > Define your picture as BgFront. 'foreground' is fixed word that > identifies layer 0 (text). So you can stack bacground as follow: > background={...,MyLayer-2,MyLayer-1,foreground,MyLayer1,MyLayer2,...}
Uau! Thanks a lot for a very nice hint. So you can make something like that: \setupcolors[state=start] \starttext \setupMPvariables[CircleSomething][dimension={(100,100)},center={(50,50)},r=10] \startuseMPgraphic{CircleSomething} pair dimension, center; % TODO: this also has to be passed as parameter!!! % now it stands for: width=10cm scale := 10cm/(xpart \MPvar{dimension}); picture bboxpicture; dimension := \MPvar{dimension} scaled scale; center := \MPvar{center} scaled scale; r := \MPvar{r}*scale; pickup pencircle scaled 2pt; % proper bounding box fill unitsquare xyscaled dimension; bboxpicture := currentpicture; currentpicture := nullpicture; draw fullcircle scaled (2*r) shifted center withcolor red; setbounds currentpicture to boundingbox bboxpicture; \stopuseMPgraphic \defineoverlay[CircleBlueTulip][\uniqueMPgraphic{CircleSomething}{dimension={(400,460)},center={(222,460-330)},r=25}] \defineoverlay[CircleRedTulip][\useMPgraphic{CircleSomething}{dimension={(400,460)},center={(148,460-330)},r=25}] \framed[background={foreground,CircleBlueTulip},offset=0pt,strut=no]{\externalfigure[Kochloewe_c][width=10cm]} \framed[background={foreground,CircleRedTulip},offset=0pt,strut=no]{\externalfigure[Kochloewe_c][width=10cm]} \stoptext Mojca _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context