[latex3-commits] [git/LaTeX3-latex3-latex3] master: Drawing scopes (6be5741)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Feb 22 23:32:57 CET 2018


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/6be5741c4e85c45b40851d3ed083de3355cf3435

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

commit 6be5741c4e85c45b40851d3ed083de3355cf3435
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Feb 22 22:29:25 2018 +0000

    Drawing scopes
    
    The color part is omitted until we get to arrow support ...


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

6be5741c4e85c45b40851d3ed083de3355cf3435
 l3experimental/l3draw/l3draw-scopes.dtx       |   30 +++++++++++++++++++++++++
 l3experimental/l3draw/testfiles/m3draw000.tlg |    1 +
 2 files changed, 31 insertions(+)

diff --git a/l3experimental/l3draw/l3draw-scopes.dtx b/l3experimental/l3draw/l3draw-scopes.dtx
index b87a6a1..59a3435 100644
--- a/l3experimental/l3draw/l3draw-scopes.dtx
+++ b/l3experimental/l3draw/l3draw-scopes.dtx
@@ -110,6 +110,7 @@
       \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:
   {
@@ -132,6 +133,35 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \subsection{Scopes}
+%
+% \begin{macro}{\l_@@_linewidth_dim}
+%   Storage for local variables.
+%    \begin{macrocode}
+\dim_new:N \l_@@_linewidth_dim
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\draw_scope_begin:, \draw_scope_begin:}
+%   As well as the graphics (and \TeX{}) scope, also deal with global
+%   data structures.
+%    \begin{macrocode}
+\cs_new_protected:Npn \draw_scope_begin:
+  {
+    \driver_draw_scope_begin:
+    \group_begin:
+      \dim_set_eq:NN \l_@@_linewidth_dim \g_@@_linewidth_dim
+      \@@_path_reset_limits:
+  }
+\cs_new_protected:Npn \draw_scope_end:
+  {
+      \dim_gset_eq:NN \g_@@_linewidth_dim \l_@@_linewidth_dim
+    \group_end:
+    \driver_draw_scope_end:
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 %    \begin{macrocode}
 %</initex|package>
 %    \end{macrocode}
diff --git a/l3experimental/l3draw/testfiles/m3draw000.tlg b/l3experimental/l3draw/testfiles/m3draw000.tlg
index 2907519..6141e5f 100644
--- a/l3experimental/l3draw/testfiles/m3draw000.tlg
+++ b/l3experimental/l3draw/testfiles/m3draw000.tlg
@@ -23,6 +23,7 @@ Author: Joseph Wright
 \g__draw_ymax_dim=\dimen...
 \g__draw_ymin_dim=\dimen...
 \l__draw_main_box=\box...
+\l__draw_linewidth_dim=\dimen...
 \g__draw_softpath_buffer_a_int=\count...
 \g__draw_softpath_buffer_b_int=\count...
 \g__draw_softpath_lastx_dim=\dimen...





More information about the latex3-commits mailing list