Changes

Jump to navigation Jump to search
2,048 bytes added ,  10:49, 20 December 2020
no edit summary
<context mode="mkiv" source="yes">
 
\starttext
\startMPpage
 
string MonTexte ;
MonTexte := "Aujourd'hui";
draw (0cm,0cm)--(20cm,0cm)--(20cm,20cm)--(0cm,20cm)--cycle
pair PA ; PA := (10cm,16cm) ;
draw textext.urt("\ruledhbox{URT Aujourd'hui}-" & MonTexte) shifted PA;draw textext.ulft("\ruledhbox{ULFT Aujourd'hui}-"& MonTexte) shifted PA; draw textext.llft("\ruledhbox{LLFT Aujourd'hui}-"& MonTexte) shifted PA;draw textext.lrt("\ruledhbox{LRT Aujourd'hui}-" & MonTexte) shifted PA;
draw PA withpen pencircle scaled 1.5mm withcolor red;
pair PB ; PB := PA shifted (0cm,-2cm) ;
draw textext.drt("\ruledhbox{DRT Aujourd'hui}-" & MonTexte) shifted PB;draw textext.dlft("\ruledhbox{DLFT Aujourd'hui}-"& MonTexte) shifted PB;
draw PB withpen pencircle scaled 1.5mm withcolor red;
pair PC ; PC := PB shifted (0cm,-2cm) ;
draw textext.d("\ruledhbox{D Aujourd'hui}-"& MonTexte) shifted PC;
pair PD ; PD := PC shifted (0cm,-2cm) ;
draw textext.bot("\ruledhbox{BOT Aujourd'hui}-"& MonTexte) shifted PD;draw textext.top("\ruledhbox{TOP Aujourd'hui}-"& MonTexte) shifted PD;
draw PD withpen pencircle scaled 1.5mm withcolor red;
pair PE ; PE := PD shifted (0cm,-2cm) ;
draw textext.lft("\ruledhbox{LFT Aujourd'hui}-"& MonTexte) shifted PE;draw textext.rt("\ruledhbox{RT Aujourd'hui}-"& MonTexte) shifted PE;
draw PE withpen pencircle scaled 1.5mm withcolor red;
pair PF ; PF := PE shifted (0cm,-2cm) ;
draw textext("\ruledhbox{Aujourd'hui}"MonTexte) shifted PF;
draw PF withpen pencircle scaled 1.5mm withcolor red;
pair PG ; PG := PF shifted (0cm,-2cm) ;
draw textext.origin("\ruledhbox{ORIGIN Aujourd'hui}-"& MonTexte) shifted PG;
draw PG withpen pencircle scaled 1.5mm withcolor red;
pair PH ; PH := PG shifted (0cm,-2cm) ;
draw textext.raw("\ruledhbox{RAW Aujourd'hui}-"& MonTexte) shifted PH;
draw PH withpen pencircle scaled 1.5mm withcolor red;
\stopMPpage
 %==============================================================================%==============================================================================%============================================================================== \stoptextsetupMPinstance [metafun] [textstyle={\definedfont[name:dejavusans*default at 50pt]\ignorespaces}] \startMPpage string MonTexte ; MonTexte := "\ruledhbox{Aujourd'hui}"; draw (0cm,0cm)--(20cm,0cm)--(20cm,20cm)--(0cm,20cm)--cycle withpen pencircle scaled 0.5mm withcolor red; %------------------------------------------------------------------------------ picture PictA ; pair PA ; PA := (5cm,12cm) ; PictA := textext.urt(MonTexte) shifted PA;draw PictA; %------------------------------------------------------------------------------ draw (llcorner PictA) withpen pencircle scaled 3mm withcolor green;draw (lrcorner PictA) withpen pencircle scaled 3mm withcolor yellow;draw (urcorner PictA) withpen pencircle scaled 3mm withcolor blue;draw (ulcorner PictA) withpen pencircle scaled 3mm withcolor cyan; %------------------------------------------------------------------------------ picture PictB, PictC ; pair PB ; PB := PA shifted (0cm,-4cm) ; def givedecalage(text temptext) = ( (llcorner textext.urt(temptext)) - (llcorner textext.drt(temptext)) ) enddef;  PictB := textext.urt(MonTexte) shifted PB; pair decalage ;decalage := givedecalage(MonTexte) ; %------------------------------------------------------------------------------ draw PictB;draw (center PictB) withpen pencircle scaled 3mm withcolor green; draw (PB shifted decalage) withpen pencircle scaled 3mm withcolor yellow; draw (PB shifted (decalage shifted (bbwidth PictB / 2,0mm))) withpen pencircle scaled 3mm withcolor blue; draw (PB shifted (decalage shifted (bbwidth PictB,0mm))) withpen pencircle scaled 3mm withcolor cyan; %------------------------------------------------------------------------------ draw PA withpen pencircle scaled 1.5mm withcolor red;
</context>\stopMPpage \stoptext

Navigation menu