diff options
author | Karl Berry <karl@freefriends.org> | 2023-11-01 20:15:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-11-01 20:15:10 +0000 |
commit | 7888ea6606132ba347b147f1d3d3e02122e607cc (patch) | |
tree | 1e8d4ec81a3f49287a9d605eac72467ad4f1b6d7 /Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx | |
parent | a776d572cfd8fa24365dbc0cc22bbd856fbbe97b (diff) |
latex3 (1nov23)
git-svn-id: svn://tug.org/texlive/trunk@68721 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx index 44524fb17bb..9419015a91b 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-softpath.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-10-10} +% \date{Released 2023-11-01} % % \maketitle % @@ -82,10 +82,10 @@ % \end{macrocode} % \end{variable} % -% \begin{variable}{\l_@@_softpath_internal_tl} -% The soft path itself. +% \begin{variable}{\l_@@_softpath_tmp_tl} +% Scratch space. % \begin{macrocode} -\tl_new:N \l_@@_softpath_internal_tl +\tl_new:N \l_@@_softpath_tmp_tl % \end{macrocode} % \end{variable} % @@ -104,23 +104,51 @@ % \end{macrocode} % \end{macro} % -% \begin{macro} -% {\@@_softpath_use:, \@@_softpath_clear:} +% \begin{macro}{\@@_softpath_use:, \@@_softpath_clear:} % Using and clearing is trivial. % \begin{macrocode} \cs_new_protected:Npn \@@_softpath_use: { - \tl_build_get:NN \g_@@_softpath_main_tl \l_@@_softpath_internal_tl - \l_@@_softpath_internal_tl + \tl_build_gend:N \g_@@_softpath_main_tl + \tl_set_eq:NN \l_@@_softpath_tmp_tl \g_@@_softpath_main_tl + \l_@@_softpath_tmp_tl + \tl_build_gbegin:N \g_@@_softpath_main_tl + \exp_args:NNV \tl_build_gput_right:Nn + \g_@@_softpath_main_tl \l_@@_softpath_tmp_tl } \cs_new_protected:Npn \@@_softpath_clear: { - \tl_build_gclear:N \g_@@_softpath_main_tl + \tl_build_gbegin:N \g_@@_softpath_main_tl \bool_gset_false:N \g_@@_softpath_corners_bool } % \end{macrocode} % \end{macro} % +% \begin{macro}{\@@_softpath_save:, \@@_softpath_restore:} +% Abstracted ideas to keep variables inside this submodule. +% \begin{macrocode} +\cs_new_protected:Npn \@@_softpath_save: + { + \tl_build_gend:N \g_@@_softpath_main_tl + \tl_set_eq:NN + \l_@@_softpath_main_tl + \g_@@_softpath_main_tl + \bool_set_eq:NN + \l_@@_softpath_corners_bool + \g_@@_softpath_corners_bool + \@@_softpath_clear: + } +\cs_new_protected:Npn \@@_softpath_restore: + { + \@@_softpath_clear: + \@@_softpath_add:o \l_@@_softpath_main_tl + \bool_gset_eq:NN + \g_@@_softpath_corners_bool + \l_@@_softpath_corners_bool + } +% \end{macrocode} +% \end{macro} +% % \begin{variable}{\g_@@_softpath_lastx_dim, \g_@@_softpath_lasty_dim} % For tracking the end of the path (to close it). % \begin{macrocode} @@ -323,9 +351,9 @@ \fp_zero:N \l_@@_softpath_lasty_fp \tl_clear:N \l_@@_softpath_first_tl \tl_clear:N \l_@@_softpath_move_tl - \tl_build_get:NN \g_@@_softpath_main_tl \l_@@_softpath_internal_tl + \tl_build_gend:N \g_@@_softpath_main_tl \exp_after:wN \@@_softpath_round_loop:Nnn - \l_@@_softpath_internal_tl + \g_@@_softpath_main_tl \q_@@_recursion_tail ? ? \q_@@_recursion_stop \group_end: @@ -587,7 +615,7 @@ \l_@@_softpath_move_tl \tl_put_right:No \l_@@_softpath_main_tl \l_@@_softpath_part_tl - \tl_build_gclear:N \g_@@_softpath_main_tl + \tl_build_gbegin:N \g_@@_softpath_main_tl \@@_softpath_add:o \l_@@_softpath_main_tl } % \end{macrocode} |