[latex3-commits] [git/LaTeX3-latex3-latex3] master: Fix clipping of paths (1f81ef1)

Joseph Wright joseph.wright at morningstar2.co.uk
Wed Apr 24 18:52:41 CEST 2019


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

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

commit 1f81ef136d1dc548711f67cdca201d5fef8819ac
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Apr 24 17:52:41 2019 +0100

    Fix clipping of paths
    
    This needs the path to be 'discarded'.


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

1f81ef136d1dc548711f67cdca201d5fef8819ac
 l3experimental/CHANGELOG.md               |    4 ++++
 l3experimental/l3draw/l3draw-paths.dtx    |   14 ++++++++++----
 l3experimental/l3draw/l3draw-softpath.dtx |    7 +------
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/l3experimental/CHANGELOG.md b/l3experimental/CHANGELOG.md
index ea7c290..30ca47a 100644
--- a/l3experimental/CHANGELOG.md
+++ b/l3experimental/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+## Fixed
+
+- Cliiping of paths by `l3draw`
+
 ## [2019-03-05]
 
 ### Added
diff --git a/l3experimental/l3draw/l3draw-paths.dtx b/l3experimental/l3draw/l3draw-paths.dtx
index 3cded35..f110e11 100644
--- a/l3experimental/l3draw/l3draw-paths.dtx
+++ b/l3experimental/l3draw/l3draw-paths.dtx
@@ -888,11 +888,15 @@
       { \l_draw_bb_update_bool }
       { \l_@@_path_use_stroke_bool }
       { \@@_path_use_stroke_bb: }
-    \bool_if:NTF \l_@@_path_use_clear_bool
-      { \@@_softpath_use_clear: }
-      { \@@_softpath_use: }
+    \@@_softpath_use:
     \bool_if:NT \l_@@_path_use_clip_bool
-      { \driver_draw_clip: }
+      {
+        \driver_draw_clip:
+        \bool_lazy_or:nnF
+          { \l_@@_path_use_fill_bool }
+          { \l_@@_path_use_stroke_bool }
+          { \driver_draw_discardpath: }
+      }
     \bool_lazy_or:nnT
       { \l_@@_path_use_fill_bool }
       { \l_@@_path_use_stroke_bool }
@@ -905,6 +909,8 @@
             :
           }
       }
+    \bool_if:NT \l_@@_path_use_clear_bool
+      { \@@_softpath_clear: }
   }
 \cs_new_protected:Npn \@@_path_use_action_draw:
   {
diff --git a/l3experimental/l3draw/l3draw-softpath.dtx b/l3experimental/l3draw/l3draw-softpath.dtx
index ef5f38d..9cabce3 100644
--- a/l3experimental/l3draw/l3draw-softpath.dtx
+++ b/l3experimental/l3draw/l3draw-softpath.dtx
@@ -105,7 +105,7 @@
 % \end{macro}
 %
 % \begin{macro}
-%   {\@@_softpath_use:, \@@_softpath_clear:, \@@_softpath_use_clear:}
+%   {\@@_softpath_use:, \@@_softpath_clear:}
 %   Using and clearing is trivial.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_softpath_use:
@@ -118,11 +118,6 @@
     \tl_build_gclear:N \g_@@_softpath_main_tl
     \bool_gset_false:N \g_@@_softpath_corners_bool
   }
-\cs_new_protected:Npn \@@_softpath_use_clear:
-  {
-    \@@_softpath_use:
-    \@@_softpath_clear:
-  }
 %    \end{macrocode}
 % \end{macro}
 %





More information about the latex3-commits mailing list