[latex3-commits] [git/LaTeX3-latex3-graphics-def] main: Re-insert pdfcolorstack color after end of rot/scale (a8bf4b9)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Mar 18 17:55:04 CET 2021
Repository : https://github.com/latex3/graphics-def
On branch : main
Link : https://github.com/latex3/graphics-def/commit/a8bf4b900e92ceadf60898f5f7e8ac77e3050cc6
>---------------------------------------------------------------
commit a8bf4b900e92ceadf60898f5f7e8ac77e3050cc6
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Mar 18 16:54:14 2021 +0000
Re-insert pdfcolorstack color after end of rot/scale
See #26.
>---------------------------------------------------------------
a8bf4b900e92ceadf60898f5f7e8ac77e3050cc6
dvipdfmx.def | 23 ++++++++++++++++++++++-
xetex.def | 23 ++++++++++++++++++++++-
2 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/dvipdfmx.def b/dvipdfmx.def
index fef5592..2a49787 100644
--- a/dvipdfmx.def
+++ b/dvipdfmx.def
@@ -17,7 +17,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{dvipdfmx.def}
- [2021/03/02 v5.0i Graphics/color driver for dvipdfmx]
+ [2021/03/18 v5.0j Graphics/color driver for dvipdfmx]
\def\GPT at space{ }
\def\c at lor@arg#1{%
\dimen@#1\p@
@@ -402,3 +402,24 @@
\def\reset at color{%
\special{pdfcolorstack \@pdfcolorstack pop}%
}
+% Reinsert stack color to over-ride built-in reinsertion of pdf:bc color
+\def\Grot at end{\special{pdf:etrans}\special{pdfcolorstack \@pdfcolorstack current}}
+\let\Gscale at end\Grot at end
+\def\GPT at clipbox#1{%
+ \setbox#1=\hbox{%
+ \Gin at defaultbp\WIDTH{\wd#1}%
+ \Gin at defaultbp\DEPTH{\dp#1}%
+ \@tempdima\ht#1%
+ \advance\@tempdima\dp#1%
+ \Gin at defaultbp\TOTALHEIGHT{\@tempdima}%
+ \special{x:gsave}%
+ \special{%
+ pdf:literal
+ 0 -\DEPTH\GPT at space \WIDTH\GPT at space \TOTALHEIGHT\GPT at space re W n
+ }%
+ \rlap{\box#1}%
+ \special{x:grestore}%
+ \special{pdfcolorstack \@pdfcolorstack current}%
+ \hskip\wd#1%
+ }%
+}
diff --git a/xetex.def b/xetex.def
index 12d0735..90833a6 100644
--- a/xetex.def
+++ b/xetex.def
@@ -17,7 +17,7 @@
%% https://github.com/latex3/graphics-def/issues
%%
\ProvidesFile{xetex.def}
- [2021/03/02 v5.0j Graphics/color driver for xetex]
+ [2021/03/18 v5.0k Graphics/color driver for xetex]
\def\GPT at space{ }
\def\c at lor@arg#1{%
\dimen@#1\p@
@@ -501,3 +501,24 @@
\def\reset at color{%
\special{pdfcolorstack \@pdfcolorstack pop}%
}
+% Reinsert stack color to over-ride built-in reinsertion of pdf:bc color
+\def\Grot at end{\special{pdf:etrans}\special{pdfcolorstack \@pdfcolorstack current}}
+\let\Gscale at end\Grot at end
+\def\GPT at clipbox#1{%
+ \setbox#1=\hbox{%
+ \Gin at defaultbp\WIDTH{\wd#1}%
+ \Gin at defaultbp\DEPTH{\dp#1}%
+ \@tempdima\ht#1%
+ \advance\@tempdima\dp#1%
+ \Gin at defaultbp\TOTALHEIGHT{\@tempdima}%
+ \special{x:gsave}%
+ \special{%
+ pdf:literal
+ 0 -\DEPTH\GPT at space \WIDTH\GPT at space \TOTALHEIGHT\GPT at space re W n
+ }%
+ \rlap{\box#1}%
+ \special{x:grestore}%
+ \special{pdfcolorstack \@pdfcolorstack current}%
+ \hskip\wd#1%
+ }%
+}
More information about the latex3-commits
mailing list.