[NTG-context] Re: presentations in ConTeXt

Patrick Gundlach patrick at gundla.ch
Tue Jun 28 12:58:14 CEST 2005


Some time ago, Mojca Miklavec <mojca.miklavec.lists at gmail.com> 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


More information about the ntg-context mailing list