[latex3-commits] [l3svn] 04/05: Add rectangle drawing support to dips route
noreply at latex-project.org
noreply at latex-project.org
Wed May 18 22:55:47 CEST 2016
This is an automated email from the git hooks/post-receive script.
joseph pushed a commit to branch master
in repository l3svn.
commit 3bf518deea7c1ebe14c7e0052c020c9b4a4b6615
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed May 18 21:13:25 2016 +0100
Add rectangle drawing support to dips route
---
l3kernel/l3drivers.dtx | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/l3kernel/l3drivers.dtx b/l3kernel/l3drivers.dtx
index 2bc6601..77cf001 100755
--- a/l3kernel/l3drivers.dtx
+++ b/l3kernel/l3drivers.dtx
@@ -1286,11 +1286,14 @@
% \end{macro}
%
% \begin{macro}[int]{\@@_draw_moveto:nn, \@@_draw_lineto:nn}
+% \begin{macro}[int]{\@@_draw_rectangle:nnnn}
% \begin{macro}[int]{\@@_draw_curveto:nnnnnn}
-% Path creation operations all resolve directly to PostScript primitive
+% Path creation operations mainly resolve directly to PostScript primitive
% steps, with only the need to convert to \texttt{bp}. Notice that
% \texttt{x}-type expansion is included here to ensure that any variable
-% values are forced to literals before any possible caching.
+% values are forced to literals before any possible caching. There is
+% no native rectangular path command (without also clipping, filling or
+% stroking), so that task is done using a small amount of PostScript.
% \begin{macrocode}
\cs_new_protected:Npn \@@_draw_moveto:nn #1#2
{
@@ -1302,6 +1305,15 @@
\@@_draw_literal:x
{ \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~ lineto }
}
+\cs_new_protected:Npn \@@_draw_rectangle:nnnn #1#2#3#4
+ {
+ \@@_draw_literal:x
+ {
+ \dim_to_decimal_in_bp:n {#4} ~ \dim_to_decimal_in_bp:n {#3} ~
+ \dim_to_decimal_in_bp:n {#1} ~ \dim_to_decimal_in_bp:n {#2} ~
+ moveto~dup~0~rlineto~exch~0~exch~rlineto~neg~0~rlineto~clospath
+ }
+ }
\cs_new_protected:Npn \@@_draw_curveto:nnnnnn #1#2#3#4#5#6
{
\@@_draw_literal:x
@@ -1315,6 +1327,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{variable}[int]{\@@_draw_eor_bool}
% The even-odd rule here can be implemented as a simply switch.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the latex3-commits
mailing list