[latex3-commits] [git/LaTeX3-latex3-pdfresources] splitting: moved xform, check xetex (e8b2c5b)
Ulrike Fischer
fischer at troubleshooting-tex.de
Mon Jul 13 00:39:22 CEST 2020
Repository : https://github.com/latex3/pdfresources
On branch : splitting
Link : https://github.com/latex3/pdfresources/commit/e8b2c5b19ecb97c2a4c7fa36e86957a4dc57cd0d
>---------------------------------------------------------------
commit e8b2c5b19ecb97c2a4c7fa36e86957a4dc57cd0d
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Jul 13 00:39:22 2020 +0200
moved xform, check xetex
>---------------------------------------------------------------
e8b2c5b19ecb97c2a4c7fa36e86957a4dc57cd0d
l3backend-pdf-extra.dtx | 311 ++++++++++++++++++++++++++++++++++++++++++++++++
pdfresources.dtx | 307 -----------------------------------------------
2 files changed, 311 insertions(+), 307 deletions(-)
diff --git a/l3backend-pdf-extra.dtx b/l3backend-pdf-extra.dtx
index a31d5ff..6aacb97 100644
--- a/l3backend-pdf-extra.dtx
+++ b/l3backend-pdf-extra.dtx
@@ -59,6 +59,16 @@
% \begin{macrocode}
%<@@=pdf>
% \end{macrocode}
+% \begin{variable}{\g_@@_tmpa_prop, \l_@@_tmpa_tl, \l_@@_tmpa_box }
+% Some scratch variables
+% \begin{macrocode}
+%<*package>
+\prop_new:N \g_@@_tmpa_prop
+\tl_new:N \l_@@_tmpa_tl
+\box_new:N \l_@@_tmpa_box
+%</package>
+% \end{macrocode}
+% \end{variable}
% \subsection{some zref code, needs to be replaced later}
% a reference for the absolute page counter. This uses the counter from the
% new lthooks/ltshipout package.
@@ -1099,6 +1109,307 @@
%</dvisvgm>
% \end{macrocode}
% \end{macro}
+% \subsubsection{Form XObject / backend }
+% \begin{macro}{ \@@_backend_xform_new:nnnn }
+% \begin{arguments}
+% \item name
+% \item attributes
+% \item resources %needed?? or are all resources autogenerated?
+% \item content, this doesn't need to be a box!
+% \end{arguments}
+% \begin{macro}{ \@@_backend_xform_use:n, \@@_backend_xform_ref:n }
+% \begin{macrocode}
+%<*pdfmode>
+\sys_if_engine_pdftex:T
+ {
+ \cs_new_protected:Npn \@@_backend_xform_new:nnnn #1 #2 #3 #4
+ % #1 name
+ % #2 attributes
+ % #3 resources
+ % #4 content, not necessarily a box!
+ {
+ \hbox_set:Nn \l_@@_tmpa_box
+ {
+ \bool_set_true:N \l_@@_backend_xform_bool
+ \prop_gclear:c {\pdfdict_name:nn { g } { Core/Xform/Resources/Properties }}
+ #4
+ }
+ %store the dimensions
+ \tl_const:cx
+ { c_@@_backend_xform_wd_ \tl_to_str:n {#1} _tl }
+ { \tex_the:D \box_wd:N \l_@@_tmpa_box }
+ \tl_const:cx
+ { c_@@_backend_xform_ht_ \tl_to_str:n {#1} _tl }
+ { \tex_the:D \box_ht:N \l_@@_tmpa_box }
+ \tl_const:cx
+ { c_@@_backend_xform_dp_ \tl_to_str:n {#1} _tl }
+ { \tex_the:D \box_dp:N \l_@@_tmpa_box }
+ %% do we need to test if #2 and #3 are empty??
+ \tex_immediate:D \tex_pdfxform:D
+ ~ attr ~ { #2 }
+ %% which other resources should be default? Is an argument actually needed?
+ ~ resources ~
+ {
+ #3
+ \int_compare:nNnT
+ { \prop_count:c { \pdfdict_name:nn { g } { Core/Xform/Resources/Properties } } }
+ >
+ { 0 }
+ {
+ /Properties~
+ <<
+ \pdfdict_use:nn { g } { Core/Xform/Resources/Properties }
+ >>
+ }
+
+ \prop_if_empty:cF
+ { \pdfdict_name:nn { g } { Core/Page/Resources/ExtGState } }
+ {
+ /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
+ }
+ \prop_if_empty:cF
+ { \pdfdict_name:nn { g } { Core/Page/Resources/Pattern } }
+ {
+ /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
+ }
+ \prop_if_empty:cF
+ { \pdfdict_name:nn { g } { Core/Page/Resources/Shading } }
+ {
+ /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
+ }
+ \prop_if_empty:cF
+ { \pdfdict_name:nn { g } { Core/Page/Resources/ColorSpace } }
+ {
+ /ColorSpace~ \pdf_object_ref:n { Page/Resources/ColorSpace }
+ }
+ }
+ \l_@@_tmpa_box
+ \int_const:cn
+ { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
+ { \tex_pdflastxform:D }
+ }
+
+ \cs_new_protected:Npn \@@_backend_xform_use:n #1
+ {
+ \tex_pdfrefxform:D
+ \int_use:c { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
+ \scan_stop:
+ }
+
+ \cs_new:Npn \@@_backend_xform_ref:n #1
+ {
+ \int_use:c { c_@@_backend_xform_ \tl_to_str:n {#1} _int } ~ 0 ~ R
+ }
+ }
+
+%luatex
+%nearly identical but not completely ...
+\sys_if_engine_luatex:T
+ {
+ \cs_new:Npn \@@_backend_xform_new:nnnn #1 #2 #3 #4
+ % #1 name
+ % #2 attributes
+ % #3 resources
+ % #4 content, not necessarily a box!
+ {
+ \hbox_set:Nn \l_@@_tmpa_box
+ {
+ \bool_set_true:N \l_@@_backend_xform_bool
+ \prop_gclear:c { \pdfdict_name:nn { g } { Core/Xform/Resources/Properties } }
+ #4
+ }
+ \tl_const:cx
+ { c_@@_backend_xform_wd_ \tl_to_str:n {#1} _tl }
+ { \tex_the:D \box_wd:N \l_@@_tmpa_box }
+ \tl_const:cx
+ { c_@@_backend_xform_ht_ \tl_to_str:n {#1} _tl }
+ { \tex_the:D \box_ht:N \l_@@_tmpa_box }
+ \tl_const:cx
+ { c_@@_backend_xform_dp_ \tl_to_str:n {#1} _tl }
+ { \tex_the:D \box_dp:N \l_@@_tmpa_box }
+ %% do we need to test if #2 and #3 are empty??
+ \tex_immediate:D \tex_pdfxform:D
+ ~ attr ~ { #2 }
+ %% which resources should be default? Is an argument actually needed?
+ ~ resources ~
+ {
+ #3
+ \int_compare:nNnT
+ {\prop_count:c { \pdfdict_name:nn { g } { Core/Xform/Resources/Properties } }}
+ >
+ { 0 }
+ {
+ /Properties~
+ <<
+ \pdfdict_use:nn { g } { Core/Xform/Resources/Properties }
+ >>
+ }
+ \prop_if_empty:cF
+ { \pdfdict_name:nn { g } { Core/Page/Resources/ExtGState } }
+ {
+ /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
+ }
+ \prop_if_empty:cF
+ { \pdfdict_name:nn { g } { Core/Page/Resources/Pattern } }
+ {
+ /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
+ }
+ \prop_if_empty:cF
+ { \pdfdict_name:nn { g } { Core/Page/Resources/Shading } }
+ {
+ /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
+ }
+ \prop_if_empty:cF
+ { \pdfdict_name:nn { g } { Core/Page/Resources/ColorSpace } }
+ {
+ /ColorSpace~ \pdf_object_ref:n { Page/Resources/ColorSpace }
+ }
+ }
+ \l_@@_tmpa_box
+ \int_const:cn
+ { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
+ { \tex_pdflastxform:D }
+ }
+
+ \cs_new:Npn \@@_backend_xform_use:n #1
+ {
+ \tex_pdfrefxform:D \int_use:c
+ {
+ c_@@_backend_xform_ \tl_to_str:n {#1} _int
+ }
+ \scan_stop:
+ }
+
+ \cs_new:Npn \@@_backend_xform_ref:n #1
+ { \int_use:c { c_@@_backend_xform_ \tl_to_str:n {#1} _int } ~ 0 ~ R }
+ }
+%</pdfmode>
+%<*dvipdfmx|xdvipdfmx>
+% xetex
+ % it needs a bit testing if it really works to set the box to 0 before the special ...
+ % does it disturb viewing the xobject?
+ % what happens with the resources (bdc)? (should work as they are specials too)
+ % xetex requires that the special is in horizontal mode. This means it affects
+ % typesetting. But we can no delay the whole form code to shipout
+ % as the object reference and the size is often wanted on the current page.
+ % so we need to allocate a box - but probably they won't be thousands xform
+ % in a document so it shouldn't matter.
+ \cs_new:Npn \@@_backend_xform_new:nnnn #1 #2 #3 #4
+ % #1 name
+ % #2 attributes
+ % #3 resources
+ % #4 content, not necessarily a box!
+ {
+ \int_gincr:N \g_@@_backend_object_int
+ \int_const:cn
+ { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
+ { \g_@@_backend_object_int }
+ \box_new:c { g_@@_backend_xform_#1_box }
+ \hbox_gset:cn { g_@@_backend_xform_#1_box }
+ {
+ \bool_set_true:N \l_@@_backend_xform_bool
+ #4
+ }
+ \tl_const:cx
+ { c_@@_backend_xform_wd_ \tl_to_str:n {#1} _tl }
+ { \tex_the:D \box_wd:c { g_@@_backend_xform_#1_box } }
+ \tl_const:cx
+ { c_@@_backend_xform_ht_ \tl_to_str:n {#1} _tl }
+ { \tex_the:D \box_ht:c { g_@@_backend_xform_#1_box } }
+ \tl_const:cx
+ { c_@@_backend_xform_dp_ \tl_to_str:n {#1} _tl }
+ { \tex_the:D \box_dp:c { g_@@_backend_xform_#1_box } }
+ \box_set_dp:cn { g_@@_backend_xform_#1_box } { \c_zero_dim }
+ \box_set_ht:cn { g_@@_backend_xform_#1_box } { \c_zero_dim }
+ \box_set_wd:cn { g_@@_backend_xform_#1_box } { \c_zero_dim }
+ \hook_gput_next_code:nn {shipout/background}
+ {
+ \mode_leave_vertical: %needed, the xform disappears without it.
+ \@@_backend:x
+ {
+ bxobj ~ \@@_backend_xform_ref:n { #1 }
+ \c_space_tl width ~ \pdf_xform_wd:n { #1 }
+ \c_space_tl height ~ \pdf_xform_ht:n { #1 }
+ \c_space_tl depth ~ \pdf_xform_dp:n { #1 }
+ }
+ \box_use_drop:c { g_@@_backend_xform_#1_box }
+ \@@_backend:x {put ~ @resources ~<<#3>> }
+ \@@_backend:x
+ {
+ put~ @resources ~
+ <<
+ /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
+ >>
+ }
+ \@@_backend:x
+ {
+ put~ @resources ~
+ <<
+ /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
+ >>
+ }
+ \@@_backend:x
+ {
+ put~ @resources ~
+ <<
+ /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
+ >>
+ }
+ \@@_backend:x
+ {
+ put~ @resources ~
+ <<
+ /ColorSpace~
+ \pdf_object_ref:n { Page/Resources/ColorSpace }
+ >>
+ }
+ \exp_args:Nx
+ \@@_backend:x {exobj ~<<#2>>}
+ }
+ }
+
+
+
+ \cs_new:Npn \@@_backend_xform_ref:n #1
+ {
+ @pdf.xform \int_use:c { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
+ }
+
+ \cs_new:Npn \@@_backend_xform_use:n #1
+ {
+ \hbox_set:Nn \l_@@_tmpa_box
+ {
+ \@@_backend:x
+ {
+ uxobj~ \@@_backend_xform_ref:n { #1 }
+ }
+ }
+ \box_set_wd:Nn \l_@@_tmpa_box { \pdf_xform_wd:n { #1 } }
+ \box_set_ht:Nn \l_@@_tmpa_box { \pdf_xform_ht:n { #1 } }
+ \box_set_dp:Nn \l_@@_tmpa_box { \pdf_xform_dp:n { #1 } }
+ \box_use_drop:N \l_@@_tmpa_box
+ }
+%</dvipdfmx|xdvipdfmx>
+%<*dvisvgm>
+% unclear what it should do!!
+\cs_new:Npn \@@_backend_xform_new:nnnn #1 #2 #3 #4 {}
+\cs_new:Npn \@@_backend_xform_use:n #1 {}
+\cs_new:Npn \@@_backend_xform_ref:n {}
+%</dvisvgm>
+%<*drivers>
+%% all
+\prg_new_conditional:Npnn \@@_backend_xform_if_exist:n #1 { p , T , F , TF }
+ {
+ \int_if_exist:cTF { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
+ { \prg_return_true: }
+ { \prg_return_false:}
+ }
+\prg_new_eq_conditional:NNn \pdf_xform_if_exist:n\@@_backend_xform_if_exist:n
+ { TF , T , F , p }
+%</drivers>
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \subsection{lua code for lualatex}
% \begin{macrocode}
%<*lua>
diff --git a/pdfresources.dtx b/pdfresources.dtx
index ea56344..fdce5d2 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -93,18 +93,6 @@
%^^A still needed:
%^^A \pdf at strcmp??
%^^A \pdf at escapestring?? \pdfescapestring
-% \begin{variable}{\l_@@_tmpa_prop, \l_@@_tmpa_tl }
-% Some scratch variables
-% \begin{macrocode}
-%<*package>
-\prop_new:N \l_@@_tmpa_prop
-\prop_new:N \g_@@_tmpa_prop
-\tl_new:N \l_@@_tmpa_tl
-\box_new:N \l_@@_tmpa_box
-\box_new:N \l_@@_tmpb_box
-%</package>
-% \end{macrocode}
-% \end{variable}
%
% This loads tools and the core code.
% \begin{NOTE}{UF}
@@ -358,301 +346,6 @@
%</package>
% \end{macrocode}
%
-% \subsubsection{Form XObject / backend }
-% \begin{macro}{ \@@_backend_xform_new:nnnn }
-% \begin{arguments}
-% \item name
-% \item attributes
-% \item resources %needed?? or are all resources autogenerated?
-% \item content, this doesn't need to be a box!
-% \end{arguments}
-% \begin{macro}{ \@@_backend_xform_use:n, \@@_backend_xform_ref:n }
-% \begin{macrocode}
-%<*pdfmode>
-\sys_if_engine_pdftex:T
- {
- \cs_new_protected:Npn \@@_backend_xform_new:nnnn #1 #2 #3 #4
- % #1 name
- % #2 attributes
- % #3 resources
- % #4 content, not necessarily a box!
- {
- \hbox_set:Nn \l_@@_tmpa_box
- {
- \bool_set_true:N \l_@@_backend_xform_bool
- \prop_gclear:c {\pdfdict_name:nn { g } { Core/Xform/Resources/Properties }}
- #4
- }
- %store the dimensions
- \tl_const:cx
- { c_@@_backend_xform_wd_ \tl_to_str:n {#1} _tl }
- { \tex_the:D \box_wd:N \l_@@_tmpa_box }
- \tl_const:cx
- { c_@@_backend_xform_ht_ \tl_to_str:n {#1} _tl }
- { \tex_the:D \box_ht:N \l_@@_tmpa_box }
- \tl_const:cx
- { c_@@_backend_xform_dp_ \tl_to_str:n {#1} _tl }
- { \tex_the:D \box_dp:N \l_@@_tmpa_box }
- %% do we need to test if #2 and #3 are empty??
- \tex_immediate:D \tex_pdfxform:D
- ~ attr ~ { #2 }
- %% which other resources should be default? Is an argument actually needed?
- ~ resources ~
- {
- #3
- \int_compare:nNnT
- { \prop_count:c { \pdfdict_name:nn { g } { Core/Xform/Resources/Properties } } }
- >
- { 0 }
- {
- /Properties~
- <<
- \pdfdict_use:nn { g } { Core/Xform/Resources/Properties }
- >>
- }
-
- \prop_if_empty:cF
- { \pdfdict_name:nn { g } { Core/Page/Resources/ExtGState } }
- {
- /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
- }
- \prop_if_empty:cF
- { \pdfdict_name:nn { g } { Core/Page/Resources/Pattern } }
- {
- /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
- }
- \prop_if_empty:cF
- { \pdfdict_name:nn { g } { Core/Page/Resources/Shading } }
- {
- /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
- }
- \prop_if_empty:cF
- { \pdfdict_name:nn { g } { Core/Page/Resources/ColorSpace } }
- {
- /ColorSpace~ \pdf_object_ref:n { Page/Resources/ColorSpace }
- }
- }
- \l_@@_tmpa_box
- \int_const:cn
- { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
- { \tex_pdflastxform:D }
- }
-
- \cs_new_protected:Npn \@@_backend_xform_use:n #1
- {
- \tex_pdfrefxform:D
- \int_use:c { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
- \scan_stop:
- }
-
- \cs_new:Npn \@@_backend_xform_ref:n #1
- {
- \int_use:c { c_@@_backend_xform_ \tl_to_str:n {#1} _int } ~ 0 ~ R
- }
- }
-
-%luatex
-%nearly identical but not completely ...
-\sys_if_engine_luatex:T
- {
- \cs_new:Npn \@@_backend_xform_new:nnnn #1 #2 #3 #4
- % #1 name
- % #2 attributes
- % #3 resources
- % #4 content, not necessarily a box!
- {
- \hbox_set:Nn \l_@@_tmpa_box
- {
- \bool_set_true:N \l_@@_backend_xform_bool
- \prop_gclear:c { \pdfdict_name:nn { g } { Core/Xform/Resources/Properties } }
- #4
- }
- \tl_const:cx
- { c_@@_backend_xform_wd_ \tl_to_str:n {#1} _tl }
- { \tex_the:D \box_wd:N \l_@@_tmpa_box }
- \tl_const:cx
- { c_@@_backend_xform_ht_ \tl_to_str:n {#1} _tl }
- { \tex_the:D \box_ht:N \l_@@_tmpa_box }
- \tl_const:cx
- { c_@@_backend_xform_dp_ \tl_to_str:n {#1} _tl }
- { \tex_the:D \box_dp:N \l_@@_tmpa_box }
- %% do we need to test if #2 and #3 are empty??
- \tex_immediate:D \tex_pdfxform:D
- ~ attr ~ { #2 }
- %% which resources should be default? Is an argument actually needed?
- ~ resources ~
- {
- #3
- \int_compare:nNnT
- {\prop_count:c { \pdfdict_name:nn { g } { Core/Xform/Resources/Properties } }}
- >
- { 0 }
- {
- /Properties~
- <<
- \pdfdict_use:nn { g } { Core/Xform/Resources/Properties }
- >>
- }
- \prop_if_empty:cF
- { \pdfdict_name:nn { g } { Core/Page/Resources/ExtGState } }
- {
- /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
- }
- \prop_if_empty:cF
- { \pdfdict_name:nn { g } { Core/Page/Resources/Pattern } }
- {
- /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
- }
- \prop_if_empty:cF
- { \pdfdict_name:nn { g } { Core/Page/Resources/Shading } }
- {
- /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
- }
- \prop_if_empty:cF
- { \pdfdict_name:nn { g } { Core/Page/Resources/ColorSpace } }
- {
- /ColorSpace~ \pdf_object_ref:n { Page/Resources/ColorSpace }
- }
- }
- \l_@@_tmpa_box
- \int_const:cn
- { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
- { \tex_pdflastxform:D }
- }
-
- \cs_new:Npn \@@_backend_xform_use:n #1
- {
- \tex_pdfrefxform:D \int_use:c
- {
- c_@@_backend_xform_ \tl_to_str:n {#1} _int
- }
- \scan_stop:
- }
-
- \cs_new:Npn \@@_backend_xform_ref:n #1
- { \int_use:c { c_@@_backend_xform_ \tl_to_str:n {#1} _int } ~ 0 ~ R }
- }
-%</pdfmode>
-%<*dvipdfmx|xdvipdfmx>
-% xetex
- % it needs a bit testing if it really works to set the box to 0 before the special ...
- % does it disturb viewing the xobject?
- % what happens with the resources (bdc)? (should work as they are specials too)
- % xetex requires that the special is in horizontal mode. This means it affects
- % typesetting. But we can no delay the whole form code to shipout
- % as the object reference and the size is often wanted on the current page.
- % so we need to allocate a box - but probably they won't be thousands xform
- % in a document so it shouldn't matter.
- \cs_new:Npn \@@_backend_xform_new:nnnn #1 #2 #3 #4
- % #1 name
- % #2 attributes
- % #3 resources
- % #4 content, not necessarily a box!
- {
- \int_gincr:N \g_@@_backend_object_int
- \int_const:cn
- { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
- { \g_@@_backend_object_int }
- \box_new:c { g_@@_backend_xform_#1_box }
- \hbox_gset:cn { g_@@_backend_xform_#1_box }
- {
- \bool_set_true:N \l_@@_backend_xform_bool
- #4
- }
- \tl_const:cx
- { c_@@_backend_xform_wd_ \tl_to_str:n {#1} _tl }
- { \tex_the:D \box_wd:c { g_@@_backend_xform_#1_box } }
- \tl_const:cx
- { c_@@_backend_xform_ht_ \tl_to_str:n {#1} _tl }
- { \tex_the:D \box_ht:c { g_@@_backend_xform_#1_box } }
- \tl_const:cx
- { c_@@_backend_xform_dp_ \tl_to_str:n {#1} _tl }
- { \tex_the:D \box_dp:c { g_@@_backend_xform_#1_box } }
- \box_set_dp:cn { g_@@_backend_xform_#1_box } { \c_zero_dim }
- \box_set_ht:cn { g_@@_backend_xform_#1_box } { \c_zero_dim }
- \box_set_wd:cn { g_@@_backend_xform_#1_box } { \c_zero_dim }
- \hook_gput_next_code:nn {shipout/background}
- {
- \mode_leave_vertical: %needed, the xform disappears without it.
- \@@_backend:x
- {
- bxobj ~ \@@_backend_xform_ref:n { #1 }
- \c_space_tl width ~ \pdf_xform_wd:n { #1 }
- \c_space_tl height ~ \pdf_xform_ht:n { #1 }
- \c_space_tl depth ~ \pdf_xform_dp:n { #1 }
- }
- \box_use_drop:c { g_@@_backend_xform_#1_box }
- \@@_backend:x {put ~ @resources ~<<#3>> }
- \@@_backend:x
- {
- put~ @resources ~
- <<
- /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
- >>
- }
- \@@_backend:x
- {
- put~ @resources ~
- <<
- /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
- >>
- }
- \@@_backend:x
- {
- put~ @resources ~
- <<
- /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
- >>
- }
- \@@_backend:x
- {
- put~ @resources ~
- <<
- /ColorSpace~
- \pdf_object_ref:n { Page/Resources/ColorSpace }
- >>
- }
- \exp_args:Nx
- \@@_backend:x {exobj ~<<#2>>}
- }
- }
-
-
-
- \cs_new:Npn \@@_backend_xform_ref:n #1
- {
- @pdf.xform \int_use:c { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
- }
-
- \cs_new:Npn \@@_backend_xform_use:n #1
- {
- \hbox_set:Nn \l_@@_tmpa_box
- {
- \@@_backend:x
- {
- uxobj~ \@@_backend_xform_ref:n { #1 }
- }
- }
- \box_set_wd:Nn \l_@@_tmpa_box { \pdf_xform_wd:n { #1 } }
- \box_set_ht:Nn \l_@@_tmpa_box { \pdf_xform_ht:n { #1 } }
- \box_set_dp:Nn \l_@@_tmpa_box { \pdf_xform_dp:n { #1 } }
- \box_use_drop:N \l_@@_tmpa_box
- }
-%</dvipdfmx|xdvipdfmx>
-%<*drivers>
-%% all
-\prg_new_conditional:Npnn \@@_backend_xform_if_exist:n #1 { p , T , F , TF }
- {
- \int_if_exist:cTF { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
- { \prg_return_true: }
- { \prg_return_false:}
- }
-\prg_new_eq_conditional:NNn \pdf_xform_if_exist:n\@@_backend_xform_if_exist:n
- { TF , T , F , p }
-%</drivers>
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
%
%\subsection{Annotations}
% \begin{NOTE}{UF}
More information about the latex3-commits
mailing list.