[latex3-commits] [git/LaTeX3-latex3-latex3] master: l3draw: Core arc support (7777299)

Joseph Wright joseph.wright at morningstar2.co.uk
Sat Feb 17 15:35:48 CET 2018


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

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

commit 77772990ff85fdedf732096d6116b566f484f057
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sat Feb 17 14:28:05 2018 +0000

    l3draw: Core arc support
    
    Somewhat involved, and perhaps to-be optimised,
    but giving results matching pgf.


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

77772990ff85fdedf732096d6116b566f484f057
 l3trial/l3draw/l3draw-paths.dtx              |  224 +++++++++++++++++++++++++-
 l3trial/l3draw/testfiles/m3draw003.lvt       |   49 ++++++
 l3trial/l3draw/testfiles/m3draw003.ptex.tlg  |  133 +++++++++++++++
 l3trial/l3draw/testfiles/m3draw003.tlg       |  133 +++++++++++++++
 l3trial/l3draw/testfiles/m3draw003.uptex.tlg |  133 +++++++++++++++
 l3trial/l3draw/testfiles/m3draw003.xetex.tlg |  133 +++++++++++++++
 6 files changed, 802 insertions(+), 3 deletions(-)

diff --git a/l3trial/l3draw/l3draw-paths.dtx b/l3trial/l3draw/l3draw-paths.dtx
index 7a33c3d..e302302 100644
--- a/l3trial/l3draw/l3draw-paths.dtx
+++ b/l3trial/l3draw/l3draw-paths.dtx
@@ -58,9 +58,11 @@
 %<@@=draw>
 %    \end{macrocode}
 %
-% \begin{variable}{\l_@@_path_tmp_fp, \l_@@_path_tmp_fp}
+% \begin{variable}
+%   {\l_@@_path_tmp_tl, \l_@@_path_xtmp_fp, \l_@@_path_ytmp_fp}
 %   Scratch space.
 %    \begin{macrocode}
+\tl_new:N \l_@@_path_tmp_tl
 \fp_new:N \l_@@_path_xtmp_fp
 \fp_new:N \l_@@_path_ytmp_fp
 %    \end{macrocode}
@@ -241,7 +243,10 @@
     \@@_point_process:nnn
       {
         \@@_point_process:nn
-          { \@@_path_curveto:nnnnnn }
+          {
+            \@@_path_mark_corner:
+            \@@_path_curveto:nnnnnn
+          }
           { \draw_point_transform:n {#1} }
       }
       { \draw_point_transform:n {#2} }
@@ -249,7 +254,6 @@
   }
 \cs_new_protected:Npn \@@_path_curveto:nnnnnn #1#2#3#4#5#6
   {
-     \@@_path_mark_corner:
      \@@_path_update_limits:nn {#1} {#2}
      \@@_path_update_limits:nn {#3} {#4}
      \@@_path_update_limits:nn {#5} {#6}
@@ -310,6 +314,7 @@
     \fp_set:Nn \l_@@_path_ytmp_fp { \c_@@_path_curveto_b_fp * #2 }
     \use:x
       {
+         \@@_path_mark_corner:
          \@@_path_curveto:nnnnnn
            {
              \fp_to_dim:n
@@ -343,6 +348,219 @@
 % \end{variable}
 % \end{macro}
 % \end{macro}
+%
+% \begin{macro}{\draw_path_arc:nnn}
+% \begin{macro}{\@@_path_arc:nnnn}
+% \begin{macro}{\@@_path_arc:nnNnn}
+% \begin{macro}
+%   {
+%     \@@_path_arc_auxi:nnnnNnn,
+%     \@@_path_arc_auxi:fnnnNnn,
+%     \@@_path_arc_auxi:fnfnNnn
+%   }
+% \begin{macro}{\@@_path_arc_auxii:nnnNnnnn}
+% \begin{macro}{\@@_path_arc_auxiii:nn}
+% \begin{macro}{\@@_path_arc_auxiv:nnnn}
+% \begin{macro}{\@@_path_arc_auxv:nn, \@@_path_arc_auxvi:nn}
+% \begin{macro}{\@@_path_arc_add:nnnn}
+% \begin{variable}{\l_@@_path_arc_delta_fp, \l_@@_path_arc_start_fp}
+% \begin{variable}{\c_@@_path_arc_90_fp,\c_@@_path_arc_60_fp}
+%   Drawing an arc means dividing the total curve required into sections:
+%   using Bézier curves we can cover at most $90^{\circ}$ at once. To allow
+%   for later manipulations, we aim to have roughly equal last segments to
+%   the line, with the split set at a final part of $115^{\circ}$.
+%    \begin{macrocode}
+\cs_new_protected:Npn \draw_path_arc:nnn #1#2#3
+  { \@@_path_arc:nnw {#1} {#2} #3 ~ and ~ #3 ~ \q_stop }
+\cs_new_protected:Npn \@@_path_arc:nnw #1#2#3 ~ and ~ #4 ~ #5 \q_stop 
+  {
+    \use:x
+      {
+        \@@_path_arc:nnnn
+          { \fp_eval:n {#1} }
+          { \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
+  {
+    \fp_compare:nNnTF {#1} > {#2}
+      { \@@_path_arc:nnNnn {#1} {#2} - {#3} {#4} }
+      { \@@_path_arc:nnNnn {#1} {#2} + {#3} {#4} }
+  }
+\cs_new_protected:Npn \@@_path_arc:nnNnn #1#2#3#4#5
+  {
+    \fp_set:Nn \l_@@_path_arc_start_fp {#1}
+    \fp_set:Nn \l_@@_path_arc_delta_fp { abs( #1 - #2 ) }
+    \fp_while_do:nNnn { \l_@@_path_arc_delta_fp } > { 90 }
+      {
+        \fp_compare:nNnTF \l_@@_path_arc_delta_fp > { 115 }
+          {
+            \@@_path_arc_auxi:ffnnNnn
+              { \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
+              { \fp_to_decimal:N \l_@@_path_arc_start_fp }
+              { \fp_eval:n { \l_@@_path_arc_start_fp #3 60 } }
+              { 60 } {#2}
+              #3 {#4} {#5}
+          }
+      }
+    \@@_path_mark_corner:
+    \@@_path_arc_auxi:fnfnNnn
+      { \fp_to_decimal:N \l_@@_path_arc_start_fp }
+      {#2}
+      { \fp_eval:n { abs( \l_@@_path_arc_start_fp - #2 ) } }
+      {#2}
+      #3 {#4} {#5}
+  }
+%    \end{macrocode}
+%  The auxiliary is responsible for calculating the required points.
+%  The \enquote{magic} number required to determine the length of the
+%  control vectors is well-established for a right-angle:
+%  $\frac{4}{3}(\sqrt{2} - 1) = 0.552\,284\,75$. For other cases, we follow
+%  the calculation used by \pkg{pgf} but with the second common case of
+%  $60^{\circ}$ pre-calculated for speed.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_path_arc_auxi:nnnnNnn #1#2#3#4#5#6#7
+  {
+    \use:x
+      {
+        \@@_path_arc_auxii:nnnNnnnn
+          {#1} {#2} {#4} #5 {#6} {#7}
+          {
+            \fp_to_dim:n
+              {
+                \cs_if_exist_use:cF
+                  { c_@@_path_arc_ #3 _fp }
+                  { 4/3 * tand( 0.25 * #3 ) }
+                  * #6
+              }
+          }
+          {
+            \fp_to_dim:n
+              {
+                \cs_if_exist_use:cF
+                  { c_@@_path_arc_ #3 _fp }
+                  { 4/3 * tand( 0.25 * #3 ) }
+                  * #7
+              }
+          }
+      }
+  }
+\cs_generate_variant:Nn \@@_path_arc_auxi:nnnnNnn { fnf , ff }
+%    \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
+%   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
+%   operation and update the record of where we are up to. The final
+%   point has to be
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_path_arc_auxii:nnnNnnnn #1#2#3#4#5#6#7#8
+  {
+    \tl_clear:N \l_@@_path_tmp_tl
+    \@@_point_process:nn
+      { \@@_path_arc_auxiii:nn }
+      {
+        \draw_point_transform:n
+          { \draw_point_polar:nn { #1 #4 90 } { #7 ~and~ #8 } }
+      }
+    \@@_point_process:nn
+      {
+        \@@_point_process:nn
+          { \@@_path_arc_auxiv:nnnn }
+          {
+            \draw_point_transform:n
+              { \draw_point_polar:nn {#1} { #5 ~and~ #6 } }
+          }
+      }
+      {
+        \draw_point_transform:n
+          { \draw_point_polar:nn {#2} { #5 ~and~ #6 } }
+      }
+    \@@_point_process:nn
+      { \@@_path_arc_auxv:nn }
+      {
+        \draw_point_transform:n
+          { \draw_point_polar:nn { #2 #4 -90 } { #7 ~and~ #8 } }
+      }
+    \exp_after:wN \@@_path_curveto:nnnnnn \l_@@_path_tmp_tl
+    \fp_set:Nn \l_@@_path_arc_delta_fp { abs ( #2 - #3 ) }
+    \fp_set:Nn \l_@@_path_arc_start_fp {#2}
+  }
+%    \end{macrocode}
+%   The first control point: we have to undo any transformation shift
+%   here.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_path_arc_auxiii:nn #1#2
+  {
+    \@@_path_arc_aux_add:nn
+      {
+          \g_@@_path_lastx_dim
+        - \l_@@_transformcm_xshift_dim
+        + #1
+      }
+      {
+          \g_@@_path_lasty_dim
+        - \l_@@_transformcm_yshift_dim
+        + #2
+      }
+  }
+%    \end{macrocode}
+%   The end point: simple arithmetic.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_path_arc_auxiv:nnnn #1#2#3#4
+  {
+    \@@_path_arc_aux_add:nn
+      { \g_@@_path_lastx_dim - #1 + #3 }
+      { \g_@@_path_lasty_dim - #2 + #4 }
+  }
+%    \end{macrocode}
+%   The second control point: extract the last point, do some
+%   rearrangement and record.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_path_arc_auxv:nn #1#2
+  {
+    \exp_after:wN \@@_path_arc_auxvi:nn
+      \l_@@_path_tmp_tl {#1} {#2}
+  }
+\cs_new_protected:Npn \@@_path_arc_auxvi:nn #1#2#3#4#5#6
+  {
+    \tl_set:Nn \l_@@_path_tmp_tl { {#1} {#2} }
+    \@@_path_arc_aux_add:nn
+      { #5 + #3 - \l_@@_transformcm_xshift_dim }
+      { #6 + #4 - \l_@@_transformcm_yshift_dim }
+    \tl_put_right:Nn \l_@@_path_tmp_tl { {#3} {#4} }
+  }
+\cs_new_protected:Npn \@@_path_arc_aux_add:nn #1#2
+  {
+    \tl_put_right:Nx \l_@@_path_tmp_tl
+      { { \fp_to_dim:n {#1} } { \fp_to_dim:n {#2} } }
+  }
+\fp_new:N \l_@@_path_arc_delta_fp
+\fp_new:N \l_@@_path_arc_start_fp
+\fp_const:cn { c_@@_path_arc_90_fp } { 4/3 * (sqrt(2) - 1) }
+\fp_const:cn { c_@@_path_arc_60_fp } { 4/3 * tand(15) }
+%    \end{macrocode}
+% \end{variable}
+% \end{variable}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
 %    \begin{macrocode}
 %</initex|package>
 %    \end{macrocode}
diff --git a/l3trial/l3draw/testfiles/m3draw003.lvt b/l3trial/l3draw/testfiles/m3draw003.lvt
index 927eac1..178db17 100644
--- a/l3trial/l3draw/testfiles/m3draw003.lvt
+++ b/l3trial/l3draw/testfiles/m3draw003.lvt
@@ -74,4 +74,53 @@
       }
   }
 
+\TEST { \draw_path_arc:nnn }
+  {
+    \test:n
+      {
+        \draw_path_moveto:n { 0 , 0 }
+        \draw_path_arc:nnn { 0 } { 90 } { 2cm }
+      }
+    \test:n
+      {
+        \draw_path_moveto:n { 0 , 0 }
+        \draw_path_arc:nnn { 0 } { 180 } { 2cm }
+      }
+    \test:n
+      {
+        \draw_path_moveto:n { 0 , 0 }
+        \draw_path_arc:nnn { 0 } { 220 } { 2cm }
+      }
+    \test:n
+      {
+        \draw_path_moveto:n { 0 , 0 }
+        \draw_path_arc:nnn { 0 } { 360 } { 2cm }
+      }
+    \test:n
+      {
+        \draw_path_moveto:n { 0 , 0 }
+        \draw_path_arc:nnn { 0 } { -90 } { 2cm }
+      }
+    \test:n
+      {
+        \draw_path_moveto:n { 0 , 0 }
+        \draw_path_arc:nnn { 0 } { -180 } { 2cm }
+      }
+    \test:n
+      {
+        \draw_path_moveto:n { 0 , 0 }
+        \draw_path_arc:nnn { 0 } { -270 } { 2cm }
+      }
+    \test:n
+      {
+        \draw_path_moveto:n { 0 , 0 }
+        \draw_path_arc:nnn { 0 } { -360 } { 2cm }
+      }
+    \test:n
+      {
+        \draw_path_moveto:n { 0 , 0 }
+        \draw_path_arc:nnn { 0 } { 90 } { 1cm ~ and ~ 2cm }
+      }
+  }
+
 \END
diff --git a/l3trial/l3draw/testfiles/m3draw003.ptex.tlg b/l3trial/l3draw/testfiles/m3draw003.ptex.tlg
index 27ebdff..dc52be6 100644
--- a/l3trial/l3draw/testfiles/m3draw003.ptex.tlg
+++ b/l3trial/l3draw/testfiles/m3draw003.ptex.tlg
@@ -84,3 +84,136 @@ TEST 5: \draw_path_curveto:nnn
 <argument> \l_tmpa_box 
 l. ...  }
 ============================================================
+============================================================
+TEST 6: \draw_path_arc:nnn 
+============================================================
+> \box...=
+\hbox(56.90552+0.0)x56.90552
+.\hbox(56.90552+0.0)x56.90552
+..\glue 56.90552
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(56.90552+0.0)x113.81104
+.\hbox(56.90552+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal -88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(20.32736+0.0)x113.81104
+.\hbox(20.32736+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -36.57816
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal -88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 -13.32864 -108.6897 -26.23116 -100.12222 -36.4\ETC.}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal -88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 -31.31062 -88.00356 -56.69292 -56.69292 -56.69\ETC.}
+...\special{pdf:literal -25.3823 -56.69292 0 -31.31064 0 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x56.90552
+.\hbox(-56.90552+0.0)x56.90552
+..\glue 56.90552
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(-56.90552+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal -88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal -88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 31.31062 -88.00356 56.69292 -56.69292 56.69292\ETC.}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal -88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 31.31062 -88.00356 56.69292 -56.69292 56.69292\ETC.}
+...\special{pdf:literal -25.3823 56.69292 0 31.31064 0 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(56.90552+0.0)x28.45276
+.\hbox(56.90552+0.0)x28.45276
+..\glue 28.45276
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -12.69115 56.69292 -28.34647 56.69292 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+============================================================
diff --git a/l3trial/l3draw/testfiles/m3draw003.tlg b/l3trial/l3draw/testfiles/m3draw003.tlg
index bd8d210..d25181e 100644
--- a/l3trial/l3draw/testfiles/m3draw003.tlg
+++ b/l3trial/l3draw/testfiles/m3draw003.tlg
@@ -84,3 +84,136 @@ TEST 5: \draw_path_curveto:nnn
 <argument> \l_tmpa_box 
 l. ...  }
 ============================================================
+============================================================
+TEST 6: \draw_path_arc:nnn 
+============================================================
+> \box...=
+\hbox(56.90552+0.0)x56.90552
+.\hbox(56.90552+0.0)x56.90552
+..\glue 56.90552
+..\hbox(0.0+0.0)x0.0
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\pdfliteral{Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(56.90552+0.0)x113.81104
+.\hbox(56.90552+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\pdfliteral{-88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\pdfliteral{Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(20.32736+0.0)x113.81104
+.\hbox(20.32736+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -36.57816
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\pdfliteral{-88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\pdfliteral{-113.38583 -13.32864 -108.6897 -26.23116 -100.12222 -36.4415 c}
+...\pdfliteral{Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\pdfliteral{-88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\pdfliteral{-113.38583 -31.31062 -88.00356 -56.69292 -56.69292 -56.69292 c}
+...\pdfliteral{-25.3823 -56.69292 0 -31.31064 0 0 c}
+...\pdfliteral{Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x56.90552
+.\hbox(-56.90552+0.0)x56.90552
+..\glue 56.90552
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\pdfliteral{Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(-56.90552+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\pdfliteral{-88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\pdfliteral{Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\pdfliteral{-88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\pdfliteral{-113.38583 31.31062 -88.00356 56.69292 -56.69292 56.69292 c}
+...\pdfliteral{Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\pdfliteral{-88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\pdfliteral{-113.38583 31.31062 -88.00356 56.69292 -56.69292 56.69292 c}
+...\pdfliteral{-25.3823 56.69292 0 31.31064 0 0 c}
+...\pdfliteral{Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(56.90552+0.0)x28.45276
+.\hbox(56.90552+0.0)x28.45276
+..\glue 28.45276
+..\hbox(0.0+0.0)x0.0
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0 31.31062 -12.69115 56.69292 -28.34647 56.69292 c}
+...\pdfliteral{Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+============================================================
diff --git a/l3trial/l3draw/testfiles/m3draw003.uptex.tlg b/l3trial/l3draw/testfiles/m3draw003.uptex.tlg
index 27ebdff..dc52be6 100644
--- a/l3trial/l3draw/testfiles/m3draw003.uptex.tlg
+++ b/l3trial/l3draw/testfiles/m3draw003.uptex.tlg
@@ -84,3 +84,136 @@ TEST 5: \draw_path_curveto:nnn
 <argument> \l_tmpa_box 
 l. ...  }
 ============================================================
+============================================================
+TEST 6: \draw_path_arc:nnn 
+============================================================
+> \box...=
+\hbox(56.90552+0.0)x56.90552
+.\hbox(56.90552+0.0)x56.90552
+..\glue 56.90552
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(56.90552+0.0)x113.81104
+.\hbox(56.90552+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal -88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(20.32736+0.0)x113.81104
+.\hbox(20.32736+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -36.57816
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal -88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 -13.32864 -108.6897 -26.23116 -100.12222 -36.4\ETC.}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal -88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 -31.31062 -88.00356 -56.69292 -56.69292 -56.69\ETC.}
+...\special{pdf:literal -25.3823 -56.69292 0 -31.31064 0 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x56.90552
+.\hbox(-56.90552+0.0)x56.90552
+..\glue 56.90552
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(-56.90552+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal -88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal -88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 31.31062 -88.00356 56.69292 -56.69292 56.69292\ETC.}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal -88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 31.31062 -88.00356 56.69292 -56.69292 56.69292\ETC.}
+...\special{pdf:literal -25.3823 56.69292 0 31.31064 0 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(56.90552+0.0)x28.45276
+.\hbox(56.90552+0.0)x28.45276
+..\glue 28.45276
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -12.69115 56.69292 -28.34647 56.69292 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+============================================================
diff --git a/l3trial/l3draw/testfiles/m3draw003.xetex.tlg b/l3trial/l3draw/testfiles/m3draw003.xetex.tlg
index 27ebdff..dc52be6 100644
--- a/l3trial/l3draw/testfiles/m3draw003.xetex.tlg
+++ b/l3trial/l3draw/testfiles/m3draw003.xetex.tlg
@@ -84,3 +84,136 @@ TEST 5: \draw_path_curveto:nnn
 <argument> \l_tmpa_box 
 l. ...  }
 ============================================================
+============================================================
+TEST 6: \draw_path_arc:nnn 
+============================================================
+> \box...=
+\hbox(56.90552+0.0)x56.90552
+.\hbox(56.90552+0.0)x56.90552
+..\glue 56.90552
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(56.90552+0.0)x113.81104
+.\hbox(56.90552+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal -88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(20.32736+0.0)x113.81104
+.\hbox(20.32736+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -36.57816
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal -88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 -13.32864 -108.6897 -26.23116 -100.12222 -36.4\ETC.}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -25.38228 56.69292 -56.69292 56.69292 c}
+...\special{pdf:literal -88.00354 56.69292 -113.38583 31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 -31.31062 -88.00356 -56.69292 -56.69292 -56.69\ETC.}
+...\special{pdf:literal -25.3823 -56.69292 0 -31.31064 0 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x56.90552
+.\hbox(-56.90552+0.0)x56.90552
+..\glue 56.90552
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(-56.90552+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal -88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal -88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 31.31062 -88.00356 56.69292 -56.69292 56.69292\ETC.}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(0.0+0.0)x113.81104
+.\hbox(0.0+0.0)x113.81104
+..\glue 113.81104
+..\hbox(0.0+0.0)x0.0, shifted -56.90552
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 -31.31062 -25.38228 -56.69292 -56.69292 -56.69292 c}
+...\special{pdf:literal -88.00354 -56.69292 -113.38583 -31.31064 -113.38583 0 c}
+...\special{pdf:literal -113.38583 31.31062 -88.00356 56.69292 -56.69292 56.69292\ETC.}
+...\special{pdf:literal -25.3823 56.69292 0 31.31064 0 0 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+> \box...=
+\hbox(56.90552+0.0)x28.45276
+.\hbox(56.90552+0.0)x28.45276
+..\glue 28.45276
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0 31.31062 -12.69115 56.69292 -28.34647 56.69292 c}
+...\special{pdf:literal Q}
+! OK.
+<argument> \l_tmpa_box 
+l. ...  }
+============================================================





More information about the latex3-commits mailing list