Some time ago, Mojca Miklavec <[EMAIL PROTECTED]> wrote:

> 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
--------------------------------------------------

So, do you get any real output (besides the image)? I cannot see any
circles in the pdf.


ConTeXt  ver: 2005.06.07  fmt: 2005.6.7  int: english  mes: english


Patrick

-- 
ConTeXt wiki and more: http://contextgarden.net
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to