Metafun does not change color
Hi, I have the following code (see at final). I define SquareText to be darkblue in framecolor, but metafun use darkred. Why? Any ideas? Xan. \page \section{Tectònica de plaques} \subsection{Com es formen els relleus?} \setupFLOWcharts[width=.4\textwidth] \startFLOWchart[fixistes] \startFLOWcell \name {Fonts} \location {1,1} \text {Algunes teories es basaven en relats bíblics. Atribuïen al diluvi universal la causa d'alguns relleus i la presència de fòssils marins a les muntanyes.} \connection [rl] {fixistes} \shape{procedure} \stopFLOWcell \startFLOWcell \name {fixistes} \location{2,1} \text {Altres suposaven que la Terra s'ha anat arrugat progressivament en refredar-se i que els relleus són arrugues provocades per l'escorça en contracció.} \shape{decision} \stopFLOWcell \stopFLOWchart \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}] \defineframedtext[FunnyText][frame=off,background=FunnyFrame] \def\StartFrame{\startFunnyText} \def\StopFrame {\stopFunnyText } \def\FrameTitle#1% {\setMPtext{FunnyFrame}{\hbox spread 1em{\hss\strut#1\hss}}} \setMPtext{FunnyFrame}{} % initialize the text variable \startuseMPgraphic{FunnyFrame} picture p ; numeric o ; path a, b ; pair c ; p := textext.rt(\MPstring{FunnyFrame}) ; o := BodyFontSize ; a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ; p := p shifted (2o,OverlayHeight-ypart center p) ; pickup pencircle scaled OverlayLineWidth ; b := a superellipsed .95 ; fill b withcolor OverlayColor ; draw b withcolor OverlayLineColor ; b := (boundingbox p) superellipsed .95 ; fill b withcolor OverlayColor ; draw b withcolor OverlayLineColor ; draw p withcolor black ; setbounds currentpicture to a ; \stopuseMPgraphic \setupframedtexts [FunnyText] [backgroundcolor=lightgray, framecolor=darkred, rulethickness=2pt, offset=\bodyfontsize, before={\blank[big,medium]}, after={\blank[big]}, width=\textwidth] \FrameTitle{Teories fixistes} \StartFrame Al llarg del segle XIX i el començament del XX, es crearen diverses teories que intentaven explicar l'origen de les serrelades i el plegament dels estrats, que no podem explicar fàcilment. Totes aquestes teories tenen com a {\bf principi} que els continents i els oceans han ocupat les {\em mateixes posicions} des de l'origen de la Terra fins ara. \StopFrame \FLOWchart[fixistes] \defineoverlay[SquareFrame][\useMPgraphic{SquareFrame}] \defineframedtext[SquareText][frame=off,background=SquareFrame] \def\StartSquareFrame{\startSquareText} \def\StopSquareFrame {\stopSquareText } \def\SquareTitle#1% {\setMPtext{SquareFrame}{\hbox spread 1em{\hss\strut#1\hss}}} \setMPtext{SquareFrame}{} % initialize the text variable \startuseMPgraphic{SquareFrame} picture p ; numeric o ; path a, b ; pair c ; p := textext.rt(\MPstring{SquareFrame}) ; a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ; o := BodyFontSize ; p := p shifted (2o,OverlayHeight-ypart center p) ; drawoptions (withpen pencircle scaled 1pt withcolor .625red) ; b := a randomized (o/2) ; fill b withcolor .85white ; draw b ; c := center p ; c := b intersectionpoint (c shifted (0,-o)--c shifted(0,o)) ; p := p shifted (c-center p) ; b := (boundingbox p) randomized (o/8) ; fill b withcolor .85white ; draw b ; draw p withcolor black; setbounds currentpicture to a ; \stopuseMPgraphic \setupframedtexts [SquareText] [backgroundcolor=screen, framecolor=darkblue, rulethickness=2pt, offset=\bodyfontsize, before={\blank[big,medium]}, after={\blank[big]}, width=\textwidth] \SquareTitle{Mobilisme} \StartSquareFrame El 1912, Alfred Wegener proposa una teoria revolucionària \StopSquareFrame
On 18-2-2010 22:03, Xan wrote:
I have the following code (see at final). I define SquareText to be darkblue in framecolor, but metafun use darkred. Why? Any ideas?
p := textext.rt(\MPstring{FunnyFrame}) ;
you need to change the color in textext (or in the MPstring)
draw p withcolor black ;
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
En/na Hans Hagen ha escrit:
On 18-2-2010 22:03, Xan wrote:
I have the following code (see at final). I define SquareText to be darkblue in framecolor, but metafun use darkred. Why? Any ideas?
p := textext.rt(\MPstring{FunnyFrame}) ;
And so, why does the setuoframedtext option mean? \setupframedtexts [SquareText] [backgroundcolor=screen, framecolor=darkblue, rulethickness=2pt, offset=\bodyfontsize, before={\blank[big,medium]}, after={\blank[big]}, width=\textwidth] I extract the example from manual. Regards, Xan.
participants (2)
-
Hans Hagen
-
Xan