diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-05-05 20:29:55 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-05-05 20:29:55 +0000 |
commit | ba9a57343987f1c2c72396e7c38f1fa30352c24c (patch) | |
tree | 66a8b12cdf67427ce96770fd0e9e581759aade1c /Master/texmf-dist/tex/context/base/back-pdf.mkiv | |
parent | 15242121b8ddf7d4a041fb3998d295dd8232e1eb (diff) |
ConTeXt 2014.04.28 23:24
git-svn-id: svn://tug.org/texlive/trunk@33856 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/back-pdf.mkiv')
-rw-r--r-- | Master/texmf-dist/tex/context/base/back-pdf.mkiv | 100 |
1 files changed, 67 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/context/base/back-pdf.mkiv b/Master/texmf-dist/tex/context/base/back-pdf.mkiv index 1cf7a3703d2..df959450739 100644 --- a/Master/texmf-dist/tex/context/base/back-pdf.mkiv +++ b/Master/texmf-dist/tex/context/base/back-pdf.mkiv @@ -18,8 +18,8 @@ \registerctxluafile{lpdf-nod}{1.001} \registerctxluafile{lpdf-col}{1.000} \registerctxluafile{lpdf-xmp}{1.001} -\registerctxluafile{lpdf-mis}{1.001} \registerctxluafile{lpdf-ano}{1.001} +\registerctxluafile{lpdf-mis}{1.001} \registerctxluafile{lpdf-ren}{1.001} \registerctxluafile{lpdf-grp}{1.001} \registerctxluafile{lpdf-wid}{1.001} @@ -123,45 +123,35 @@ \to \everylastbackendshipout %D Transformations. Some day we will use primitives (once they're fixed). - -% \def\dostartscaling#1#2% the test is needed because acrobat is bugged! -% {\forcecolorhack % maybe use signal instead -% \pdfliteral{q \ifdim#1\points=\zeropoint.0001\else#1\fi\space 0 0 -% \ifdim#2\points=\zeropoint.0001\else#2\fi\space 0 0 cm}} -% -% \def\dostopscaling -% {\pdfliteral{Q}} -% -% \def\dostartrotation#1% grouped -% {\forcecolorhack % maybe use signal instead -% \pdfliteral{q \cldcontext{lpdf.rotationcm(#1)}}} -% -% \def\dostoprotation -% {\pdfliteral{Q}} -% -% function lpdf.rotationcm(a) -% local s, c = sind(a), cosd(a) -% return format("%f %f %f %f 0 0 cm",c,s,-s,c) -% end -% -% \def\dostartmirroring{\pdfliteral{-1 0 0 1 0 0 cm}} -% \def\dostopmirroring {\pdfliteral{-1 0 0 1 0 0 cm}} - % todo: inject at the lua end cq. deal with #5 and #6 too +% % % rotation % % % + \unexpanded\def\dostartrotation#1% grouped - {\forcecolorhack % maybe use signal instead - \advance\backendtransformlevel\plusone + {\advance\backendtransformlevel\plusone + \forcecolorhack \pdfsave \pdfsetmatrix{\ctxcommand{pdfrotation(#1)}}} \unexpanded\def\dostoprotation {\pdfrestore + \forcecolorhack \advance\backendtransformlevel\minusone} +% \unexpanded\def\dostartrotation#1% grouped +% {\forcecolorhack +% \advance\backendtransformlevel\plusone +% \ctxcommand{pdfstartrotation(#1)}} + +% \unexpanded\def\dostoprotation +% {\ctxcommand{pdfstoprotation()}% +% \advance\backendtransformlevel\minusone} + +% % % scaling % % % + \unexpanded\def\dostartscaling#1#2% the test is needed because acrobat is bugged! - {\forcecolorhack % maybe use signal instead - \advance\backendtransformlevel\plusone + {\advance\backendtransformlevel\plusone + \forcecolorhack % maybe use signal instead \pdfsave \pdfsetmatrix {\ifdim#1\points=\zeropoint.0001\else#1\fi\space 0 0 @@ -169,24 +159,49 @@ \unexpanded\def\dostopscaling {\pdfrestore + \forcecolorhack \advance\backendtransformlevel\minusone} +% \unexpanded\def\dostartscaling#1#2% the test is needed because acrobat is bugged! +% {\forcecolorhack +% \advance\backendtransformlevel\plusone +% \ctxcommand{pdfstartscaling(#1,#2)}} + +% \unexpanded\def\dostopscaling +% {\ctxcommand{pdfstopscaling()}% +% \advance\backendtransformlevel\minusone} + +% % % mirroring % % % + \unexpanded\def\dostartmirroring {\advance\backendtransformlevel\plusone + \forcecolorhack \pdfsave \pdfsetmatrix{-1 0 0 1}} % 0 0 \unexpanded\def\dostopmirroring {\pdfrestore + \forcecolorhack \advance\backendtransformlevel\minusone} +% \unexpanded\def\dostartmirroring +% {\advance\backendtransformlevel\plusone +% \ctxcommand{pdfstartmirroring()}} + +% \unexpanded\def\dostopmirroring +% {\ctxcommand{pdfstopmirroring()}% +% \advance\backendtransformlevel\minusone} + +% % % transform % % % + \unexpanded\def\dotransformnextbox#1#2#3#4#5#6% sx rx ry sy tx ty (will change) / basepoints ! {\advance\backendtransformlevel\plusone % fixing ht/dp/wd should happen elsewhere \dowithnextbox{\dodotransformnextbox{#5}{#6}{#1 #2 #3 #4}}} \unexpanded\def\dodotransformnextbox#1#2#3% - {\hbox + {%\forcecolorhack + \hbox {\kern#1\onebasepoint \raise#2\onebasepoint\hbox {\pdfsave @@ -195,18 +210,35 @@ \pdfrestore \advance\backendtransformlevel\minusone}}} -\unexpanded\def\dostartclipping#1#2#3% +% \unexpanded\def\dotransformnextbox#1#2#3#4#5#6% sx rx ry sy tx ty (will change) / basepoints ! +% {\advance\backendtransformlevel\plusone +% % fixing ht/dp/wd should happen elsewhere +% \dowithnextbox{\dodotransformnextbox{#1}{#2}{#3}{#4}{#5}{#6}}} + +% \unexpanded\def\dodotransformnextbox#1#2#3#4#5#6% +% {\hbox +% {\kern #5\onebasepoint +% \raise#6\onebasepoint +% \hbox +% {\ctxcommand{pdfstartmatrix(#1,#2,#3,#4)}% +% \box\nextbox +% \ctxcommand{pdfstopmatrix()}% +% \advance\backendtransformlevel\minusone}}} + +% % % clipping % % % + +\unexpanded\def\dostartclipping#1#2#3% we can move this to lua and only set a box here {\PointsToBigPoints{#2}\width \PointsToBigPoints{#3}\height \meta_grab_clip_path{#1}\width\height{0 0 m \width\space 0 l \width \height l 0 \height l}% \pdfliteral{q 0 w \MPclippath\space W n}} \unexpanded\def\dostopclipping - {\pdfliteral{Q n}} + {\pdfliteral{Q}} %D The following will move to the backend \LUA\ code: -\appendtoks \ctxlua{backends.codeinjections.finalizepage ()}\to \everybackendshipout % is immediate +%appendtoks \ctxlua{backends.codeinjections.finalizepage ()}\to \everybackendshipout % is immediate %appendtoks \ctxlua{backends.codeinjections.finalizedocument()}\to \everylastbackendshipout % is immediate %D Temporary hack, will be removed or improved or default. @@ -230,6 +262,8 @@ {\back_object_stop \egroup} +\let\back_object_stop\relax + % attr {/Group << /S /Transparency /I false /K true >>} \def\back_object_register#1#2% |