diff options
Diffstat (limited to 'macros/latex/contrib/l3experimental/l3draw-points.dtx')
-rw-r--r-- | macros/latex/contrib/l3experimental/l3draw-points.dtx | 70 |
1 files changed, 36 insertions, 34 deletions
diff --git a/macros/latex/contrib/l3experimental/l3draw-points.dtx b/macros/latex/contrib/l3experimental/l3draw-points.dtx index 527194b8ee..8672d77a78 100644 --- a/macros/latex/contrib/l3experimental/l3draw-points.dtx +++ b/macros/latex/contrib/l3experimental/l3draw-points.dtx @@ -44,7 +44,7 @@ % }^^A % } % -% \date{Released 2021-07-12} +% \date{Released 2021-08-04} % % \maketitle % @@ -112,7 +112,7 @@ \cs_new:Npn \@@_point_process:nn #1#2 { \exp_args:Nf \@@_point_process_auxi:nn - { \@@_point_to_dim:n {#2} } + { \draw_point:n {#2} } {#1} } \cs_new:Npn \@@_point_process_auxi:nn #1#2 @@ -122,8 +122,8 @@ \cs_new:Npn \@@_point_process:nnn #1#2#3 { \exp_args:Nff \@@_point_process_auxiii:nnn - { \@@_point_to_dim:n {#2} } - { \@@_point_to_dim:n {#3} } + { \draw_point:n {#2} } + { \draw_point:n {#3} } {#1} } \cs_new:Npn \@@_point_process_auxiii:nnn #1#2#3 @@ -133,9 +133,9 @@ \cs_new:Npn \@@_point_process:nnnn #1#2#3#4 { \exp_args:Nfff \@@_point_process_auxv:nnnn - { \@@_point_to_dim:n {#2} } - { \@@_point_to_dim:n {#3} } - { \@@_point_to_dim:n {#4} } + { \draw_point:n {#2} } + { \draw_point:n {#3} } + { \draw_point:n {#4} } {#1} } \cs_new:Npn \@@_point_process_auxv:nnnn #1#2#3#4 @@ -146,10 +146,10 @@ \cs_new:Npn \@@_point_process:nnnnn #1#2#3#4#5 { \exp_args:Nffff \@@_point_process_auxvii:nnnnn - { \@@_point_to_dim:n {#2} } - { \@@_point_to_dim:n {#3} } - { \@@_point_to_dim:n {#4} } - { \@@_point_to_dim:n {#5} } + { \draw_point:n {#2} } + { \draw_point:n {#3} } + { \draw_point:n {#4} } + { \draw_point:n {#5} } {#1} } \cs_new:Npn \@@_point_process_auxvii:nnnnn #1#2#3#4#5 @@ -174,17 +174,19 @@ % \end{macro} % \end{macro} % -% \begin{macro}[EXP]{\@@_point_to_dim:n} -% \begin{macro}[EXP]{\@@_point_to_dim_aux:n, \@@_point_to_dim_aux:f} -% \begin{macro}[EXP]{\@@_point_to_dim_aux:w} +% \subsection{Basic points} +% +% \begin{macro}[EXP]{\draw_point:n} +% \begin{macro}[EXP]{\@@_point_to_dim:n, \@@_point_to_dim:f} +% \begin{macro}[EXP]{\@@_point_to_dim:w} % Co-ordinates are always returned as two dimensions. % \begin{macrocode} +\cs_new:Npn \draw_point:n #1 + { \@@_point_to_dim:f { \fp_eval:n {#1} } } \cs_new:Npn \@@_point_to_dim:n #1 - { \@@_point_to_dim_aux:f { \fp_eval:n {#1} } } -\cs_new:Npn \@@_point_to_dim_aux:n #1 - { \@@_point_to_dim_aux:w #1 } -\cs_generate_variant:Nn \@@_point_to_dim_aux:n { f } -\cs_new:Npn \@@_point_to_dim_aux:w ( #1 , ~ #2 ) { #1pt , #2pt } + { \@@_point_to_dim:w #1 } +\cs_generate_variant:Nn \@@_point_to_dim:n { f } +\cs_new:Npn \@@_point_to_dim:w ( #1 , ~ #2 ) { #1pt , #2pt } % \end{macrocode} % \end{macro} % \end{macro} @@ -203,7 +205,7 @@ \cs_new:Npn \draw_point_polar:nnn #1#2#3 { \@@_draw_polar:fnn { \fp_eval:n {#3} } {#1} {#2} } \cs_new:Npn \@@_draw_polar:nnn #1#2#3 - { \@@_point_to_dim:n { cosd(#1) * (#2) , sind(#1) * (#3) } } + { \draw_point:n { cosd(#1) * (#2) , sind(#1) * (#3) } } \cs_generate_variant:Nn \@@_draw_polar:nnn { f } % \end{macrocode} % \end{macro} @@ -239,7 +241,7 @@ \fp_compare:nNnTF {#1} = \c_zero_fp { 0pt, 1pt } { - \@@_point_to_dim:n + \draw_point:n { ( #2 , #3 ) / #1 } } } @@ -308,7 +310,7 @@ } \cs_new:Npn \@@_point_intersect_lines_aux:nnnnnn #1#2#3#4#5#6 { - \@@_point_to_dim:n + \draw_point:n { ( #2 * #3 - #1 * #4 , #2 * #5 - #1 * #6 ) / ( #4 * #5 - #6 * #3 ) @@ -462,7 +464,7 @@ \cs_generate_variant:Nn \@@_point_intersect_circles_auxvi:nnnnnnnn { f } \cs_new:Npn \@@_point_intersect_circles_auxvii:nnnnnnn #1#2#3#4#5#6#7 { - \@@_point_to_dim:n + \draw_point:n { #6 + #4 * #1 + #2 * #3 * #5 , #7 + #5 * #1 + -1 * #2 * #3 * #4 } } \cs_generate_variant:Nn \@@_point_intersect_circles_auxvii:nnnnnnn { fff } @@ -503,7 +505,7 @@ } \cs_generate_variant:Nn \@@_point_interpolate_line_aux:nnnnn { f } \cs_new:Npn \@@_point_interpolate_line_aux:nnnnnn #1#2#3#4#5#6 - { \@@_point_to_dim:n { #2 * #3 + #1 * #5 , #2 * #4 + #1 * #6 } } + { \draw_point:n { #2 * #3 + #1 * #5 , #2 * #4 + #1 * #6 } } \cs_generate_variant:Nn \@@_point_interpolate_line_aux:nnnnnn { f } % \end{macrocode} % \end{macro} @@ -537,7 +539,7 @@ { \draw_point_unit_vector:n { ( #2 ) - ( #3 , #4 ) } } } \cs_new:Npn \@@_point_interpolate_distance:nnnnn #1#2#3#4#5 - { \@@_point_to_dim:n { #2 + #1 * #4 , #3 + #1 * #5 } } + { \draw_point:n { #2 + #1 * #4 , #3 + #1 * #5 } } \cs_generate_variant:Nn \@@_point_interpolate_distance:nnnnn { f } % \end{macrocode} % \end{macro} @@ -612,7 +614,7 @@ \cs_generate_variant:Nn \@@_point_interpolate_arcaxes_auxiii:nnnnnnn { f } \cs_new:Npn \@@_point_interpolate_arcaxes_auxiv:nnnnnnnn #1#2#3#4#5#6#7#8 { - \@@_point_to_dim:n + \draw_point:n { #3 + #1 * #5 + #2 * #7 , #4 + #1 * #6 + #2 * #8 } } \cs_generate_variant:Nn \@@_point_interpolate_arcaxes_auxiv:nnnnnnnn { ff } @@ -749,7 +751,7 @@ } \cs_new:Npn \@@_point_interpolate_curve_auxviii:nnnnnn #1#2#3#4#5#6 { - \@@_point_to_dim:n + \draw_point:n { #5 * #3 + #6 * #1 , #5 * #4 + #6 * #2 } } \cs_generate_variant:Nn \@@_point_interpolate_curve_auxviii:nnnnnn { ffff } @@ -831,7 +833,7 @@ { \@@_point_vec:ff { \fp_eval:n {#1} } { \fp_eval:n {#2} } } \cs_new:Npn \@@_point_vec:nn #1#2 { - \@@_point_to_dim:n + \draw_point:n { #1 * \l_@@_xvec_x_dim + #2 * \l_@@_yvec_x_dim , #1 * \l_@@_xvec_y_dim + #2 * \l_@@_yvec_y_dim @@ -845,7 +847,7 @@ } \cs_new:Npn \@@_point_vec:nnn #1#2#3 { - \@@_point_to_dim:n + \draw_point:n { #1 * \l_@@_xvec_x_dim + #2 * \l_@@_yvec_x_dim @@ -874,7 +876,7 @@ { \@@_draw_vec_polar:fnn { \fp_eval:n {#3} } {#1} {#2} } \cs_new:Npn \@@_draw_vec_polar:nnn #1#2#3 { - \@@_point_to_dim:n + \draw_point:n { cosd(#1) * (#2) * \l_@@_xvec_x_dim , sind(#1) * (#3) * \l_@@_yvec_y_dim @@ -903,7 +905,7 @@ { \bool_if:NTF \l_@@_matrix_active_bool { - \@@_point_to_dim:n + \draw_point:n { ( \l_@@_matrix_a_fp * #1 @@ -919,7 +921,7 @@ } } { - \@@_point_to_dim:n + \draw_point:n { (#1, #2) + ( \l_@@_xshift_dim , \l_@@_yshift_dim ) @@ -943,7 +945,7 @@ { \bool_if:NTF \l_@@_matrix_active_bool { - \@@_point_to_dim:n + \draw_point:n { ( \l_@@_matrix_a_fp * #1 @@ -956,7 +958,7 @@ ) } } - { \@@_point_to_dim:n { (#1, #2) } } + { \draw_point:n { (#1, #2) } } } % \end{macrocode} % \end{macro} |