[latex3-commits] [git/LaTeX3-latex3-latex3] master: Correct fillstroke backend for dvips (c40a19a52)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Jan 17 12:12:01 CET 2021


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

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

commit c40a19a527541a1f8905d822eca5e3f27f29d8d0
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Fri Jan 15 16:28:56 2021 +0000

    Correct fillstroke backend for dvips


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

c40a19a527541a1f8905d822eca5e3f27f29d8d0
 l3backend/CHANGELOG.md                              |  3 +++
 l3backend/l3backend-draw.dtx                        |  4 +++-
 l3experimental/l3draw/testfiles/m3draw004.ptex.tlg  | 12 +++++++++---
 l3experimental/l3draw/testfiles/m3draw004.uptex.tlg | 12 +++++++++---
 l3experimental/l3draw/testfiles/m3draw007.ptex.tlg  |  4 +++-
 l3experimental/l3draw/testfiles/m3draw007.uptex.tlg |  4 +++-
 6 files changed, 30 insertions(+), 9 deletions(-)

diff --git a/l3backend/CHANGELOG.md b/l3backend/CHANGELOG.md
index 2aeddca2d..66dd85e55 100644
--- a/l3backend/CHANGELOG.md
+++ b/l3backend/CHANGELOG.md
@@ -9,6 +9,9 @@ this project uses date-based 'snapshot' version identifiers.
 ### Added
 - Basic opacity support
 
+### Fixed
+- Implementation of `filldraw` for `dvips`
+
 ## [2021-01-09]
 
 ### Added
diff --git a/l3backend/l3backend-draw.dtx b/l3backend/l3backend-draw.dtx
index 055aecbcf..d75828cf5 100644
--- a/l3backend/l3backend-draw.dtx
+++ b/l3backend/l3backend-draw.dtx
@@ -243,7 +243,6 @@
 \cs_new_protected:Npn \@@_backend_fillstroke:
   {
     \@@_backend_literal:n { gsave }
-    \@@_backend_literal:n { color.sc }
     \@@_backend_literal:n { color.fc }
     \@@_backend_literal:x
       {
@@ -251,7 +250,10 @@
         fill
       }
     \@@_backend_literal:n { grestore }
+    \@@_backend_literal:n { gsave }
+    \@@_backend_literal:n { color.sc }
     \@@_backend_literal:n { stroke }
+    \@@_backend_literal:n { grestore }
     \bool_if:NT \g_@@_draw_clip_bool
       {
         \@@_backend_literal:x
diff --git a/l3experimental/l3draw/testfiles/m3draw004.ptex.tlg b/l3experimental/l3draw/testfiles/m3draw004.ptex.tlg
index 08acd4270..86573417c 100644
--- a/l3experimental/l3draw/testfiles/m3draw004.ptex.tlg
+++ b/l3experimental/l3draw/testfiles/m3draw004.ptex.tlg
@@ -554,11 +554,13 @@ l. ...  }
 ....\special{ps:SDict begin /color.fc { } def end}
 ....\special{ps::28.34647 28.34647 0 0 moveto dup 0 rlineto exch 0 exch rlineto ne\ETC.}
 ....\special{ps::gsave}
-....\special{ps::color.sc}
 ....\special{ps::color.fc}
 ....\special{ps::fill}
 ....\special{ps::grestore}
+....\special{ps::gsave}
+....\special{ps::color.sc}
 ....\special{ps::stroke}
+....\special{ps::grestore}
 ....\special{ps::newpath}
 ....\special{color push rgb 1.0 0.0 0.0}
 ....\special{ps:SDict begin /color.sc { } def end}
@@ -610,11 +612,13 @@ TEST 8: \color_fill:n
 ....\special{ps:SDict begin /color.fc{1.0 0.0 0.0 setrgbcolor}def end}
 ....\special{ps::28.34647 28.34647 0 0 moveto dup 0 rlineto exch 0 exch rlineto ne\ETC.}
 ....\special{ps::gsave}
-....\special{ps::color.sc}
 ....\special{ps::color.fc}
 ....\special{ps::fill}
 ....\special{ps::grestore}
+....\special{ps::gsave}
+....\special{ps::color.sc}
 ....\special{ps::stroke}
+....\special{ps::grestore}
 ....\special{ps::newpath}
 ....\special{ps:SDict begin /color.fc{1.0 0.0 0.0 setrgbcolor}def end}
 ....\special{ps::0 0 moveto}
@@ -661,11 +665,13 @@ TEST 9: \color_stroke:n
 ....\special{ps:SDict begin /color.sc{1.0 0.0 0.0 setrgbcolor}def end}
 ....\special{ps::28.34647 28.34647 0 0 moveto dup 0 rlineto exch 0 exch rlineto ne\ETC.}
 ....\special{ps::gsave}
-....\special{ps::color.sc}
 ....\special{ps::color.fc}
 ....\special{ps::fill}
 ....\special{ps::grestore}
+....\special{ps::gsave}
+....\special{ps::color.sc}
 ....\special{ps::stroke}
+....\special{ps::grestore}
 ....\special{ps::newpath}
 ....\special{ps:SDict begin /color.sc{1.0 0.0 0.0 setrgbcolor}def end}
 ....\special{ps::0 0 moveto}
diff --git a/l3experimental/l3draw/testfiles/m3draw004.uptex.tlg b/l3experimental/l3draw/testfiles/m3draw004.uptex.tlg
index 08acd4270..86573417c 100644
--- a/l3experimental/l3draw/testfiles/m3draw004.uptex.tlg
+++ b/l3experimental/l3draw/testfiles/m3draw004.uptex.tlg
@@ -554,11 +554,13 @@ l. ...  }
 ....\special{ps:SDict begin /color.fc { } def end}
 ....\special{ps::28.34647 28.34647 0 0 moveto dup 0 rlineto exch 0 exch rlineto ne\ETC.}
 ....\special{ps::gsave}
-....\special{ps::color.sc}
 ....\special{ps::color.fc}
 ....\special{ps::fill}
 ....\special{ps::grestore}
+....\special{ps::gsave}
+....\special{ps::color.sc}
 ....\special{ps::stroke}
+....\special{ps::grestore}
 ....\special{ps::newpath}
 ....\special{color push rgb 1.0 0.0 0.0}
 ....\special{ps:SDict begin /color.sc { } def end}
@@ -610,11 +612,13 @@ TEST 8: \color_fill:n
 ....\special{ps:SDict begin /color.fc{1.0 0.0 0.0 setrgbcolor}def end}
 ....\special{ps::28.34647 28.34647 0 0 moveto dup 0 rlineto exch 0 exch rlineto ne\ETC.}
 ....\special{ps::gsave}
-....\special{ps::color.sc}
 ....\special{ps::color.fc}
 ....\special{ps::fill}
 ....\special{ps::grestore}
+....\special{ps::gsave}
+....\special{ps::color.sc}
 ....\special{ps::stroke}
+....\special{ps::grestore}
 ....\special{ps::newpath}
 ....\special{ps:SDict begin /color.fc{1.0 0.0 0.0 setrgbcolor}def end}
 ....\special{ps::0 0 moveto}
@@ -661,11 +665,13 @@ TEST 9: \color_stroke:n
 ....\special{ps:SDict begin /color.sc{1.0 0.0 0.0 setrgbcolor}def end}
 ....\special{ps::28.34647 28.34647 0 0 moveto dup 0 rlineto exch 0 exch rlineto ne\ETC.}
 ....\special{ps::gsave}
-....\special{ps::color.sc}
 ....\special{ps::color.fc}
 ....\special{ps::fill}
 ....\special{ps::grestore}
+....\special{ps::gsave}
+....\special{ps::color.sc}
 ....\special{ps::stroke}
+....\special{ps::grestore}
 ....\special{ps::newpath}
 ....\special{ps:SDict begin /color.sc{1.0 0.0 0.0 setrgbcolor}def end}
 ....\special{ps::0 0 moveto}
diff --git a/l3experimental/l3draw/testfiles/m3draw007.ptex.tlg b/l3experimental/l3draw/testfiles/m3draw007.ptex.tlg
index c2ef260be..fcb988efa 100644
--- a/l3experimental/l3draw/testfiles/m3draw007.ptex.tlg
+++ b/l3experimental/l3draw/testfiles/m3draw007.ptex.tlg
@@ -137,11 +137,13 @@ TEST 4: fill,stroke
 ....\special{ps::113.38582 0 lineto}
 ....\special{ps::closepath}
 ....\special{ps::gsave}
-....\special{ps::color.sc}
 ....\special{ps::color.fc}
 ....\special{ps::fill}
 ....\special{ps::grestore}
+....\special{ps::gsave}
+....\special{ps::color.sc}
 ....\special{ps::stroke}
+....\special{ps::grestore}
 ....\special{ps::newpath}
 ...\special{ps::@endspecial}
 ...\special{ps::[end]}
diff --git a/l3experimental/l3draw/testfiles/m3draw007.uptex.tlg b/l3experimental/l3draw/testfiles/m3draw007.uptex.tlg
index c2ef260be..fcb988efa 100644
--- a/l3experimental/l3draw/testfiles/m3draw007.uptex.tlg
+++ b/l3experimental/l3draw/testfiles/m3draw007.uptex.tlg
@@ -137,11 +137,13 @@ TEST 4: fill,stroke
 ....\special{ps::113.38582 0 lineto}
 ....\special{ps::closepath}
 ....\special{ps::gsave}
-....\special{ps::color.sc}
 ....\special{ps::color.fc}
 ....\special{ps::fill}
 ....\special{ps::grestore}
+....\special{ps::gsave}
+....\special{ps::color.sc}
 ....\special{ps::stroke}
+....\special{ps::grestore}
 ....\special{ps::newpath}
 ...\special{ps::@endspecial}
 ...\special{ps::[end]}





More information about the latex3-commits mailing list.