diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mlib-pps.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mlib-pps.mkiv | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/context/base/mlib-pps.mkiv b/Master/texmf-dist/tex/context/base/mlib-pps.mkiv index 207d9730c8a..07ac84b8d32 100644 --- a/Master/texmf-dist/tex/context/base/mlib-pps.mkiv +++ b/Master/texmf-dist/tex/context/base/mlib-pps.mkiv @@ -33,43 +33,23 @@ \newbox \MPtextbox \newtoks\everyMPLIBsettext % not used -% \def\MPLIBsettext#1% #2% -% {\dowithnextbox{\ctxlua{metapost.settext(\number\nextbox,#1)}}\hbox} -% -% \def\MPLIBresettexts -% {\ctxlua{metapost.resettextexts()}} -% -% \newconditional\MPLIBtextgetdone -% -% \def\MPLIBsettext#1% #2% -% {\ifconditional\MPLIBtextgetdone -% \else -% \cldcontext{metapost.tex.get()}% MPenvironments are depricated -% \settrue\MPLIBtextgetdone % no \global needed -% \fi -% \dowithnextbox{\ctxlua{metapost.settext(\number\nextbox,#1)}}\hbox} -% -% \def\MPLIBresettexts -% {\ctxlua{metapost.resettextexts()}% -% \setfalse\MPLIBtextgetdone} - \def\doMPLIBflushenvironment {%\writestatus\m!metapost{flushing environment}% - \cldcontext{metapost.tex.get()}% + \clf_mptexget \let\MPLIBflushenvironment\relax}% MPenvironments are depricated} \let\MPLIBflushenvironment\doMPLIBflushenvironment \unexpanded\def\MPLIBsetNtext#1% #2% box text {\MPLIBflushenvironment - \dowithnextbox{\ctxlua{metapost.settext(\number\nextbox,#1)}}\hbox\bgroup + \dowithnextbox{\clf_mpsettext\nextbox #1}\hbox\bgroup \meta_set_current_color \let\MPLIBflushenvironment\doMPLIBflushenvironment \let\next} % gobble open brace \unexpanded\def\MPLIBsetCtext#1#2% #3% box colorspec text {\MPLIBflushenvironment - \dowithnextbox{\ctxlua{metapost.settext(\number\nextbox,#1)}}\hbox\bgroup + \dowithnextbox{\clf_mpsettext\nextbox #1}\hbox\bgroup \directcolored[#2]% \meta_set_current_color % so, textcolor wins ! \let\MPLIBflushenvironment\doMPLIBflushenvironment @@ -77,22 +57,19 @@ \let\MPLIBsettext\MPLIBsetNtext -\unexpanded\def\MPLIBresettexts - {\ctxlua{metapost.resettextexts()}} - \unexpanded\def\MPLIBgettextscaled#1#2#3% why a copy .. can be used more often - {\ctxlua{metapost.gettext(\number\MPtextbox,#1)}% + {\clf_mpgettext\MPtextbox #1% \vbox to \zeropoint{\vss\hbox to \zeropoint{\scale[\c!sx=#2,\c!sy=#3]{\raise\dp\MPtextbox\box\MPtextbox}\forcecolorhack\hss}}} \unexpanded\def\MPLIBfigure#1#2% {\setbox\scratchbox\hbox{\externalfigure[#1][\c!mask=#2]}% - \ctxlua{metapost.edefsxsy(\number\wd\scratchbox,\number\ht\scratchbox,0)}% + \clf_mpsetsxsy\wd\scratchbox\ht\scratchbox\zeropoint \vbox to \zeropoint{\vss\hbox to \zeropoint{\scale[\c!sx=\sx,\c!sy=\sy]{\box\scratchbox}\hss}}} % horrible (we could inline scale and matrix code): \unexpanded\def\MPLIBgettextscaledcm#1#2#3#4#5#6#7#8#9% 2-7: sx,rx,ry,sy,tx,ty - {\ctxlua{metapost.gettext(\number\MPtextbox,#1)}% + {\clf_mpgettext\MPtextbox #1% \setbox\MPbox\hbox\bgroup \dotransformnextbox{#2}{#3}{#4}{#5}{#6}{#7}% does push pop ... will be changed to proper lua call (avoid small numbers) \vbox to \zeropoint\bgroup |