[latex3-commits] [git/LaTeX3-latex3-graphics-def] dvipdfmx-color: Also cover clipping (6444ed7)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Mar 17 09:22:30 CET 2021
Repository : https://github.com/latex3/graphics-def
On branch : dvipdfmx-color
Link : https://github.com/latex3/graphics-def/commit/6444ed7a333d74374c1772080e35ae393ea4218d
>---------------------------------------------------------------
commit 6444ed7a333d74374c1772080e35ae393ea4218d
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Mar 17 08:22:30 2021 +0000
Also cover clipping
>---------------------------------------------------------------
6444ed7a333d74374c1772080e35ae393ea4218d
dvipdfmx.def | 18 ++++++++++++++++++
xetex.def | 18 ++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/dvipdfmx.def b/dvipdfmx.def
index e01a2bf..0716c6b 100644
--- a/dvipdfmx.def
+++ b/dvipdfmx.def
@@ -405,3 +405,21 @@
% 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 4871c7e..d4d3504 100644
--- a/xetex.def
+++ b/xetex.def
@@ -504,3 +504,21 @@
% 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.