summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/grph-trf.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-12-30 20:42:59 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-12-30 20:42:59 +0100
commit54732448eb933607bdcb11a457756741dc4e0b44 (patch)
treed0f312dd29af54ee85d89f6d6f242be7ee6b5454 /tex/context/base/mkiv/grph-trf.mkiv
parentede5a2aae42ff502be35d800e97271cf0bdc889b (diff)
downloadcontext-54732448eb933607bdcb11a457756741dc4e0b44.tar.gz
2019-12-30 19:16:00
Diffstat (limited to 'tex/context/base/mkiv/grph-trf.mkiv')
-rw-r--r--tex/context/base/mkiv/grph-trf.mkiv38
1 files changed, 21 insertions, 17 deletions
diff --git a/tex/context/base/mkiv/grph-trf.mkiv b/tex/context/base/mkiv/grph-trf.mkiv
index 274b2f8ef..18f988470 100644
--- a/tex/context/base/mkiv/grph-trf.mkiv
+++ b/tex/context/base/mkiv/grph-trf.mkiv
@@ -139,7 +139,7 @@
%
\d_grph_scale_dp\dp\nextbox
\ifx\p_depth\v!no \ifzeropt\d_grph_scale_dp \else
- \setbox\nextbox\hpack{\raise\d_grph_scale_dp\box\nextbox}% new
+ \setbox\nextbox\naturalhpack{\raise\d_grph_scale_dp\box\nextbox}% new
\d_grph_scale_dp\dp\nextbox
\fi \fi
\d_grph_scale_wd\wd\nextbox
@@ -168,7 +168,7 @@
% {\d_grph_scale_wd\finalscaleboxxscale\d_grph_scale_wd
% \d_grph_scale_ht\finalscaleboxyscale\d_grph_scale_ht
% \d_grph_scale_dp\finalscaleboxyscale\d_grph_scale_dp
-% \setbox\nextbox\hpack
+% \setbox\nextbox\naturalhpack
% {\dostartscaling \finalscaleboxxscale \finalscaleboxyscale
% \smashedbox\nextbox
% \dostopscaling}%
@@ -195,7 +195,7 @@
\fi}
\def\grph_scale_apply_yes
- {\setbox\nextbox\hpack
+ {\setbox\nextbox\naturalhpack
{\dostartscaling \finalscaleboxxscale \finalscaleboxyscale
\smashedbox\nextbox
\dostopscaling}%
@@ -567,13 +567,13 @@
{\ifx\p_equalwidth\empty \else
\scratchdimen\p_equalwidth\relax
\ifdim\d_grph_scale_wd<\scratchdimen
- \setbox\nextbox\hpack to \scratchdimen{\hss\box\nextbox\hss}%
+ \setbox\nextbox\naturalhpack to \scratchdimen{\hss\box\nextbox\hss}%
\fi
\fi
\ifx\p_equalheight\empty \else
\scratchdimen\p_equalheight\relax
\ifdim\d_grph_scale_ht<\scratchdimen
- \setbox\nextbox\vpack to \scratchdimen{\vss\box\nextbox\vss}%
+ \setbox\nextbox\naturalvpack to \scratchdimen{\vss\box\nextbox\vss}%
\fi
\fi}
@@ -687,7 +687,7 @@
\scratchheight\clippingparameter\c!sy\scratchheight
\advance\scratchyoffset \ht\nextbox
\fi
- \setbox\nextbox\hpack
+ \setbox\nextbox\naturalhpack
{\advance\scratchxoffset -\clippingparameter\c!leftoffset \relax
\advance\scratchyoffset -\clippingparameter\c!bottomoffset\relax
\hskip-\scratchxoffset
@@ -696,13 +696,13 @@
\wd\nextbox\zeropoint
\ht\nextbox\zeropoint
\dp\nextbox\zeropoint
- \setbox\nextbox\hpack
+ \setbox\nextbox\naturalhpack
{\advance\scratchwidth \dimexpr\clippingparameter\c!leftoffset +\clippingparameter\c!rightoffset\relax
\advance\scratchheight\dimexpr\clippingparameter\c!bottomoffset+\clippingparameter\c!topoffset \relax
\dostartclipping{\clippingparameter\c!mp}\scratchwidth\scratchheight
\box\nextbox
\dostopclipping}%
- \setbox\nextbox\hpack
+ \setbox\nextbox\naturalhpack
{\hskip-\clippingparameter\c!leftoffset
\lower \clippingparameter\c!bottomoffset
\box\nextbox}%
@@ -760,7 +760,11 @@
{\scratchdimen\wd\nextbox
% better use an hbox (if no \forgetall, leftskip etc may creep in)
%\setbox\nextbox\vbox{\forgetall\dostartmirroring\hskip-\wd\nextbox\box\nextbox\dostopmirroring}%
- \setbox\nextbox\hpack{\dostartmirroring\hskip-\wd\nextbox\box\nextbox\dostopmirroring}%
+ \setbox\nextbox\naturalhpack
+ {\dostartmirroring
+ \hskip-\wd\nextbox
+ \box\nextbox
+ \dostopmirroring}%
\wd\nextbox\scratchdimen
\box\nextbox
\egroup}
@@ -908,7 +912,7 @@
\egroup}
\def\grph_rotate_finish_indeed
- {\hpack\bgroup
+ {\naturalhpack\bgroup
\ifx\p_rotation_rotation\empty
\grph_rotate_finish_nop
\else
@@ -938,19 +942,19 @@
\def\grph_rotate_finish_yes
{\begincsname\??rotatepreset\p_rotation_rotation\endcsname
- \setbox\nextbox\vpack{\box\nextbox}% not really needed
+ \setbox\nextbox\naturalvpack{\box\nextbox}% not really needed
\dontcomplain
\ifconditional\c_grph_rotate_center
\d_grph_rotate_saved_width \wd\nextbox
\d_grph_rotate_saved_height\ht\nextbox
\d_grph_rotate_saved_depth \dp\nextbox
- \setbox\nextbox\vpack{\vskip.5\ht\nextbox\hskip-.5\wd\nextbox\box\nextbox}%
+ \setbox\nextbox\naturalvpack{\vskip.5\ht\nextbox\hskip-.5\wd\nextbox\box\nextbox}%
\smashbox\nextbox
\fi
\d_grph_rotate_width \wd\nextbox
\d_grph_rotate_height\ht\nextbox
\d_grph_rotate_depth \dp\nextbox
- \setbox\nextbox\vpack{\hpack{\raise\dp\nextbox\box\nextbox}}%
+ \setbox\nextbox\naturalvpack{\naturalhpack{\raise\dp\nextbox\box\nextbox}}%
\d_grph_rotate_used_height \ht\nextbox
% much of the next happens in lua (all the sin and cos) so we can do that in
% one go if needed
@@ -981,7 +985,7 @@
\fi\fi
\fi
\ifconditional\c_grph_rotate_center
- \setbox\nextbox\vpack{\vskip-.5\d_grph_rotate_saved_height\hskip.5\d_grph_rotate_saved_height\box\nextbox}%
+ \setbox\nextbox\naturalvpack{\vskip-.5\d_grph_rotate_saved_height\hskip.5\d_grph_rotate_saved_height\box\nextbox}%
\wd\nextbox\d_grph_rotate_saved_width
\ht\nextbox\d_grph_rotate_saved_height
\dp\nextbox\d_grph_rotate_saved_depth
@@ -1047,9 +1051,9 @@
\fi}
\def\grph_rotate_apply
- {\setbox\nextbox\vpack to \d_grph_rotate_y_size
+ {\setbox\nextbox\naturalvpack to \d_grph_rotate_y_size
{\vfill
- \hpack to \d_grph_rotate_x_size
+ \naturalhpack to \d_grph_rotate_x_size
{\dostartrotation\p_rotation_rotation
\wd\nextbox\zeropoint
\ht\nextbox\zeropoint
@@ -1057,7 +1061,7 @@
\dostoprotation
\hfill}%
\kern\d_grph_rotate_y_position}%
- \setbox\nextbox\hpack
+ \setbox\nextbox\naturalhpack
{\kern\dimexpr\d_grph_rotate_x_position+\d_grph_rotate_x_offset\relax
\lower\d_grph_rotate_y_offset\box\nextbox}}