Hi all, probably an easy question: for a presentation, I would like to have an area of my slide highlighted by placing a transparent grey layer on top of the slide and having one area of this layer completely transparent, a bit like this screenshot: http://debaday.debian.net/wp-content/uploads/2007/05/key3.jpg Any suggestions for the easiest way to achieve this effect? Thanks Thomas
On Wed, Jun 18, 2008 at 1:14 PM, Thomas A. Schmitz
Hi all,
probably an easy question: for a presentation, I would like to have an area of my slide highlighted by placing a transparent grey layer on top of the slide and having one area of this layer completely transparent, a bit like this screenshot: http://debaday.debian.net/wp-content/uploads/2007/05/key3.jpg Any suggestions for the easiest way to achieve this effect?
\setupexternalfigures[location={local,global,default}] \definecolor[tgray][r=.8,t=.5,a=1] \startuseMPgraphic{highlighted} path p, q ; p = unitsquare xyscaled(OverlayWidth,OverlayHeight) ; q= fullcircle scaled 3cm shifted (12cm,10cm) ; fill p--reverse q--cycle withcolor \MPcolor{tgray} ; \stopuseMPgraphic \defineoverlay[image][\overlayfigure{hacker}] \defineoverlay[shade][\useMPgraphic{highlighted}] \setupbackgrounds[page][background={image,shade}] \setuppapersize[S6][S6] \starttext \page[empty] \stoptext Wolfgang
Thomas A. Schmitz schrieb:
Hi all,
probably an easy question: for a presentation, I would like to have an area of my slide highlighted by placing a transparent grey layer on top of the slide and having one area of this layer completely transparent, a bit like this screenshot: http://debaday.debian.net/wp-content/uploads/2007/05/key3.jpg Any suggestions for the easiest way to achieve this effect?
Thanks
\startuniqueMPgraphic{dim:and:focus}{fw,fh,fx,fy,c} begingroup save q ; path q; q:= (unitsquare xyscaled(\MPvar{fw},\MPvar{fh}) smoothed 4px) shifted (\MPvar{fx},\MPvar{fy}); fill OverlayBox--reverse q-- cycle withcolor \MPvar{c} ; % draw q withpen pxcpen withcolor darkgray; setbounds currentpicture to OverlayBox ; % just to be safe in case of outside focus rectangle endgroup; \stopuniqueMPgraphic no further explanations :D best wishes, peter
Thomas ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
On Jun 18, 2008, at 1:58 PM, Peter Rolf wrote:
\startuniqueMPgraphic{dim:and:focus}{fw,fh,fx,fy,c} begingroup save q ; path q;
q:= (unitsquare xyscaled(\MPvar{fw},\MPvar{fh}) smoothed 4px) shifted (\MPvar{fx},\MPvar{fy});
fill OverlayBox--reverse q-- cycle withcolor \MPvar{c} ;
% draw q withpen pxcpen withcolor darkgray; setbounds currentpicture to OverlayBox ; % just to be safe in case of outside focus rectangle endgroup; \stopuniqueMPgraphic
no further explanations :D
best wishes, peter
Peter, Wolfgang, thanks so much! I had no idea "reverse" could work like this, wonderful. I will try and build this into my presentation module. Thomas
participants (3)
-
Peter Rolf
-
Thomas A. Schmitz
-
Wolfgang Schuster