[latex3-commits] [git/LaTeX3-latex3-latex3] master: Drawing interface to use coffins (c72817d)
Joseph Wright
joseph.wright at morningstar2.co.uk
Sun Mar 4 12:23:40 CET 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/c72817d00fdc5dc22d51ca757f6939b6b30b8d98
>---------------------------------------------------------------
commit c72817d00fdc5dc22d51ca757f6939b6b30b8d98
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sun Mar 4 11:23:40 2018 +0000
Drawing interface to use coffins
At present, this does not include an extra shift:
one might emulate \pgftext by using a scoped
pair of shifts.
>---------------------------------------------------------------
c72817d00fdc5dc22d51ca757f6939b6b30b8d98
l3experimental/l3draw/l3draw-boxes.dtx | 14 ++++++++++++++
l3experimental/l3draw/l3draw.dtx | 14 +++++++++++++-
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/l3experimental/l3draw/l3draw-boxes.dtx b/l3experimental/l3draw/l3draw-boxes.dtx
index 8f30456..73a5cde 100644
--- a/l3experimental/l3draw/l3draw-boxes.dtx
+++ b/l3experimental/l3draw/l3draw-boxes.dtx
@@ -118,6 +118,20 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\draw_coffin_use:Nnn}
+% A simple shortcut.
+% \begin{macrocode}
+\cs_new_protected:Npn \draw_coffin_use:Nnn #1#2#3
+ {
+ \group_begin:
+ \hbox_set:Nn \l_@@_tmp_box
+ { \coffin_typeset:Nnnnn #1 {#2} {#3} { 0pt } { 0pt } }
+ \draw_box_use:N \l_@@_tmp_box
+ \group_end:
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%</initex|package>
% \end{macrocode}
diff --git a/l3experimental/l3draw/l3draw.dtx b/l3experimental/l3draw/l3draw.dtx
index d103b52..429c227 100644
--- a/l3experimental/l3draw/l3draw.dtx
+++ b/l3experimental/l3draw/l3draw.dtx
@@ -880,7 +880,7 @@
% \cs{l_draw_bb_update_bool} boolean.
% \end{variable}
%
-% \subsection{Text}
+% \subsection{Boxes and coffins}
%
% \begin{function}{\draw_box_use:N}
% \begin{syntax}
@@ -892,6 +892,18 @@
% (see \cs{l_draw_bb_update_bool}).
% \end{function}
%
+% \begin{function}{\draw_coffin_use:Nnn}
+% \begin{syntax}
+% \cs{draw_coffin_use:N} \meta{coffin} \Arg{hpole} \Arg{vpole}
+% \end{syntax}
+% Inserts the \meta{coffin} into a drawing, taking account of the current
+% transformation matrix and shift, and adjusting the drawing bounding
+% box to contain the (apparent) size of the box if this is active
+% (see \cs{l_draw_bb_update_bool}). The alignment point of the coffin to
+% the origin is specified by the intersection of the \meta{hpole} and the
+% \meta{vpole}.
+% \end{function}
+%
% \subsection{Color}
%
% \begin{function}{\draw_color:n, \draw_color_fill:n, \draw_color_stroke:n}
More information about the latex3-commits
mailing list