[latex3-commits] [git/LaTeX3-latex3-latex3] HiTeX: Support for HINT image inclusion (2206e1f1d)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Apr 18 17:54:40 CEST 2023
Repository : https://github.com/latex3/latex3
On branch : HiTeX
Link : https://github.com/latex3/latex3/commit/2206e1f1d025705a81971a830dacce7e01c2eb82
>---------------------------------------------------------------
commit 2206e1f1d025705a81971a830dacce7e01c2eb82
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Apr 18 16:54:40 2023 +0100
Support for HINT image inclusion
Based on what David has done for graphics-def ...
>---------------------------------------------------------------
2206e1f1d025705a81971a830dacce7e01c2eb82
l3backend/l3backend-graphics.dtx | 42 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/l3backend/l3backend-graphics.dtx b/l3backend/l3backend-graphics.dtx
index 97c97536f..188725e2c 100644
--- a/l3backend/l3backend-graphics.dtx
+++ b/l3backend/l3backend-graphics.dtx
@@ -915,6 +915,48 @@
% \end{macrocode}
%
% \begin{macrocode}
+%<*hitex>
+% \end{macrocode}
+%
+% \begin{variable}{\l_graphics_search_ext_seq}
+% \begin{macrocode}
+\@@_backend_loaded:n
+ { \seq_set_from_clist:Nn \l_graphics_search_ext_seq { .jpg , .png } }
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_backend_getbb_jpg:n, \@@_backend_getbb_png:n}
+% \begin{macro}{\@@_backend_getbb_aux:n}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_getbb_jpg:n #1
+ {
+ \@@_bb_restore:xF {#1}
+ { \@@_backend_getbb_aux:n {#1} }
+ }
+\cs_new_protected:Npn \@@_backend_getbb_aux:n #1
+ {
+ \hbox_set:Nn \l_@@_internal_box
+ { \tex_HINTimage:D #1 \scan_stop: }
+ \dim_set:Nn \l_@@_urx_dim { \box_wd:N \l_@@_internal_box }
+ \dim_set:Nn \l_@@_ury_dim { \box_ht:N \l_@@_internal_box }
+ }
+\cs_new_eq:NN \@@_backend_getbb_png:n \@@_backend_getbb_jpg:n
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_backend_include_jpg:n, \@@_backend_include_png:n}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_include_jpg:n #1
+ { \hbox:n { \tex_HINTimage:D #1 \scan_stop: } }
+\cs_new_eq:NN \@@_backend_include_png:n \@@_backend_include_jpg:n
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%</hitex>
+% \end{macrocode}
+%
+% \begin{macrocode}
%</package>
% \end{macrocode}
%
More information about the latex3-commits
mailing list.