summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp')
-rw-r--r--macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp9
1 files changed, 4 insertions, 5 deletions
diff --git a/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp b/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp
index 4e208cf560..406f720594 100644
--- a/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp
+++ b/macros/latex/contrib/profcollege/metapost/PfCCalculatrice.mp
@@ -41,7 +41,7 @@ decahoriz:=0;
vardef Test(expr cptk,cptnt)=
pair Decalage;
if nblignes mod 2=0:
- Decalage:=u*((20-length(cptnt)+cptk)*6,-8*(nblignes-1));
+ Decalage:=u*((LargeurEcran,-8*(nblignes-1))-6*(length(cptnt)-cptk,0));
else:
Decalage:=u*(decahoriz,-8*(nblignes-1));
decahoriz:=decahoriz+6;
@@ -175,7 +175,7 @@ vardef LCD(text nt)(text rep)(expr NB)=
decahoriz:=0;
nblignes:=nblignes+1;
path Ecran;
- Ecran:=(u*(0,-1)--u*(120,-1)--u*(120,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
+ Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
for k=0 upto length(nt)-1:
@@ -184,16 +184,15 @@ vardef LCD(text nt)(text rep)(expr NB)=
endfor;
for k=1 upto NB:
nblignes:=nblignes+1;
- Ecran:=(u*(0,-1)--u*(120,-1)--u*(120,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
+ Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
endfor;
nblignes:=nblignes+1;
- Ecran:=(u*(0,-1)--u*(120,-1)--u*(120,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
+ Ecran:=(u*(0,-1)--u*(LargeurEcran,-1)--u*(LargeurEcran,7)--u*(0,7)--cycle) shifted(u*(0,-8*(nblignes-1)));
fill Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
draw Ecran withcolor if print=true:0.8white else:CouleurEcran fi;
for k=0 upto length(rep)-1:
- BlocAffichage;
Test(k,rep);
endfor;
enddef;