[latex3-commits] [git/LaTeX3-latex3-latex3] master: Change of plan on \draw_point:nn (f4526d8)

Joseph Wright joseph.wright at morningstar2.co.uk
Fri Feb 15 09:33:03 CET 2019


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

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

commit f4526d8ea5d946ae08692618f84d3d31dbf629eb
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Feb 15 08:33:03 2019 +0000

    Change of plan on \draw_point:nn


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

f4526d8ea5d946ae08692618f84d3d31dbf629eb
 l3experimental/l3draw/l3draw-points.dtx       |   10 --------
 l3experimental/l3draw/l3draw.dtx              |   34 ++++++++++++-------------
 l3experimental/l3draw/testfiles/m3draw001.lvt |    8 ------
 l3experimental/l3draw/testfiles/m3draw001.tlg |   30 +++++++++-------------
 4 files changed, 28 insertions(+), 54 deletions(-)

diff --git a/l3experimental/l3draw/l3draw-points.dtx b/l3experimental/l3draw/l3draw-points.dtx
index 32ab867..463b16b 100644
--- a/l3experimental/l3draw/l3draw-points.dtx
+++ b/l3experimental/l3draw/l3draw-points.dtx
@@ -189,16 +189,6 @@
 % \end{macro}
 % \end{macro}
 %
-% \subsection{Cartesian co-ordinates}
-%
-% \begin{macro}[EXP]{\draw_point:n}
-%   A simple wrapper.
-%    \begin{macrocode}
-\cs_new:Npn \draw_point:nn #1#2
-  { \@@_point_to_dim:n { #1 , #2 } }
-%    \end{macrocode}
-% \end{macro}
-%
 % \subsection{Polar co-ordinates}
 %
 % \begin{macro}[EXP]{\draw_point_polar:nn}
diff --git a/l3experimental/l3draw/l3draw.dtx b/l3experimental/l3draw/l3draw.dtx
index 893469b..63175a0 100644
--- a/l3experimental/l3draw/l3draw.dtx
+++ b/l3experimental/l3draw/l3draw.dtx
@@ -152,10 +152,10 @@
 %   \begin{demo}
 %     \dim_new:N \l_mypos_dim
 %     \draw_begin:
-%       \draw_path_moveto:n { \draw_point:nn { 0cm } { \l_mypos_dim } }
-%       \draw_path_lineto:n { \draw_point:nn { 1cm } { \l_mypos_dim } }
+%       \draw_path_moveto:n { 0cm , \l_mypos_dim }
+%       \draw_path_lineto:n { 1cm , \l_mypos_dim }
 %       \dim_set:Nn \l_mypos_dim { 1cm }
-%       \draw_path_lineto:n { \draw_point:nn { 1cm } { \l_mypos_dim } }
+%       \draw_path_lineto:n { 1cm , \l_mypos_dim }
 %       \draw_path_close:
 %       \draw_path_use_clear:n { stroke }
 %     \draw_end:
@@ -367,7 +367,7 @@
 % and may be used outside of the drawing environment. When used in this
 % way, they all yield a co-ordinate tuple, for example
 % \begin{verbatim}
-%   \tl_set:Nx \l_tmpa_tl { \draw_point:n { 1 } { 2 } }
+%   \tl_set:Nx \l_tmpa_tl { \draw_point:nn { 1 } { 2 } }
 %   \tl_show:N \l_tmpa_tl
 % \end{verbatim}
 % gives
@@ -378,10 +378,17 @@
 %
 % This output form is then suitable as \emph{input} for subsequent point
 % calculations, \emph{i.e.}~where a \meta{point} is required it may be
-% given as a tuple. For performance reasons, points are subject to
-% \texttt{f}-type expansion but no further processing. Functions such as
-% \cs{draw_point:nn} should therefore be used when a point contains
-% expression material.
+% given as a tuple. This \emph{may} include units and surrounding
+% parentheses, for example
+% \begin{verbatim}
+%   1,2
+%   (1,2)
+%   1cm,3pt
+%   (1pt,2cm)
+%   2 * sind(30), 2^4in
+% \end{verbatim}
+% are all valid input forms. Notice that each part of the tuple may itself
+% be a float point expression.
 %
 % Point co-ordinates are relative to the canvas axes, but can be transformed
 % by \cs{draw_point_transform:n}. These manipulation is applied by many
@@ -392,19 +399,10 @@
 % manipulation of the canvas axes themselves.
 %
 % Notice that in contrast to \pkg{pgf} it is possible to give the positions
-% of points \emph{directly} provided it is given explicitly as a tuple of
-% dimensions.
+% of points \emph{directly}.
 %
 % \subsubsection{Basic point functions}
 %
-% \begin{function}[EXP]{\draw_point:nn}
-%   \begin{syntax}
-%     \cs{draw_point:n} \Arg{x} \Arg{y}
-%   \end{syntax}
-%   Gives the co-ordinates of the point at the two co-ordindates. These
-%   may both be given as floating point expressions.
-% \end{function}
-%
 % \begin{function}[EXP]{\draw_point_polar:nn, \draw_point_polar:nnn}
 %   \begin{syntax}
 %     \cs{draw_point_polar:nn} \Arg{angle} \Arg{radius}
diff --git a/l3experimental/l3draw/testfiles/m3draw001.lvt b/l3experimental/l3draw/testfiles/m3draw001.lvt
index eeebd2a..00e8f67 100644
--- a/l3experimental/l3draw/testfiles/m3draw001.lvt
+++ b/l3experimental/l3draw/testfiles/m3draw001.lvt
@@ -17,14 +17,6 @@
 
 \START
 
-\TESTEXP { \draw_point:nn }
-  {
-    \draw_point:nn { 1 } { 2 }
-    \NEWLINE
-    \draw_point:nn { 1 + 2 } { 3 * sqrt(4) cm }
-    \NEWLINE
-  }
-
 \TESTEXP { \draw_point_polar:nn(n) }
   {
     \draw_point_polar:nn { 30 } { 1cm }
diff --git a/l3experimental/l3draw/testfiles/m3draw001.tlg b/l3experimental/l3draw/testfiles/m3draw001.tlg
index 285bbdc..d9a6277 100644
--- a/l3experimental/l3draw/testfiles/m3draw001.tlg
+++ b/l3experimental/l3draw/testfiles/m3draw001.tlg
@@ -1,58 +1,52 @@
 This is a generated file for the LaTeX (2e + expl3) validation system.
 Don't change this file in any respect.
 ============================================================
-TEST 1: \draw_point:nn 
-============================================================
-1pt,2pt
-3pt,170.7165354330709pt
-============================================================
-============================================================
-TEST 2: \draw_point_polar:nn (n)
+TEST 1: \draw_point_polar:nn (n)
 ============================================================
 24.64080942185094pt,14.2263779527559pt
 24.64080942185094pt,28.45275590551181pt
 24.64080942185094pt,28.45275590551181pt
 ============================================================
 ============================================================
-TEST 3: \draw_point_unit_vector:n 
+TEST 2: \draw_point_unit_vector:n 
 ============================================================
 0.894427190999916pt,0.447213595499958pt
 -0.894427190999916pt,0.447213595499958pt
 ============================================================
 ============================================================
-TEST 4: \draw_point_intersect_lines:nnnn 
+TEST 3: \draw_point_intersect_lines:nnnn 
 ============================================================
 28.4527587890625pt,-0.000000000000004117465614979737pt
 10.51039396997536pt,10.51039396997536pt
 ============================================================
 ============================================================
-TEST 5: \draw_point_intersect_circles:nnnnn 
+TEST 4: \draw_point_intersect_circles:nnnnn 
 ============================================================
 0.00000288355082pt,0.00000288355084pt
 ============================================================
 ============================================================
-TEST 6: \draw_point_interpolate_line:nnn 
+TEST 5: \draw_point_interpolate_line:nnn 
 ============================================================
 28.4527587890625pt,56.905517578125pt
 ============================================================
 ============================================================
-TEST 7: \draw_point_interpolate_distance:nnn 
+TEST 6: \draw_point_interpolate_distance:nnn 
 ============================================================
 1.414213562373095pt,29.86695709264654pt
 54.78416671698724pt,83.23691024726068pt
 ============================================================
 ============================================================
-TEST 8: \draw_point_interpolate_arcaxes:nnnnnn 
+TEST 7: \draw_point_interpolate_arcaxes:nnnnnn 
 ============================================================
 52.44956684602254pt,43.74041050993108pt
 ============================================================
 ============================================================
-TEST 9: \draw_point_interpolate_curve:nnnnnn 
+TEST 8: \draw_point_interpolate_curve:nnnnnn 
 ============================================================
 28.4527587890625pt,35.56594848632813pt
 ============================================================
 ============================================================
-TEST 10: \draw_set_ <axis>vec:n
+TEST 9: \draw_set_ <axis>vec:n
 ============================================================
 > 17.49844360351562pt,17.49844360351562pt.
 <recently read> }
@@ -68,7 +62,7 @@ l. ...  }
 l. ...  }
 ============================================================
 ============================================================
-TEST 11: \draw_point_vec:nn 
+TEST 10: \draw_point_vec:nn 
 ============================================================
 0pt,0pt
 28.4527587890625pt,28.4527587890625pt
@@ -76,7 +70,7 @@ TEST 11: \draw_point_vec:nn
 28.4527587890625pt,28.4527587890625pt
 ============================================================
 ============================================================
-TEST 12: \draw_point_vec:nnn 
+TEST 11: \draw_point_vec:nnn 
 ============================================================
 0pt,0pt
 -10.95431518554688pt,-10.95431518554688pt
@@ -84,7 +78,7 @@ TEST 12: \draw_point_vec:nnn
 -10.95431518554688pt,17.49844360351562pt
 ============================================================
 ============================================================
-TEST 13: \draw_point_vec_polar:nn (n)
+TEST 12: \draw_point_vec_polar:nn (n)
 ============================================================
 49.28162383815817pt,28.4527587890625pt
 24.64081191907909pt,28.4527587890625pt





More information about the latex3-commits mailing list