[latex3-commits] [git/LaTeX3-latex3-latex3] master: l3draw docs (1ab9f57)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Feb 19 00:03:22 CET 2018


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

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

commit 1ab9f57b84df375e0371672ec2964326820ab144
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Feb 18 20:52:38 2018 +0000

    l3draw docs
    
    A few code adjustments here too.
    
    Probably a lot more docs are needed: this is very
    much a first pass.


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

1ab9f57b84df375e0371672ec2964326820ab144
 l3trial/l3draw/l3draw-points.dtx       |   40 +++---
 l3trial/l3draw/l3draw.dtx              |  248 +++++++++++++++++++++++++++-----
 l3trial/l3draw/testfiles/m3draw001.lvt |    4 +-
 3 files changed, 231 insertions(+), 61 deletions(-)

diff --git a/l3trial/l3draw/l3draw-points.dtx b/l3trial/l3draw/l3draw-points.dtx
index a39bc35..2f19f37 100644
--- a/l3trial/l3draw/l3draw-points.dtx
+++ b/l3trial/l3draw/l3draw-points.dtx
@@ -524,41 +524,41 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}[EXP]{\draw_point_interpolate_arc:nnnnnn}
-% \begin{macro}[EXP]{\@@_point_interpolate_arc_auxi:nnnnnnnnn}
+% \begin{macro}[EXP]{\draw_point_interpolate_curve:nnnnnn}
+% \begin{macro}[EXP]{\@@_point_interpolate_curve_auxi:nnnnnnnnn}
 % \begin{macro}[EXP]
 %   {
-%     \@@_point_interpolate_arc_auxii:nnnnnnnnn,
-%     \@@_point_interpolate_arc_auxii:fnnnnnnnn
+%     \@@_point_interpolate_curve_auxii:nnnnnnnnn,
+%     \@@_point_interpolate_curve_auxii:fnnnnnnnn
 %   }
 % \begin{macro}[EXP]
 %   {
-%     \@@_point_interpolate_arc_auxiii:nnnnnnn,
-%     \@@_point_interpolate_arc_auxiii:fnnnnnn
+%     \@@_point_interpolate_curve_auxiii:nnnnnnn,
+%     \@@_point_interpolate_curve_auxiii:fnnnnnn
 %   }
 % \begin{macro}[EXP]
 %   {
-%     \@@_point_interpolate_arc_auxiv:nnnnnnnn,
-%     \@@_point_interpolate_arc_auxiv:ffnnnnnn
+%     \@@_point_interpolate_curve_auxiv:nnnnnnnn,
+%     \@@_point_interpolate_curve_auxiv:ffnnnnnn
 %   }
 %   Finding a point on an ellipse arc is relatively easy: find the correct
 %   angle between the two given, use the sine and cosine of that angle,
 %   apply to the axes. We just have to work a bit with the co-ordinate
 %   expansion.
 %    \begin{macrocode}
-\cs_new:Npn \draw_point_interpolate_arc:nnnnnn #1#2#3#4#5#6
+\cs_new:Npn \draw_point_interpolate_curve:nnnnnn #1#2#3#4#5#6
   {
     \@@_point_process:nnn
       {
         \@@_point_process:nn
-          { \@@_point_interpolate_arc_auxi:nnnnnnnnn {#1} {#5} {#6} }
+          { \@@_point_interpolate_curve_auxi:nnnnnnnnn {#1} {#5} {#6} }
           {#4}
       }
       {#2} {#3}
   }
-\cs_new:Npn \@@_point_interpolate_arc_auxi:nnnnnnnnn #1#2#3#4#5#6#7#8#9
+\cs_new:Npn \@@_point_interpolate_curve_auxi:nnnnnnnnn #1#2#3#4#5#6#7#8#9
   {
-    \@@_point_interpolate_arc_auxii:fnnnnnnnn
+    \@@_point_interpolate_curve_auxii:fnnnnnnnn
       { \fp_eval:n {#1} } {#2} {#3} {#6} {#7} {#8} {#9} {#4} {#5}
   }
 %    \end{macrocode}
@@ -578,27 +578,27 @@
 %   We are now in a position to find the target angle, and from that
 %   the sine and cosine required.
 %    \begin{macrocode}
-\cs_new:Npn \@@_point_interpolate_arc_auxii:nnnnnnnnn #1#2#3#4#5#6#7#8#9
+\cs_new:Npn \@@_point_interpolate_curve_auxii:nnnnnnnnn #1#2#3#4#5#6#7#8#9
   {
-    \@@_point_interpolate_arc_auxiii:fnnnnnn
+    \@@_point_interpolate_curve_auxiii:fnnnnnn
       { \fp_eval:n { #1 * (#3) + ( 1 - #1 ) * (#2) } }
       {#4} {#5} {#6} {#7} {#8} {#9}
   }
-\cs_generate_variant:Nn \@@_point_interpolate_arc_auxii:nnnnnnnnn { f }
-\cs_new:Npn \@@_point_interpolate_arc_auxiii:nnnnnnn #1#2#3#4#5#6#7
+\cs_generate_variant:Nn \@@_point_interpolate_curve_auxii:nnnnnnnnn { f }
+\cs_new:Npn \@@_point_interpolate_curve_auxiii:nnnnnnn #1#2#3#4#5#6#7
   {
-    \@@_point_interpolate_arc_auxiv:ffnnnnnn
+    \@@_point_interpolate_curve_auxiv:ffnnnnnn
       { \fp_eval:n { cosd (#1) } }
       { \fp_eval:n { sind (#1) } }
       {#2} {#3} {#4} {#5} {#6} {#7}
   }
-\cs_generate_variant:Nn \@@_point_interpolate_arc_auxiii:nnnnnnn { f }
-\cs_new:Npn \@@_point_interpolate_arc_auxiv:nnnnnnnn #1#2#3#4#5#6#7#8
+\cs_generate_variant:Nn \@@_point_interpolate_curve_auxiii:nnnnnnn { f }
+\cs_new:Npn \@@_point_interpolate_curve_auxiv:nnnnnnnn #1#2#3#4#5#6#7#8
   {
     \@@_point_to_dim:n
       { #3 + #1 * #5 + #2 * #7 , #4 + #1 * #6 + #2 * #8 }
   }
-\cs_generate_variant:Nn \@@_point_interpolate_arc_auxiv:nnnnnnnn { ff }
+\cs_generate_variant:Nn \@@_point_interpolate_curve_auxiv:nnnnnnnn { ff }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
diff --git a/l3trial/l3draw/l3draw.dtx b/l3trial/l3draw/l3draw.dtx
index 06ab52f..634ec45 100644
--- a/l3trial/l3draw/l3draw.dtx
+++ b/l3trial/l3draw/l3draw.dtx
@@ -52,16 +52,44 @@
 %
 % \section{\pkg{l3draw} documentation}
 %
+% The \pkg{l3draw} package provides a set of tools for creating (vector)
+% drawings in \pkg{expl3}. It is heavily inspired by the \pkg{pgf} layer of
+% the Ti\textit{k}Z system, with many of the interfaces having the same form.
+% However, the code provided here is build entirely on core \pkg{expl3} ideas
+% and uses the \LaTeX3 FPU for numerical support.
+%
+% Numerical expressions in \pkg{l3draw} are handled as floating point
+% expressions, unless otherwise noted. This means that they may contain or
+% omit explicit units. Where units are omitted, they will automatically be
+% taken as given in (\TeX{}) points.
+%
+% The code here is \emph{highly} experimental.
+%
+% \subsection{Drawings}
+%
 % \begin{function}{\draw_begin:, \draw_end:}
 %   \begin{syntax}
 %     \cs{draw_begin:}
 %     ...
 %     \cs{draw_end:}
 %   \end{syntax}
+%   Each drawing should be created within a \cs{draw_begin:}/\cs{draw_end:}
+%   function pair. The \texttt{begin} function sets up a number of key
+%   data structures for the rest of the functions here: unless otherwise
+%   specified, use of |\draw_...| functions outside of this
+%   \enquote{environment} is \emph{not supported}.
+%
+%   The drawing created within the environment will be inserted into
+%   the typesetting stream by the \cs{draw_end:} function, which will
+%   switch out of vertical mode if required.
 % \end{function}
 %
 % \subsection{Graphics state}
 %
+% Within the drawing environment, a number of functions control how drawings
+% will appear. Note that these all apply \emph{globally}, though some are
+% rest at the start of each drawing (\cs{draw_begin:}).
+%
 % \begin{function}{\g_draw_linewidth_default_dim}
 %   The default value of the linewidth for stokes, set at the start
 %   of every drawing (\cs{draw_begin:}).
@@ -69,9 +97,10 @@
 %
 % \begin{function}{\draw_linewidth:n, \draw_inner_linewidth:n}
 %   \begin{syntax}
-%     \cs{draw_linewidth:n} \Arg{fp expr}
+%     \cs{draw_linewidth:n} \Arg{width}
 %   \end{syntax}
-%   Sets the width to be used for stroking to \meta{fp expr} in \texttt{pt}.
+%   Sets the width to be used for stroking to the \meta{width} (an 
+%   \meta{fp expr}).
 % \end{function}
 %
 % \begin{function}{\draw_nonzero_rule:, \draw_evenodd_rule:}
@@ -111,56 +140,118 @@
 %
 % \begin{function}{\draw_miterlimit:n}
 %   \begin{syntax}
-%     \cs{draw_miterlimit:n} \Arg{fp expr}
+%     \cs{draw_miterlimit:n} \Arg{limit}
 %   \end{syntax}
-%   Sets the miter limit of lines joined as a miter, as described in the
-%   PDF and PostScript manuals.
+%   Sets the miter \meta{limit} of lines joined as a miter, as described in the
+%   PDF and PostScript manuals. The \meta{limit} is an \meta{fp expr}.
 % \end{function}
 %
 % \subsection{Points}
 %
+% Functions supporting the calculation of points (co-ordinates) are expandable
+% 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:nn { 1 } { 2 } }
+%   \tl_show:N \l_tmpa_tl
+% \end{verbatim}
+% gives
+% \begin{verbatim}
+%   > \l_tmpa_tl=1pt,2pt.
+%   <recently read> }
+% \end{verbatim}
+%
+% 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. 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.
+%
+% Notice that in contrast to \pkg{pgf} it is possible to give the positions
+% of points \emph{directly}.
+%
 % \begin{function}[EXP]{\draw_point:nn}
 %   \begin{syntax}
 %     \cs{draw_point:nn} \Arg{x} \Arg{y}
 %   \end{syntax}
+%   Gives the co-ordinates of the point at \meta{x} and \meta{y}, both of
+%   which are \meta{fp expr}.
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_polar:nn, \draw_point_polar:nnn}
 %   \begin{syntax}
-%     \cs{draw_point_polar:nn} \Arg{angle} \Arg{length}
-%     \cs{draw_point_polar:nnn} \Arg{angle} \Arg{length-a} \Arg{length-b}
+%     \cs{draw_point_polar:nn} \Arg{angle} \Arg{radius}
+%     \cs{draw_point_polar:nnn} \Arg{angle} \Arg{radius-a} \Arg{radius-b}
 %   \end{syntax}
-%   % Note interface
+%   Gives the co-ordinates of the point at \meta{angle} (an \meta{fp expr} in
+%   \emph{degrees}) and \meta{radius}. The three-argument version accepts
+%   two radii of different lengths.
+%   
+%   Note the interface here is somewhat different from that in \pkg{pgf}:
+%   the one- and two-radii versions in \pkg{l3draw} use separate functions,
+%   whilst in \pkg{pgf} they use the same function and a keyword.
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_add:nn}
 %   \begin{syntax}
-%     \cs{draw_point_add:nn} \Arg{point expr1} \Arg{point expr2}
+%     \cs{draw_point_add:nn} \Arg{point1} \Arg{point2}
 %   \end{syntax}
+%   Adds \meta{point1} to \meta{point2}.
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_diff:nn}
 %   \begin{syntax}
-%     \cs{draw_point_diff:nn} \Arg{point expr1} \Arg{point expr2}
+%     \cs{draw_point_diff:nn} \Arg{point1} \Arg{point2}
 %   \end{syntax}
+%   Subtracts \meta{point1} from \meta{point2}.
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_scale:nn}
 %   \begin{syntax}
-%     \cs{draw_point_scale:nn} \Arg{scale} \Arg{point expr}
+%     \cs{draw_point_scale:nn} \Arg{scale} \Arg{point}
 %   \end{syntax}
+%   Scales the \meta{point} by the \meta{scale} (an \meta{fp expr}).
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_unit_vector:n}
 %   \begin{syntax}
-%     \cs{draw_point_unit_vector:n} \Arg{point expr}
+%     \cs{draw_point_unit_vector:n} \Arg{point}
+%   \end{syntax}
+%   Expands to the co-ordinates of a unit vector joining the \meta{point}
+%   with the origin.
+% \end{function}
+%
+% \begin{function}[EXP]{\draw_point_transform:n}
+%   \begin{syntax}
+%     \cs{draw_point_transform:n} \Arg{point}
 %   \end{syntax}
+%   Evaluates the position of the \meta{point} subject to the current
+%   transformation matrix.
 % \end{function}
 %
+% \subsection{Points on a vector basis}
+%
+% As well as giving explicit values, it is possible to describe points
+% in terms of underlying direction vectors. The latter are initially
+% co-incident with the standard Cartesian axes, but may be altered by
+% the user.
+%
 % \begin{function}{\draw_xvec_set:n, \draw_yvec_set:n, \draw_zvec_set:n}
 %   \begin{syntax}
-%     \cs{draw_xvec_set:n} \Arg{point expr}
+%     \cs{draw_xvec_set:n} \Arg{point}
 %   \end{syntax}
+%   Defines the appropriate base vector to point toward the \meta{point}
+%   on the canvas. The standard settings for the $x$- and $y$-vectors are
+%   $1\,\mathrm{cm}$ along the relevant canvas axis, whilst for the
+%   $z$-vector an appropriate direction is taken.
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_vec:nn, \draw_point_vec:nnn}
@@ -168,20 +259,36 @@
 %     \cs{draw_point_vec:nn} \Arg{xscale} \Arg{yscale}
 %     \cs{draw_point_vec:nnn} \Arg{xscale} \Arg{yscale} \Arg{zscale}
 %   \end{syntax}
+%   Expands to the co-ordinate of the point at \meta{xscale} times the
+%   $x$-vector and \meta{yscale} times the $y$-vector. The three-argument
+%   version extends this to include the $z$-vector.
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_vec_polar:nn, \draw_point_vec_polar:nnn}
 %   \begin{syntax}
-%     \cs{draw_point_vec_polar:nn} \Arg{angle} \Arg{length}
-%     \cs{draw_point_vec_polar:nnn} \Arg{angle} \Arg{length-a} \Arg{length-b}
+%     \cs{draw_point_vec_polar:nn} \Arg{angle} \Arg{radius}
+%     \cs{draw_point_vec_polar:nnn} \Arg{angle} \Arg{radius-a} \Arg{radius-b}
 %   \end{syntax}
-%   % Note syntax
+%   Gives the co-ordinates of the point at \meta{angle} (an \meta{fp expr} in
+%   \emph{degrees}) and \meta{radius}, relative to the prevailing
+%   $x$- and $y$-vectors. The three-argument version accepts two radii of
+%   different lengths.
+%   
+%   Note the interface here is somewhat different from that in \pkg{pgf}:
+%   the one- and two-radii versions in \pkg{l3draw} use separate functions,
+%   whilst in \pkg{pgf} they use the same function and a keyword.
 % \end{function}
 %
+% \subsection{Intersection and interpolation}
+%
 % \begin{function}[EXP]{\draw_point_intersect_lines:nnnn}
 %   \begin{syntax}
-%     \cs{draw_point_intersect_lines:nnnn} \Arg{P1} \Arg{P2} \Arg{P3} \Arg{P4}
+%     \cs{draw_point_intersect_lines:nnnn} \Arg{point1} \Arg{point2} \Arg{point3} \Arg{point4}
 %   \end{syntax}
+%   Evaluates the point at the intersection of one line, joining
+%   \meta{point1} and \meta{point2}, and a second line joining \meta{point3}
+%   and \meta{point4}. If the lines do not intersect, or are coincident, and
+%   error will occur.
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_intersect_circles:nnnn}
@@ -189,90 +296,129 @@
 %     \cs{draw_point_intersect_circles:nnnnn}
 %       \Arg{center1} \Arg{radius1} \Arg{center2} \Arg{radius2} \Arg{root}
 %   \end{syntax}
-%   % Note interface, cf. pgf
+%   Evaluates the point at the intersection of one circle with
+%   \meta{center1} and \meta{radius1}, and a second circle with \meta{center2}
+%   and \meta{radius2}. If the circles do not intersect, or are coincident, and
+%   error will occur.
+%
+%   Note the interface here has a different argument ordering from that in
+%   \pkg{pgf}, which has the two centers then the two radii.
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_interpolate_line:nnn}
 %   \begin{syntax}
-%     \cs{draw_point_interpolate_line:nnn} \Arg{part} \Arg{point expr1} \Arg{point expr2}
+%     \cs{draw_point_interpolate_line:nnn} \Arg{part} \Arg{point1} \Arg{point2}
 %   \end{syntax}
+%   Expands to the point which is \meta{part} way along the line joining
+%   \meta{point1} and \meta{point2}. The \meta{part} may be an interpolation or
+%   an extrapolation, and is a floating point value expressing a percentage
+%   along the line, \emph{e.g.}~a value of \texttt{0.5} would be half-way
+%   between the two points.
 % \end{function}
 %
 % \begin{function}[EXP]{\draw_point_interpolate_distance:nnn}
 %   \begin{syntax}
 %     \cs{draw_point_interpolate_distance:nnn} \Arg{distance} \Arg{point expr1} \Arg{point expr2}
 %   \end{syntax}
+%   Expands to the point which is \meta{distance} way along the line joining
+%   \meta{point1} and \meta{point2}. The \meta{distance} may be an interpolation
+%   or an extrapolation.
 % \end{function}
 %
-% \begin{function}[EXP]{\draw_point_interpolate_arc:nnn}
+% \begin{function}[EXP]{\draw_point_interpolate_curve:nnnnnn}
 %   \begin{syntax}
-%     \cs{draw_point_interpolate_line:nnn} \Arg{part}
-%       \Arg{center} \Arg{minor axis} \Arg{major axis} \Arg{angle1} \Arg{angle2}
-%   \end{syntax}
-% \end{function}
-%
-% \begin{function}[EXP]{\draw_point_transform:n}
-%   \begin{syntax}
-%     \cs{draw_point_transform:n} \Arg{point expr}
+%     \cs{draw_point_interpolate_curve:nnnnnn} \Arg{part}
+%       \Arg{start} \Arg{control1} \Arg{control2} \Arg{end}
 %   \end{syntax}
+%   Expands to the point which is \meta{part} way along the curve between
+%   \meta{start} and \meta{end} and defined by \meta{control1} and
+%   \meta{control2}. The \meta{part} may be an interpolation or
+%   an extrapolation, and is a floating point value expressing a percentage
+%   along the curve, \emph{e.g.}~a value of \texttt{0.5} would be half-way
+%   along the curve.
 % \end{function}
 %
 % \subsection{Paths}
 %
+% Paths are constructed by combining one or more operations before applying
+% one or more actions. Thus until a path is \enquote{used}, it may be
+% manipulated or indeed discarded entirely. Only one path is active at
+% any one time, and the path is \emph{not} affected by \TeX{} grouping.
+%
 % \begin{function}{\draw_path_corner_arc:n}
 %   \begin{syntax}
-%     \cs{draw_path_corner_arc:n} \Arg{point expr}
+%     \cs{draw_path_corner_arc:n} \Arg{length}
 %   \end{syntax}
+%   Sets the degree of rounding applied to corners in a path: if the
+%   \meta{length} is \texttt{0pt} then no rounding applies. The value of the
+%   \meta{length} is local to the current \TeX{} group.
 % \end{function}
 %
 % \begin{function}{\draw_path_moveto:n}
 %   \begin{syntax}
-%     \cs{draw_path_moveto:n} \Arg{point expr}
+%     \cs{draw_path_moveto:n} \Arg{point}
 %   \end{syntax}
+%   Moves the reference point of the path to the \meta{point}, but will
+%   not join this to any previous point.
 % \end{function}
 %
 % \begin{function}{\draw_path_lineto:n}
 %   \begin{syntax}
-%     \cs{draw_path_lineto:n} \Arg{point expr}
+%     \cs{draw_path_lineto:n} \Arg{point}
 %   \end{syntax}
+%   Joins the current path to the \meta{point} with a straight line.
 % \end{function}
 %
 % \begin{function}{\draw_path_curveto:nnn}
 %   \begin{syntax}
-%     \cs{draw_path_curveto:nnn} \Arg{point expr1} \Arg{point expr2} \Arg{point expr3}
+%     \cs{draw_path_curveto:nnn} \Arg{control1} \Arg{control2} \Arg{end}
 %   \end{syntax}
+%   Joins the current path to the \meta{end} with a curved line defined by
+%   cubic Bézier points \meta{control1} and \meta{control2}.
 % \end{function}
 %
 % \begin{function}{\draw_path_curveto:nn}
 %   \begin{syntax}
-%     \cs{draw_path_curveto:nn} \Arg{point expr1} \Arg{point expr2}
+%     \cs{draw_path_curveto:nn} \Arg{control} \Arg{end}
 %   \end{syntax}
+%   Joins the current path to the \meta{end} with a curved line defined by
+%   quadratic Bézier point \meta{control}.
 % \end{function}
 %
 % \begin{function}{\draw_path_arc:nnn, \draw_path_arc:nnnn}
 %   \begin{syntax}
-%     \cs{draw_path_arc:nnn} \Arg{angle1} \Arg{angle2} 
-%     \cs{draw_path_arc:nnnn} \Arg{angle1} \Arg{angle2}  \Arg{length-a} \Arg{length-b}
+%     \cs{draw_path_arc:nnn} \Arg{angle1} \Arg{angle2} \Arg{radius}
+%     \cs{draw_path_arc:nnnn} \Arg{angle1} \Arg{angle2} \Arg{radius-a} \Arg{radius-b}
 %   \end{syntax}
-%   % Note interface
+%   Joins the current path with an arc between \meta{angle1} and \meta{angle2}
+%   and of \meta{radius}. The four-argument version accepts two radii of
+%   different lengths.
+%
+%   Note the interface here has a different argument ordering from that in
+%   \pkg{pgf}, which has the two centers then the two radii.
 % \end{function}
 %
 % \begin{function}{\draw_path_arc_axes:nnnn}
 %   \begin{syntax}
-%     \cs{draw_path_arc_axes:nnn} \Arg{angle1} \Arg{angle2} \Arg{point expr1} \Arg{point expr2}
+%     \cs{draw_path_arc_axes:nnn} \Arg{angle1} \Arg{angle2} \Arg{vector1} \Arg{vector2}
 %   \end{syntax}
+%   Appends the portion of an ellipse from \meta{angle1} to \meta{angle2} of an
+%   ellipse with axes along \meta{vector1} and \meta{vector2} to the current path. 
 % \end{function}
 %
 % \begin{function}{\draw_path_ellipse:nnnn}
 %   \begin{syntax}
-%     \cs{draw_path_ellipse:nnn} \Arg{center} \Arg{axes1} \Arg{axis2}
+%     \cs{draw_path_ellipse:nnn} \Arg{center} \Arg{vector1} \Arg{vector2}
 %   \end{syntax}
+%   Appends an ellipse at \meta{center} with axes along \meta{vector1} and
+%   \meta{vector2} to the current path. 
 % \end{function}
 %
 % \begin{function}{\draw_path_circle:nn}
 %   \begin{syntax}
 %     \cs{draw_path_circle:nn} \Arg{center} \Arg{radius}
 %   \end{syntax}
+%   Appends a circle of \meta{radius} at \meta{center} to the current path. 
 % \end{function}
 %
 % \begin{function}{\draw_path_rectangle:nn, \draw_path_rectangle_corners:nn}
@@ -280,33 +426,54 @@
 %     \cs{draw_path_rectangle:nn} \Arg{lower-left} \Arg{displacement}
 %     \cs{draw_path_rectangle_corners:nn} \Arg{lower-left} \Arg{top-right}
 %   \end{syntax}
+%   Appends a rectangle starting at \meta{lower-left} to the current path,
+%   with the size of the rectangle determined either by a \meta{displacement}
+%   or the position of the \meta{top-right}.
 % \end{function}
 %
 % \begin{function}{\draw_path_grid:nnnn}
 %   \begin{syntax}
 %     \cs{draw_path_grid:nnnn} \Arg{xspace} \Arg{yspace} \Arg{lower-left} \Arg{upper-right}
 %   \end{syntax}
-%   % Note interface
+%   Constructs a grid of \meta{xspace} and \meta{yspace} from the
+%   \meta{lower-left} to the \meta{upper-right}, and appends this to the
+%   current path.
 % \end{function}
 %
 % \begin{function}{\draw_path_close:}
 %   \begin{syntax}
 %     \cs{draw_path_close:}
 %   \end{syntax}
+%   Closes the current part of the path by appending a straight line from
+%   the current point to the starting point of the path.
 % \end{function}
 %
 % \begin{function}{\draw_path_use:n, \draw_path_use_clear:n}
 %   \begin{syntax}
 %     \cs{draw_path_use:n} \Arg{action(s)}
 %   \end{syntax}
+%   Inserts the current path, carrying out one ore more possible \meta{actions}
+%   (a comma list):
+%   \begin{itemize}
+%     \item \texttt{clear} Resets the path to empty
+%     \item \texttt{clip} Clips any content outside of the path
+%     \item \texttt{draw}
+%     \item \texttt{fill} Fills the interior of the path with the current
+%       file color
+%     \item \texttt{stroke} Draws a line along the current path
+%   \end{itemize}
 % \end{function}
 %
 % \subsection{Transformations}
 %
+% Points are normally used unchanged relative to the canvas axes. This can
+% be modified by applying a transformation matrix.
+%
 % \begin{function}{\draw_transform_reset:}
 %   \begin{syntax}
 %     \cs{draw_transform_reset:}
 %   \end{syntax}
+%   Resets the matrix to the identity.
 % \end{function}
 %
 % \begin{function}{\draw_transform_concat:nnnnn}
@@ -314,6 +481,7 @@
 %     \cs{draw_transform_concat:nnnnn}
 %       \Arg{a} \Arg{b} \Arg{c} \Arg{d} \Arg{coord expr}
 %   \end{syntax}
+%   Appends the given matrix to the currently-active one.
 % \end{function}
 %
 % \begin{function}{\draw_transform:nnnnn}
@@ -321,6 +489,7 @@
 %     \cs{draw_transform:nnnnn}
 %       \Arg{a} \Arg{b} \Arg{c} \Arg{d} \Arg{coord expr}
 %   \end{syntax}
+%   Applies the transformation matrix specified.
 % \end{function}
 %
 % \begin{function}{\draw_transform_triangle:nnn}
@@ -334,6 +503,7 @@
 %   \begin{syntax}
 %     \cs{draw_transform_invert:}
 %   \end{syntax}
+%   Inverts the current transformation matrix.
 % \end{function}
 %
 % \end{documentation}
diff --git a/l3trial/l3draw/testfiles/m3draw001.lvt b/l3trial/l3draw/testfiles/m3draw001.lvt
index e8da443..0e4a8b6 100644
--- a/l3trial/l3draw/testfiles/m3draw001.lvt
+++ b/l3trial/l3draw/testfiles/m3draw001.lvt
@@ -119,9 +119,9 @@
       { \draw_point_vec:nn { 0 } { 1 } }
   }
 
-\TESTEXP { \draw_point_interpolate_arc:nnnnnn }
+\TESTEXP { \draw_point_interpolate_curve:nnnnnn }
   {
-    \draw_point_interpolate_arc:nnnnnn
+    \draw_point_interpolate_curve:nnnnnn
       { 0.25 }
       { 1cm , 1cm }
       { 1cm , 0cm }





More information about the latex3-commits mailing list