summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx44
1 files changed, 36 insertions, 8 deletions
diff --git a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx
index 4c6bade4569..7e02a505cd9 100644
--- a/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx
+++ b/Master/texmf-dist/source/latex/l3experimental/l3draw/l3draw-state.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2018/03/05}
+% \date{Released 2018-04-30}
%
% \maketitle
%
@@ -58,12 +58,20 @@
%<@@=draw>
% \end{macrocode}
%
-% \begin{variable}{\g_@@_linewidth_dim, \g_@@_inner_linewidth_dim}
+% This sub-module covers more-or-less the same ideas as
+% \texttt{pgfcoregraphicstate.code.tex}. At present, equivalents of the
+% following are currently absent:
+% \begin{itemize}
+% \item \cs{pgfsetinnerlinewidth}, \cs{pgfinnerlinewidth},
+% \cs{pgfsetinnerstrokecolor}, \cs{pgfsetinnerstrokecolor}: Likely to
+% be added on further work is done on paths/stroking.
+% \end{itemize}
+%
+% \begin{variable}{\g_@@_linewidth_dim}
% Linewidth for strokes: global as the scope for this relies on the graphics
% state. The inner line width is used for places where two lines are used.
% \begin{macrocode}
\dim_new:N \g_@@_linewidth_dim
-\dim_new:N \g_@@_inner_linewidth_dim
% \end{macrocode}
% \end{variable}
%
@@ -75,21 +83,41 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\draw_linewidth:n, \draw_inner_linewidth:n}
+% \begin{macro}{\draw_linewidth:n}
% Set the linewidth: we need a wrapper as this has to pass to the driver
-% layer. The inner version is handled at the macro layer but is given a
-% consistent interface here.
+% layer.
% \begin{macrocode}
\cs_new_protected:Npn \draw_linewidth:n #1
{
\dim_gset:Nn \g_@@_linewidth_dim { \fp_to_dim:n {#1} }
\driver_draw_linewidth:n \g_@@_linewidth_dim
}
-\cs_new_protected:Npn \draw_inner_linewidth:n #1
- { \dim_gset:Nn \g_@@_inner_linewidth_dim { \fp_to_dim:n {#1} } }
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\draw_dash_pattern:nn}
+% \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:
+ \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
+ { \seq_use:Nn \l_@@_tmp_seq { , } }
+ { \fp_to_dim:n {#2} }
+ }
+ \group_end:
+ }
+\seq_new:N \l_@@_tmp_seq
+% \end{macrocode}
+% \end{variable}
+% \end{macro}
+%
% \begin{macro}{\draw_miterlimit:n}
% Pass through to the driver layer.
% \begin{macrocode}