summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx16
1 files changed, 12 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx
index c3d98b5d52b..5f28fc920d9 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-scopes.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2019-01-28}
+% \date{Released 2019-03-05}
%
% \maketitle
%
@@ -82,10 +82,11 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l_@@_main_box}
-% Box for setting the drawing.
+% \begin{variable}{\l_@@_layer_main_box, \l_@@_layer_main_box}
+% Box for setting the drawing itself and the top-level layer.
% \begin{macrocode}
\box_new:N \l_@@_main_box
+\box_new:N \l_@@_layer_main_box
% \end{macrocode}
% \end{variable}
%
@@ -115,7 +116,8 @@
% mechanism largely as it then sets up the internal data structures. It may be
% that a coffin construct is better here in the longer term: that may become
% clearer as the code is completed. As we need to avoid any insertion of
-% baseline skips, the outer box here has to be an |hbox|.
+% baseline skips, the outer box here has to be an |hbox|. To allow for
+% layers, there is some box nesting: notice that we
% \begin{macrocode}
\cs_new_protected:Npn \draw_begin:
{
@@ -136,9 +138,13 @@
\draw_join_miter:
\draw_miterlimit:n { 10 }
\draw_dash_pattern:nn { } { 0cm }
+ \hbox_set:Nw \l_@@_layer_main_box
}
\cs_new_protected:Npn \draw_end:
{
+ \exp_args:NNNV \hbox_set_end:
+ \clist_set:Nn \l_draw_layers_clist \l_draw_layers_clist
+ \@@_layers_insert:
\driver_draw_end:
\hbox_set_end:
\dim_compare:nNnT \g_@@_xmin_dim = \c_max_dim
@@ -244,9 +250,11 @@
\draw_path_scope_begin:
\draw_transform_matrix_reset:
\draw_transform_shift_reset:
+ \@@_layers_save:
}
\cs_new_protected:Npn \draw_suspend_end:
{
+ \@@_layers_restore:
\draw_path_scope_end:
\@@_scope_bb_end:
}