[latex3-commits] [git/LaTeX3-latex3-latex3] master: Save/restore drawing color with scope (c2cf368)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Feb 26 20:41:46 CET 2018


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

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

commit c2cf368e4f1b29d4093b5b080ec9fd4c98db7bef
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Feb 26 19:41:46 2018 +0000

    Save/restore drawing color with scope


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

c2cf368e4f1b29d4093b5b080ec9fd4c98db7bef
 l3experimental/l3draw/l3draw-scopes.dtx |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/l3experimental/l3draw/l3draw-scopes.dtx b/l3experimental/l3draw/l3draw-scopes.dtx
index 3578632..55a8cfd 100644
--- a/l3experimental/l3draw/l3draw-scopes.dtx
+++ b/l3experimental/l3draw/l3draw-scopes.dtx
@@ -154,11 +154,15 @@
 % \subsection{Scopes}
 %
 % \begin{variable}{\l_@@_linewidth_dim}
+% \begin{variable}{\l_@@_fill_color_tl, \l_@@_stroke_color_tl}
 %   Storage for local variables.
 %    \begin{macrocode}
 \dim_new:N \l_@@_linewidth_dim
+\tl_new:N \l_@@_fill_color_tl
+\tl_new:N \l_@@_stroke_color_tl
 %    \end{macrocode}
 % \end{variable}
+% \end{variable}
 %
 % \begin{macro}{\draw_scope_begin:, \draw_scope_begin:}
 %   As well as the graphics (and \TeX{}) scope, also deal with global
@@ -169,11 +173,15 @@
     \driver_draw_scope_begin:
     \group_begin:
       \dim_set_eq:NN \l_@@_linewidth_dim \g_@@_linewidth_dim
+      \tl_set_eq:NN \l_@@_fill_color_tl \g_@@_fill_color_tl
+      \tl_set_eq:NN \l_@@_stroke_color_tl \g_@@_stroke_color_tl
       \@@_path_reset_limits:
   }
 \cs_new_protected:Npn \draw_scope_end:
   {
       \dim_gset_eq:NN \g_@@_linewidth_dim \l_@@_linewidth_dim
+      \tl_gset_eq:NN \g_@@_fill_color_tl \l_@@_fill_color_tl
+      \tl_gset_eq:NN \g_@@_stroke_color_tl \l_@@_stroke_color_tl
     \group_end:
     \driver_draw_scope_end:
   }





More information about the latex3-commits mailing list