Skip to content

Commit

Permalink
Faster dash pattern setting
Browse files Browse the repository at this point in the history
From Bruno.
  • Loading branch information
josephwright committed Mar 9, 2018
1 parent fec2fbd commit 36fe5db
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions l3experimental/l3draw/l3draw-state.dtx
Expand Up @@ -96,27 +96,24 @@
% \end{macro}
%
% \begin{macro}{\draw_dash_pattern:nn}
% \begin{variable}{\l_@@_tmp_clist}
% \begin{variable}{\l_@@_tmp_seq}
% Evaluated all of the list and pass it to the driver layer.
% \begin{macrocode}
\cs_new_protected:Npn \draw_dash_pattern:nn #1#2
{
\group_begin:
\clist_clear:N \l_@@_tmp_clist
\clist_map_inline:nn {#1}
{
\clist_put_right:Nx \l_@@_tmp_clist
{ \fp_to_dim:n {##1} }
}
\seq_set_from_clist:Nn \l_@@_tmp_seq {#1}
\seq_set_map:NNn \l_@@_tmp_seq \l_@@_tmp_seq
{ \fp_to_dim:n {##1} }
\use:x
{
\driver_draw_dash_pattern:nn
{ \clist_use:Nnnn \l_@@_tmp_clist { , } { , } { , } }
{ \seq_use:Nn \l_@@_tmp_seq { , } }
{ \fp_to_dim:n {#2} }
}
\group_end:
}
\clist_new:N \l_@@_tmp_clist
\seq_new:N \l_@@_tmp_seq
% \end{macrocode}
% \end{macro}
% \end{macro}
Expand Down

0 comments on commit 36fe5db

Please sign in to comment.