diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-07 21:50:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-07 21:50:56 +0000 |
commit | f11f49763fc33ac8427d8c175d98a8d1275e4c5c (patch) | |
tree | 79aacd4b6ab168db69112977f42c2c99204e1621 /Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx | |
parent | fb72b3560bdc8a98d78bf919da56c3316fa7723d (diff) |
l3 (6mar18)
git-svn-id: svn://tug.org/texlive/trunk@46875 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx | 70 |
1 files changed, 30 insertions, 40 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx index 01497992889..69ca8b6ae73 100644 --- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx +++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-points.dtx @@ -42,7 +42,7 @@ % }^^A % } % -% \date{Released 2018/02/21} +% \date{Released 2018/03/05} % % \maketitle % @@ -485,39 +485,31 @@ % \begin{macro}[EXP]{\@@_point_interpolate_distance:nnnnn} % \begin{macro}[EXP] % { -% \@@_point_interpolate_distance_aux:nnnnnnn, -% \@@_point_interpolate_distance_aux:nnnnnnn, -% } -% \begin{macro}[EXP] -% { -% \@@_point_interpolate_distance_aux:nnnnnn, -% \@@_point_interpolate_distance_aux:fnnnnn, +% \@@_point_interpolate_distance:nnnnnn, +% \@@_point_interpolate_distance:fnnnnn, % } % Same idea but using the normalised length to obtain the scale factor. +% The start point is needed twice, so we force evaluation, but the end +% point is needed only the once. % \begin{macrocode} \cs_new:Npn \draw_point_interpolate_distance:nnn #1#2#3 { - \@@_point_process:nnn - { \@@_point_interpolate_distance:nnnnn {#1} } - {#2} {#3} - } -\cs_new:Npn \@@_point_interpolate_distance:nnnnn #1#2#3#4#5 - { - \@@_point_interpolate_distance_aux:nnnnnnn - { \fp_eval:n { #4 - #2 } } - { \fp_eval:n { #5 - #3 } } - {#2} {#3} {#4} {#5} {#1} + \@@_point_process:nn + { \@@_point_interpolate_distance:nnnn {#1} {#3} } + {#2} } -\cs_new:Npn \@@_point_interpolate_distance_aux:nnnnnnn #1#2#3#4#5#6#7 +\cs_new:Npn \@@_point_interpolate_distance:nnnn #1#2#3#4 { - \@@_point_interpolate_distance_aux:fnnnn - { \fp_eval:n { (#7) / (sqrt ( #1 * #1 + #2 * #2 )) } } - {#3} {#4} {#5} {#6} + \@@_point_process:nn + { + \@@_point_interpolate_distance:fnnnn + { \fp_eval:n {#1} } {#3} {#4} + } + { \draw_point_unit_vector:n { ( #2 ) - ( #3 , #4 ) } } } -\cs_generate_variant:Nn \@@_point_interpolate_distance_aux:nnnnnnn { ff } -\cs_new:Npn \@@_point_interpolate_distance_aux:nnnnn #1#2#3#4#5 +\cs_new:Npn \@@_point_interpolate_distance:nnnnn #1#2#3#4#5 { \@@_point_to_dim:n { #2 + #1 * #4 , #3 + #1 * #5 } } -\cs_generate_variant:Nn \@@_point_interpolate_distance_aux:nnnnn { f } +\cs_generate_variant:Nn \@@_point_interpolate_distance:nnnnn { f } % \end{macrocode} % \end{macro} % \end{macro} @@ -605,7 +597,6 @@ % \end{macro} % \end{macro} % \end{macro} -% \end{macro} % % \begin{macro}[EXP]{\draw_point_interpolate_curve:nnnnn} % \begin{macro}[EXP]{\draw_point_interpolate_curve_auxi:nnnnnnnnn} @@ -889,20 +880,20 @@ } \cs_new:Npn \@@_point_transform:nn #1#2 { - \bool_if:NTF \l_@@_transformcm_active_bool + \bool_if:NTF \l_@@_matrix_active_bool { \@@_point_to_dim:n { ( - \l_@@_transformcm_aa_fp * #1 - + \l_@@_transformcm_ba_fp * #2 - + \l_@@_transformcm_xshift_dim + \l_@@_matrix_a_fp * #1 + + \l_@@_matrix_c_fp * #2 + + \l_@@_xshift_dim ) , ( - \l_@@_transformcm_ab_fp * #1 - + \l_@@_transformcm_bb_fp * #2 - + \l_@@_transformcm_yshift_dim + \l_@@_matrix_b_fp * #1 + + \l_@@_matrix_d_fp * #2 + + \l_@@_yshift_dim ) } } @@ -910,8 +901,7 @@ \@@_point_to_dim:n { (#1, #2) - + ( \l_@@_transformcm_xshift_dim , - \l_@@_transformcm_yshift_dim ) + + ( \l_@@_xshift_dim , \l_@@_yshift_dim ) } } } @@ -930,18 +920,18 @@ } \cs_new:Npn \@@_point_transform_noshift:nn #1#2 { - \bool_if:NTF \l_@@_transformcm_active_bool + \bool_if:NTF \l_@@_matrix_active_bool { \@@_point_to_dim:n { ( - \l_@@_transformcm_aa_fp * #1 - + \l_@@_transformcm_ba_fp * #2 + \l_@@_matrix_a_fp * #1 + + \l_@@_matrix_c_fp * #2 ) , ( - \l_@@_transformcm_ab_fp * #1 - + \l_@@_transformcm_bb_fp * #2 + \l_@@_matrix_b_fp * #1 + + \l_@@_matrix_d_fp * #2 ) } } |