[latex3-commits] [git/LaTeX3-latex3-latex3] master: Simply corner rounding (f1b4b90)

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


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

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

commit f1b4b90d5cc9e7d28866838498dc96e2dd0c75d7
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Feb 26 13:32:19 2018 +0000

    Simply corner rounding
    
    Probably for the type of path where this applies,
    l3tl-build is overkill.


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

f1b4b90d5cc9e7d28866838498dc96e2dd0c75d7
 l3experimental/l3draw/l3draw-softpath.dtx |   43 +++++++++++++++--------------
 1 file changed, 23 insertions(+), 20 deletions(-)

diff --git a/l3experimental/l3draw/l3draw-softpath.dtx b/l3experimental/l3draw/l3draw-softpath.dtx
index ac32181..f000a74 100644
--- a/l3experimental/l3draw/l3draw-softpath.dtx
+++ b/l3experimental/l3draw/l3draw-softpath.dtx
@@ -320,8 +320,7 @@
 % step through, find the corners, find the supporting data, do the rounding.
 %
 % \begin{variable}{\l_@@_softpath_main_tl}
-%   For constructing the updated path: notice that we use \pkg{l3tl-build}
-%   here as grouping can be controlled.
+%   For constructing the updated path.
 %    \begin{macrocode}
 \tl_new:N \l_@@_softpath_main_tl
 %    \end{macrocode}
@@ -379,24 +378,25 @@
 %   Rounding corners on a path means going through the entire path and
 %   adjusting it. As such, we avoid this entirely if we know there are no
 %   corners to deal with. Assuming there is work to do, we recover the existing
-%   path and start a loop, using \pkg{l3tl-build} for the main data storage
-%   (everything here can be in a group).
+%   path and start a loop.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_softpath_round_corners:
   {
     \bool_if:NT \g_@@_softpath_corners_bool
       {
-        \__tl_build:Nw \l_@@_softpath_main_tl
-        \tl_clear:N \l_@@_softpath_part_tl
-        \fp_zero:N \l_@@_softpath_lastx_fp
-        \fp_zero:N \l_@@_softpath_lasty_fp
-        \tl_clear:N \l_@@_softpath_first_tl
-        \tl_clear:N \l_@@_softpath_move_tl
-        \@@_softpath_concat:n { }
-        \exp_after:wN \@@_softpath_round_loop:Nnn
-          \g_@@_softpath_main_tl
-          \q_recursion_tail ? ?
-          \q_recursion_stop
+        \group_begin:
+          \tl_clear:N \l_@@_softpath_main_tl
+          \tl_clear:N \l_@@_softpath_part_tl
+          \fp_zero:N \l_@@_softpath_lastx_fp
+          \fp_zero:N \l_@@_softpath_lasty_fp
+          \tl_clear:N \l_@@_softpath_first_tl
+          \tl_clear:N \l_@@_softpath_move_tl
+          \@@_softpath_concat:n { }
+          \exp_after:wN \@@_softpath_round_loop:Nnn
+            \g_@@_softpath_main_tl
+            \q_recursion_tail ? ?
+            \q_recursion_stop
+        \group_end:
       }
     \bool_gset_false:N \g_@@_softpath_corners_bool
   }
@@ -420,8 +420,10 @@
         \fp_set:Nn \l_@@_softpath_lasty_fp {#3}
         \token_if_eq_meaning:NNTF #1 \@@_softpath_moveto_op:nn
           {
-            \__tl_build_one:o \l_@@_softpath_move_tl
-            \__tl_build_one:o \l_@@_softpath_part_tl
+            \tl_put_right:No \l_@@_softpath_main_tl
+              \l_@@_softpath_move_tl
+            \tl_put_right:No \l_@@_softpath_main_tl
+              \l_@@_softpath_part_tl
             \tl_set:Nn \l_@@_softpath_move_tl { #1 {#2} {#3} }
             \tl_clear:N \l_@@_softpath_first_tl
             \tl_clear:N \l_@@_softpath_part_tl
@@ -647,9 +649,10 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_softpath_round_end:
   {
-    \__tl_build_one:o \l_@@_softpath_move_tl
-    \__tl_build_one:o \l_@@_softpath_part_tl
-    \__tl_build_end:
+    \tl_put_right:No \l_@@_softpath_main_tl
+      \l_@@_softpath_move_tl
+    \tl_put_right:No \l_@@_softpath_main_tl
+      \l_@@_softpath_part_tl
     \tl_gset_eq:NN \g_@@_softpath_main_tl \l_@@_softpath_main_tl
   }
 %    \end{macrocode}





More information about the latex3-commits mailing list