[latex3-commits] [git/LaTeX3-latex3-latex3] master: A 'std' scope is about state (4465e32)

Joseph Wright joseph.wright at morningstar2.co.uk
Tue Feb 27 08:10:04 CET 2018


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

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

commit 4465e3243d672b4252b7f273f74712e184b37604
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Feb 27 07:07:30 2018 +0000

    A 'std' scope is about state


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

4465e3243d672b4252b7f273f74712e184b37604
 l3experimental/l3draw/l3draw-scopes.dtx |   12 ++---
 l3experimental/l3draw/l3draw.dtx        |   74 +++++++++++++++----------------
 2 files changed, 40 insertions(+), 46 deletions(-)

diff --git a/l3experimental/l3draw/l3draw-scopes.dtx b/l3experimental/l3draw/l3draw-scopes.dtx
index 5b3cc1f..69abd63 100644
--- a/l3experimental/l3draw/l3draw-scopes.dtx
+++ b/l3experimental/l3draw/l3draw-scopes.dtx
@@ -177,11 +177,11 @@
 % \end{variable}
 % \end{variable}
 %
-% \begin{macro}{\draw_scope_begin:, \draw_scope_begin:}
+% \begin{macro}{\draw_scope_state_begin:, \draw_scope_state_begin:}
 %   As well as the graphics (and \TeX{}) scope, also deal with global
 %   data structures.
 %    \begin{macrocode}
-\cs_new_protected:Npn \draw_scope_begin:
+\cs_new_protected:Npn \draw_scope_state_begin:
   {
     \driver_draw_scope_begin:
     \group_begin:
@@ -190,7 +190,7 @@
       \tl_set_eq:NN \l_@@_stroke_color_tl \g_@@_stroke_color_tl
       \@@_path_reset_limits:
   }
-\cs_new_protected:Npn \draw_scope_end:
+\cs_new_protected:Npn \draw_scope_state_end:
   {
       \dim_gset_eq:NN \g_@@_linewidth_dim \l_@@_linewidth_dim
       \tl_gset_eq:NN \g_@@_fill_color_tl \l_@@_fill_color_tl
@@ -201,12 +201,6 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \subsection{Suspending features}
-%
-% This section covers cases where some elements need to be inserted without
-% disturbing the rest of a drawing. This needs a little work due to the global
-% nature of various elements.
-%
 % \begin{variable}
 %   {\l_@@_xmax_dim, \l_@@_xmin_dim, \l_@@_ymax_dim, \l_@@_ymin_dim}
 %   Storage for the bounding box.
diff --git a/l3experimental/l3draw/l3draw.dtx b/l3experimental/l3draw/l3draw.dtx
index 141d5be..e2332c4 100644
--- a/l3experimental/l3draw/l3draw.dtx
+++ b/l3experimental/l3draw/l3draw.dtx
@@ -182,42 +182,6 @@
 % will appear. Note that these all apply \emph{globally}, though some are
 % rest at the start of each drawing (\cs{draw_begin:}).
 %
-% \begin{function}{\draw_scope_begin:, \draw_scope_end:}
-%   \begin{syntax}
-%     \cs{draw_scope_begin:}
-%     ...
-%     \cs{draw_scope_end:}
-%   \end{syntax}
-%   Creates a scope for localisation of state settings within a drawing.
-%   A scope forms a \TeX{} group but will also localise global state
-%   variables (such as \cs{g_draw_linewidth_default_dim}), and driver-level
-%   concepts such as the termination of lines.
-%   \begin{demo}
-%     \draw_begin:
-%       \draw_scope_begin:
-%         \group_begin:
-%           \draw_linewidth:n { 2pt }
-%           \draw_path_rectangle:nn { 0 , 0 } { 2ex , 2ex }
-%           \draw_path_use:n  { stroke }
-%         \group_end:
-%         \draw_path_rectangle:nn { 3ex , 0ex } { 2ex , 2ex }
-%         \draw_path_use:n  { stroke }
-%       \draw_scope_end:
-%       \draw_path_rectangle:nn { 6ex , 0ex } { 2ex , 2ex }
-%       \draw_path_use_clear:n  { stroke }
-%     \draw_end:
-%   \end{demo}
-%   Global graphical concepts restricted by scope are
-%   \begin{itemize}
-%     \item Line width
-%     \item Stroke and fill color
-%     \item Dash pattern
-%     \item Line joining and capping, including the miter limit
-%     \item Clipping paths
-%     \item Canvas (driver) transformations
-%   \end{itemize}
-% \end{function}
-%
 % \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:}).
@@ -274,13 +238,49 @@
 %   PDF and PostScript manuals. The \meta{factor} is an \meta{fp expr}.
 % \end{function}
 %
-%
 % \subsection{Scoping drawing elements}
 %
 % Scoping drawing elements is necessary to allowing nesting of subparts.
 % These features have specific use requirements: the preconditions must be
 % met.
 %
+%
+% \begin{function}{\draw_scope_state_begin:, \draw_scope_state_end:}
+%   \begin{syntax}
+%     \cs{draw_scope_state_begin:}
+%     ...
+%     \cs{draw_scope_state_end:}
+%   \end{syntax}
+%   Creates a scope for localisation of state settings within a drawing.
+%   A scope forms a \TeX{} group but will also localise global state
+%   variables (such as \cs{g_draw_linewidth_default_dim}), and driver-level
+%   concepts such as the termination of lines.
+%   \begin{demo}
+%     \draw_begin:
+%       \draw_scope_state_begin:
+%         \group_begin:
+%           \draw_linewidth:n { 2pt }
+%           \draw_path_rectangle:nn { 0 , 0 } { 2ex , 2ex }
+%           \draw_path_use:n  { stroke }
+%         \group_end:
+%         \draw_path_rectangle:nn { 3ex , 0ex } { 2ex , 2ex }
+%         \draw_path_use:n  { stroke }
+%       \draw_scope_state_end:
+%       \draw_path_rectangle:nn { 6ex , 0ex } { 2ex , 2ex }
+%       \draw_path_use_clear:n  { stroke }
+%     \draw_end:
+%   \end{demo}
+%   Global graphical concepts restricted by scope are
+%   \begin{itemize}
+%     \item Line width
+%     \item Stroke and fill color
+%     \item Dash pattern
+%     \item Line joining and capping, including the miter limit
+%     \item Clipping paths
+%     \item Canvas (driver) transformations
+%   \end{itemize}
+% \end{function}
+%
 % \begin{function}{\draw_scope_bb_begin:, \draw_scope_bb_end:}
 %   \begin{syntax}
 %     \cs{draw_scope_bb_begin:}





More information about the latex3-commits mailing list