[latex3-commits] [latex3/latex3] tl-build: Use gbegin/gend n l3draw softpaths (2de1c2cbc)
github at latex-project.org
github at latex-project.org
Wed Oct 18 21:11:54 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : tl-build
Link : https://github.com/latex3/latex3/commit/2de1c2cbc96b19c01e04cf001cecde4c3cf302c2
>---------------------------------------------------------------
commit 2de1c2cbc96b19c01e04cf001cecde4c3cf302c2
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Oct 18 20:11:54 2023 +0100
Use gbegin/gend n l3draw softpaths
>---------------------------------------------------------------
2de1c2cbc96b19c01e04cf001cecde4c3cf302c2
l3experimental/CHANGELOG.md | 3 +++
l3experimental/l3draw/l3draw-paths.dtx | 2 +-
l3experimental/l3draw/l3draw-softpath.dtx | 22 ++++++++++++++--------
3 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/l3experimental/CHANGELOG.md b/l3experimental/CHANGELOG.md
index 7befc1cdf..79bd1d04b 100644
--- a/l3experimental/CHANGELOG.md
+++ b/l3experimental/CHANGELOG.md
@@ -7,6 +7,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+### Changed
+- Update softpath code in `l3draw`
+
## [2023-10-10]
### Changed
diff --git a/l3experimental/l3draw/l3draw-paths.dtx b/l3experimental/l3draw/l3draw-paths.dtx
index 41e866e56..d51fa471f 100644
--- a/l3experimental/l3draw/l3draw-paths.dtx
+++ b/l3experimental/l3draw/l3draw-paths.dtx
@@ -999,7 +999,7 @@
\dim_set_eq:NN \l_@@_softpath_lastx_dim \g_@@_softpath_lastx_dim
\dim_set_eq:NN \l_@@_softpath_lasty_dim \g_@@_softpath_lasty_dim
\@@_path_reset_limits:
- \tl_build_get:NN \g_@@_softpath_main_tl \l_@@_softpath_main_tl
+ \@@_softpath_store:N \l_@@_softpath_main_tl
\bool_set_eq:NN
\l_@@_softpath_corners_bool
\g_@@_softpath_corners_bool
diff --git a/l3experimental/l3draw/l3draw-softpath.dtx b/l3experimental/l3draw/l3draw-softpath.dtx
index 44524fb17..9ea7c9a00 100644
--- a/l3experimental/l3draw/l3draw-softpath.dtx
+++ b/l3experimental/l3draw/l3draw-softpath.dtx
@@ -104,22 +104,28 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}
-% {\@@_softpath_use:, \@@_softpath_clear:}
+% \begin{macro}{\@@_softpath_use:, \@@_softpath_clear:}
+% \begin{macro}{\@@_softpath_store:N}
% 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_use:N \g_@@_softpath_main_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
}
+\cs_new_protected:Npn \@@_softpath_store:N #1
+ {
+ \tl_build_gend:N \g_@@_softpath_main_tl
+ \tl_set_eq:NN #1 \g_@@_softpath_main_tl
+ }
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{variable}{\g_@@_softpath_lastx_dim, \g_@@_softpath_lasty_dim}
% For tracking the end of the path (to close it).
@@ -323,9 +329,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 +593,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}
More information about the latex3-commits
mailing list.