Hi Thomas, Thomas A. Schmitz schrieb:
This is a very small cosmetic problem, but it bugs me: I'm preparing a background for a presentation, and I want a frame with a transparent color to appear on every slide, so I define an overlay and use metapost. I also want to frame some text elements, so I use a \framed. The problem is that in the \framed, the lines of the frame overlap at the edges, so with a transparent color, the corners are slightly darker. The minimal example below shows the problem. Any solution? Is it possible to have the frame around \framed drawn by metapost?
sure (see attachment). Greetings, Peter
Thanks!
Thomas
%%%%% MINIMAL EXAMPLE %%%%%%
\setupcolors[state=start]
\definecolor [MyFrameColor] [b=.55, t=.5, a=1]
\starttext
\startuseMPgraphic{fancyframe} draw unitsquare xyscaled(8cm,8cm) withpen pencircle scaled 4pt withcolor \MPcolor{MyFrameColor} ; \stopuseMPgraphic
\useMPgraphic{fancyframe}
\framed [rulethickness=4pt,framecolor=MyFrameColor,height=8cm,width=8cm]{\strut}
\stoptext
___________________________________________________________________________________ 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 ___________________________________________________________________________________
\setupcolors[state=start] \definecolor [MyFrameColor] [b=.55, t=.5, a=1] \startuniqueMPgraphic{fancyframe}{linewidth,radius,color} begingroup save c, lw ; color c ; c:= \MPvar{color} ; lw:= \MPvar{linewidth} ; draw unitsquare xyscaled(OverlayWidth-lw,OverlayHeight-lw) smoothed \MPvar{radius} withpen pencircle scaled lw withcolor c ; endgroup ; \stopuniqueMPgraphic \defineoverlay[fancyframe] [\uniqueMPgraphic{fancyframe}{linewidth=4pt,radius=5pt,color=MyFrameColor}] \presetlocalframed[fancy] \setuplocalframed[fancy] [frame=off,background=fancyframe] \starttext \framed [rulethickness=4pt,framecolor=MyFrameColor,height=8cm,width=8cm]{} \localframed[fancy] [height=8cm,width=8cm]{} \stoptext