diff options
Diffstat (limited to 'macros/latex/contrib/l3experimental/l3draw-paths.dtx')
-rw-r--r-- | macros/latex/contrib/l3experimental/l3draw-paths.dtx | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/macros/latex/contrib/l3experimental/l3draw-paths.dtx b/macros/latex/contrib/l3experimental/l3draw-paths.dtx index 53032f4d61..735db2d23e 100644 --- a/macros/latex/contrib/l3experimental/l3draw-paths.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-paths.dtx @@ -2,7 +2,7 @@ % %% File: l3draw-paths.dtx % -% Copyright (C) 2018-2023 The LaTeX Project +% Copyright (C) 2018-2024 The LaTeX Project % % It may be distributed and/or modified under the conditions of the % LaTeX Project Public License (LPPL), either version 1.3c of this @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2023-12-08} +% \date{Released 2024-01-04} % % \maketitle % @@ -235,9 +235,9 @@ } \cs_new_protected:Npn \@@_path_moveto:nn #1#2 { - \@@_path_update_limits:nn {#1} {#2} - \@@_softpath_moveto:nn {#1} {#2} - \@@_path_update_last:nn {#1} {#2} + \@@_path_update_limits:nn {#1} {#2} + \@@_softpath_moveto:nn {#1} {#2} + \@@_path_update_last:nn {#1} {#2} } \cs_new_protected:Npn \draw_path_lineto:n #1 { @@ -247,10 +247,10 @@ } \cs_new_protected:Npn \@@_path_lineto:nn #1#2 { - \@@_path_mark_corner: - \@@_path_update_limits:nn {#1} {#2} - \@@_softpath_lineto:nn {#1} {#2} - \@@_path_update_last:nn {#1} {#2} + \@@_path_mark_corner: + \@@_path_update_limits:nn {#1} {#2} + \@@_softpath_lineto:nn {#1} {#2} + \@@_path_update_last:nn {#1} {#2} } \cs_new_protected:Npn \draw_path_curveto:nnn #1#2#3 { @@ -265,11 +265,11 @@ } \cs_new_protected:Npn \@@_path_curveto:nnnnnn #1#2#3#4#5#6 { - \@@_path_update_limits:nn {#1} {#2} - \@@_path_update_limits:nn {#3} {#4} - \@@_path_update_limits:nn {#5} {#6} - \@@_softpath_curveto:nnnnnn {#1} {#2} {#3} {#4} {#5} {#6} - \@@_path_update_last:nn {#5} {#6} + \@@_path_update_limits:nn {#1} {#2} + \@@_path_update_limits:nn {#3} {#4} + \@@_path_update_limits:nn {#5} {#6} + \@@_softpath_curveto:nnnnnn {#1} {#2} {#3} {#4} {#5} {#6} + \@@_path_update_last:nn {#5} {#6} } % \end{macrocode} % \end{macro} @@ -348,32 +348,32 @@ \fp_set:Nn \l_@@_path_tmpb_fp { \c_@@_path_curveto_b_fp * #2 } \use:e { - \@@_path_mark_corner: - \@@_path_curveto:nnnnnn - { - \fp_to_dim:n - { - \c_@@_path_curveto_a_fp * \g_@@_path_lastx_dim - + \l_@@_path_tmpa_fp - } - } - { - \fp_to_dim:n - { - \c_@@_path_curveto_a_fp * \g_@@_path_lasty_dim - + \l_@@_path_tmpb_fp - } - } - { - \fp_to_dim:n - { \c_@@_path_curveto_a_fp * #3 + \l_@@_path_tmpa_fp } - } - { - \fp_to_dim:n - { \c_@@_path_curveto_a_fp * #4 + \l_@@_path_tmpb_fp } - } - {#3} - {#4} + \@@_path_mark_corner: + \@@_path_curveto:nnnnnn + { + \fp_to_dim:n + { + \c_@@_path_curveto_a_fp * \g_@@_path_lastx_dim + + \l_@@_path_tmpa_fp + } + } + { + \fp_to_dim:n + { + \c_@@_path_curveto_a_fp * \g_@@_path_lasty_dim + + \l_@@_path_tmpb_fp + } + } + { + \fp_to_dim:n + { \c_@@_path_curveto_a_fp * #3 + \l_@@_path_tmpa_fp } + } + { + \fp_to_dim:n + { \c_@@_path_curveto_a_fp * #4 + \l_@@_path_tmpb_fp } + } + {#3} + {#4} } } \fp_const:Nn \c_@@_path_curveto_a_fp { 1 / 3 } @@ -390,8 +390,8 @@ % \begin{macro} % { % \@@_path_arc_auxi:nnnnNnn, -% \@@_path_arc_auxi:fnnnNnn, -% \@@_path_arc_auxi:fnfnNnn +% \@@_path_arc_auxi:enenNnn, +% \@@_path_arc_auxi:eennNnn % } % \begin{macro}{\@@_path_arc_auxii:nnnNnnnn} % \begin{macro}{\@@_path_arc_auxiii:nn} @@ -416,7 +416,7 @@ { \fp_eval:n {#2} } { \fp_to_dim:n {#3} } { \fp_to_dim:n {#4} } - } + } } \cs_new_protected:Npn \@@_path_arc:nnnn #1#2#3#4 { @@ -432,14 +432,14 @@ { \fp_compare:nNnTF \l_@@_path_arc_delta_fp > { 115 } { - \@@_path_arc_auxi:ffnnNnn + \@@_path_arc_auxi:eennNnn { \fp_to_decimal:N \l_@@_path_arc_start_fp } { \fp_eval:n { \l_@@_path_arc_start_fp #3 90 } } { 90 } {#2} #3 {#4} {#5} } { - \@@_path_arc_auxi:ffnnNnn + \@@_path_arc_auxi:eennNnn { \fp_to_decimal:N \l_@@_path_arc_start_fp } { \fp_eval:n { \l_@@_path_arc_start_fp #3 60 } } { 60 } {#2} @@ -447,7 +447,7 @@ } } \@@_path_mark_corner: - \@@_path_arc_auxi:fnfnNnn + \@@_path_arc_auxi:enenNnn { \fp_to_decimal:N \l_@@_path_arc_start_fp } {#2} { \fp_eval:n { abs( \l_@@_path_arc_start_fp - #2 ) } } @@ -488,10 +488,10 @@ } } } -\cs_generate_variant:Nn \@@_path_arc_auxi:nnnnNnn { fnf , ff } +\cs_generate_variant:Nn \@@_path_arc_auxi:nnnnNnn { ene , ee } % \end{macrocode} % We can now calculate the required points. As everything here is -% non-expandable, that is best done by using \texttt{x}-type expansion +% non-expandable, that is best done by using \texttt{e}-type expansion % to build up the tokens. The three points are calculated out-of-order, % since finding the second control point needs the position of the end % point. Once the points are found, fire-off the fundamental path @@ -708,7 +708,7 @@ { \@@_path_rectangle_rounded:nnnn } { \@@_path_rectangle:nnnn } } - { \draw_point_transform:n {#1} } + {#1} {#2} } \cs_new_protected:Npn \@@_path_rectangle:nnnn #1#2#3#4 @@ -752,12 +752,12 @@ % \begin{macro}{\draw_path_grid:nnnn} % \begin{macro} % { -% \@@_path_grid_auxi:nnnnnn, \@@_path_grid_auxi:ffnnnn, +% \@@_path_grid_auxi:nnnnnn, \@@_path_grid_auxi:eennnn, % \@@_path_grid_auxii:nnnnnn, -% \@@_path_grid_auxiii:nnnnnn, \@@_path_grid_auxiiii:ffnnnn +% \@@_path_grid_auxiii:nnnnnn, \@@_path_grid_auxiiii:eennnn % } % \begin{macro} -% {\@@_path_grid_auxiv:nnnnnnnn, \@@_path_grid_auxiv:ffnnnnnn} +% {\@@_path_grid_auxiv:nnnnnnnn, \@@_path_grid_auxiv:eennnnnn} % The main complexity here is lining up the grid correctly. % To keep it simple, we tidy up the argument ordering first. % \begin{macrocode} @@ -765,7 +765,7 @@ { \@@_point_process:nnn { - \@@_path_grid_auxi:ffnnnn + \@@_path_grid_auxi:eennnn { \dim_eval:n { \dim_abs:n {#1} } } { \dim_eval:n { \dim_abs:n {#2} } } } @@ -777,7 +777,7 @@ { \@@_path_grid_auxii:nnnnnn {#1} {#2} {#5} {#4} {#3} {#6} } { \@@_path_grid_auxii:nnnnnn {#1} {#2} {#3} {#4} {#5} {#6} } } -\cs_generate_variant:Nn \@@_path_grid_auxi:nnnnnn { ff } +\cs_generate_variant:Nn \@@_path_grid_auxi:nnnnnn { ee } \cs_new_protected:Npn \@@_path_grid_auxii:nnnnnn #1#2#3#4#5#6 { \dim_compare:nNnTF {#4} > {#6} @@ -786,7 +786,7 @@ } \cs_new_protected:Npn \@@_path_grid_auxiii:nnnnnn #1#2#3#4#5#6 { - \@@_path_grid_auxiv:ffnnnnnn + \@@_path_grid_auxiv:eennnnnn { \fp_to_dim:n { #1 * trunc(#3/(#1)) } } { \fp_to_dim:n { #2 * trunc(#4/(#2)) } } {#1} {#2} {#3} {#4} {#5} {#6} @@ -810,7 +810,7 @@ \draw_path_lineto:n { #7 , ##1 } } } -\cs_generate_variant:Nn \@@_path_grid_auxiv:nnnnnnnn { ff } +\cs_generate_variant:Nn \@@_path_grid_auxiv:nnnnnnnn { ee } % \end{macrocode} % \end{macro} % \end{macro} @@ -864,7 +864,7 @@ \@@_path_reset_limits: } { \@@_path_use:n { #1 , clear } } - } + } % \end{macrocode} % Map over the actions and set up the data: mainly just booleans, % but with the possibility to cover more complex cases. The business end |