diff options
Diffstat (limited to 'graphics/pgf/base/tex/pgfsys-dvips.def')
-rw-r--r-- | graphics/pgf/base/tex/pgfsys-dvips.def | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/graphics/pgf/base/tex/pgfsys-dvips.def b/graphics/pgf/base/tex/pgfsys-dvips.def index 70f5ba2887..678fdd4d0b 100644 --- a/graphics/pgf/base/tex/pgfsys-dvips.def +++ b/graphics/pgf/base/tex/pgfsys-dvips.def @@ -474,15 +474,27 @@ \expandafter\xdef\csname pgfsmasktrans@#1\endcsname{% \noexpand\pgftransformcm{1}{0}{0}{1}{\noexpand\pgfqpoint{\the\pgf@x}{\the\pgf@y}}}% \edef\@tempa{\noexpand\pgfutil@insertatbegincurrentpagefrombox{% - % box coordinates (reference point and top) needed for distilling + % box coordinates (reference point and top) needed for ps2pdf \pgfsys@outerinvoke{currentpoint /pgf@refy exch def /pgf@refx exch def}% \hbox to 0pt {\hbox to \ifdim\ht#2>\ht\strutbox\ht#2\else\ht\strutbox\fi{\hss\pgfsys@outerinvoke{% /pgf@top pgf@refy currentpoint pop pgf@refx sub VResolution Resolution div mul sub def% }}\hss}% + % lower-right box corner coordinates for viewing + \hbox to 0pt {\hbox to \wd#2{\hss\pgfsys@outerinvoke{/pgf@right currentpoint pop def}}\hss}% + \hbox to 0pt {\hbox to \ifdim\dp#2>\dp\strutbox\dp#2\else\dp\strutbox\fi{\hss\pgfsys@outerinvoke{% + /pgf@bot pgf@refy currentpoint pop pgf@refx sub VResolution Resolution div mul add def% + }}\hss}% \pgfsys@outerinvoke{gsave - % translate box to upper left page corner, so we have the whole clipping path (i. e. - % page area) available for distilling, as outlying parts get clipped - clippath pathbbox newpath pop pop translate pgf@refx neg pgf@top neg translate + clippath pathbbox newpath pop pop translate + systemdict /pdfmark known {% + % for ps2pdf, translate box to upper-left page corner, so we have the whole clipping + % path (i. e. page area) available, as outlying parts get clipped + pgf@refx neg pgf@top neg translate% + } {% + % for viewing, however, we want to hide the box by moving it off-page; we do so by aligning + % the lower-right box corner with the upper-left page corner + pgf@right neg pgf@bot neg translate% + } ifelse % translate origin (0,0) to the reference point gsave pgf@refx pgf@refy translate mark /_objdef {pgfsmaskxform@\the\pgf@objectcount} |