[latex3-commits] [git/LaTeX3-latex3-latex3] master: \draw_begin:/\draw_end: should be grouped (7718798)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Feb 26 14:36:34 CET 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/77187981d8662ce25e0f7e4353ee5d9d868af141

>---------------------------------------------------------------

commit 77187981d8662ce25e0f7e4353ee5d9d868af141
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Feb 26 13:36:34 2018 +0000

    \draw_begin:/\draw_end: should be grouped
    
    Avoid any issues further down the line.


>---------------------------------------------------------------

77187981d8662ce25e0f7e4353ee5d9d868af141
 l3experimental/l3draw/l3draw-scopes.dtx |   68 ++++++++++++++++---------------
 1 file changed, 35 insertions(+), 33 deletions(-)

diff --git a/l3experimental/l3draw/l3draw-scopes.dtx b/l3experimental/l3draw/l3draw-scopes.dtx
index 75d925c..0fb4841 100644
--- a/l3experimental/l3draw/l3draw-scopes.dtx
+++ b/l3experimental/l3draw/l3draw-scopes.dtx
@@ -108,42 +108,44 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \draw_begin:
   {
-    \int_gincr:N \g_@@_id_int
-    \vbox_set:Nw \l_@@_main_box
-      \driver_draw_begin:
-      \dim_gset:Nn \g_@@_xmax_dim { -\c_max_dim }
-      \dim_gset:Nn \g_@@_xmin_dim {  \c_max_dim }
-      \dim_gset:Nn \g_@@_ymax_dim { -\c_max_dim }
-      \dim_gset:Nn \g_@@_ymin_dim {  \c_max_dim }
-      \bool_set_true:N \l_@@_update_bb_bool
-      \draw_transform_reset:
-      \draw_linewidth:n { \l_draw_default_linewidth_dim }
-      \@@_softpath_clear:
+    \group_begin:
+      \int_gincr:N \g_@@_id_int
+      \vbox_set:Nw \l_@@_main_box
+        \driver_draw_begin:
+        \dim_gset:Nn \g_@@_xmax_dim { -\c_max_dim }
+        \dim_gset:Nn \g_@@_xmin_dim {  \c_max_dim }
+        \dim_gset:Nn \g_@@_ymax_dim { -\c_max_dim }
+        \dim_gset:Nn \g_@@_ymin_dim {  \c_max_dim }
+        \bool_set_true:N \l_@@_update_bb_bool
+        \draw_transform_reset:
+        \draw_linewidth:n { \l_draw_default_linewidth_dim }
+        \@@_softpath_clear:
   }
 \cs_new_protected:Npn \draw_end:
   {
-      \driver_draw_end:
-    \vbox_set_end:
-    \dim_compare:nNnT \g_@@_xmin_dim = \c_max_dim
-      {
-        \dim_gzero:N \g_@@_xmax_dim
-        \dim_gzero:N \g_@@_xmin_dim
-        \dim_gzero:N \g_@@_ymax_dim
-        \dim_gzero:N \g_@@_ymin_dim
-      }
-    \hbox_set:Nn \l_@@_main_box
-      {
-        \skip_horizontal:n { -\g_@@_xmin_dim }
-        \box_move_down:nn { \g_@@_ymin_dim }
-          { \box_use_drop:N \l_@@_main_box }
-      }
-    \box_set_ht:Nn \l_@@_main_box
-      { \g_@@_ymax_dim - \g_@@_ymin_dim }
-    \box_set_dp:Nn \l_@@_main_box { 0pt }
-    \box_set_wd:Nn \l_@@_main_box
-      { \g_@@_xmax_dim - \g_@@_xmin_dim }
-    \mode_leave_vertical:
-    \box_use_drop:N \l_@@_main_box
+        \driver_draw_end:
+      \vbox_set_end:
+      \dim_compare:nNnT \g_@@_xmin_dim = \c_max_dim
+        {
+          \dim_gzero:N \g_@@_xmax_dim
+          \dim_gzero:N \g_@@_xmin_dim
+          \dim_gzero:N \g_@@_ymax_dim
+          \dim_gzero:N \g_@@_ymin_dim
+        }
+      \hbox_set:Nn \l_@@_main_box
+        {
+          \skip_horizontal:n { -\g_@@_xmin_dim }
+          \box_move_down:nn { \g_@@_ymin_dim }
+            { \box_use_drop:N \l_@@_main_box }
+        }
+      \box_set_ht:Nn \l_@@_main_box
+        { \g_@@_ymax_dim - \g_@@_ymin_dim }
+      \box_set_dp:Nn \l_@@_main_box { 0pt }
+      \box_set_wd:Nn \l_@@_main_box
+        { \g_@@_xmax_dim - \g_@@_xmin_dim }
+      \mode_leave_vertical:
+      \box_use_drop:N \l_@@_main_box
+    \group_end:
   }
 %    \end{macrocode}
 % \end{macro}





More information about the latex3-commits mailing list