[latex3-commits] [git/LaTeX3-latex3-latex3] master: l3draw: Give the output box some size (f6adbea)
Joseph Wright
joseph.wright at morningstar2.co.uk
Tue Feb 13 22:02:00 CET 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/f6adbea2fa0bb70f394fd71195795c784e066332
>---------------------------------------------------------------
commit f6adbea2fa0bb70f394fd71195795c784e066332
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Tue Feb 13 21:02:00 2018 +0000
l3draw: Give the output box some size
Doesn't have all of the pgf stuff yet, but at least it's not
a zero-sized box!
>---------------------------------------------------------------
f6adbea2fa0bb70f394fd71195795c784e066332
l3trial/l3draw/l3draw-scopes.dtx | 11 +++++
l3trial/l3draw/testfiles/m3draw003.ptex.tlg | 64 +++++++++++++++-----------
l3trial/l3draw/testfiles/m3draw003.tlg | 64 +++++++++++++++-----------
l3trial/l3draw/testfiles/m3draw003.uptex.tlg | 64 +++++++++++++++-----------
l3trial/l3draw/testfiles/m3draw003.xetex.tlg | 64 +++++++++++++++-----------
5 files changed, 155 insertions(+), 112 deletions(-)
diff --git a/l3trial/l3draw/l3draw-scopes.dtx b/l3trial/l3draw/l3draw-scopes.dtx
index ac6ead5..74c85ca 100644
--- a/l3trial/l3draw/l3draw-scopes.dtx
+++ b/l3trial/l3draw/l3draw-scopes.dtx
@@ -113,6 +113,17 @@
{
\driver_draw_end:
\hbox_set_end:
+ \hbox_set:Nn \l_@@_main_box
+ {
+ \skip_horizontal:n { -\g_@@_xmin_dim }
+ \box_move_down:nn { \g_@@_ymin_dim }
+ { \box_use_drop:N \l_@@_main_box }
+ }
+ \box_set_ht:Nn \l_@@_main_box
+ { \g_@@_ymax_dim + \g_@@_ymin_dim }
+ \box_set_dp:Nn \l_@@_main_box { 0pt }
+ \box_set_wd:Nn \l_@@_main_box
+ { \g_@@_xmax_dim - \g_@@_xmin_dim }
\mode_leave_vertical:
\box_use_drop:N \l_@@_main_box
}
diff --git a/l3trial/l3draw/testfiles/m3draw003.ptex.tlg b/l3trial/l3draw/testfiles/m3draw003.ptex.tlg
index 1d6ebef..88d544e 100644
--- a/l3trial/l3draw/testfiles/m3draw003.ptex.tlg
+++ b/l3trial/l3draw/testfiles/m3draw003.ptex.tlg
@@ -4,12 +4,14 @@ Don't change this file in any respect.
TEST 1: \draw_path_moveto:n
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 9.96265 9.96265 m}
-..\special{pdf:literal Q}
+\hbox(10.0+0.0)x10.0
+.\hbox(10.0+0.0)x10.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 9.96265 9.96265 m}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -18,12 +20,14 @@ l. ... }
TEST 2: \draw_path_lineto:n
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 9.96265 9.96265 l}
-..\special{pdf:literal Q}
+\hbox(10.0+0.0)x10.0
+.\hbox(10.0+0.0)x10.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 9.96265 9.96265 l}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -32,12 +36,14 @@ l. ... }
TEST 3: \draw_path_curveto:nnn
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 0 28.34647 28.34647 28.34647 28.34647 56.69292 c}
-..\special{pdf:literal Q}
+\hbox(28.45276+0.0)x28.45276
+.\hbox(28.45276+0.0)x28.45276
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 28.34647 28.34647 28.34647 28.34647 56.69292 c}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -46,16 +52,18 @@ l. ... }
TEST 4: \draw_path_close:
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 0 0 m}
-..\special{pdf:literal 0.99626 0 l}
-..\special{pdf:literal 0.99626 0.99626 l}
-..\special{pdf:literal 0 0.99626 l}
-..\special{pdf:literal h}
-..\special{pdf:literal Q}
+\hbox(1.0+0.0)x1.0
+.\hbox(1.0+0.0)x1.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0.99626 0 l}
+...\special{pdf:literal 0.99626 0.99626 l}
+...\special{pdf:literal 0 0.99626 l}
+...\special{pdf:literal h}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
diff --git a/l3trial/l3draw/testfiles/m3draw003.tlg b/l3trial/l3draw/testfiles/m3draw003.tlg
index 5ae0d5d..f8b3bdd 100644
--- a/l3trial/l3draw/testfiles/m3draw003.tlg
+++ b/l3trial/l3draw/testfiles/m3draw003.tlg
@@ -4,12 +4,14 @@ Don't change this file in any respect.
TEST 1: \draw_path_moveto:n
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\pdfliteral{q}
-..\pdfliteral{0.3985 w}
-..\pdfliteral{9.96265 9.96265 m}
-..\pdfliteral{Q}
+\hbox(10.0+0.0)x10.0
+.\hbox(10.0+0.0)x10.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{9.96265 9.96265 m}
+...\pdfliteral{Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -18,12 +20,14 @@ l. ... }
TEST 2: \draw_path_lineto:n
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\pdfliteral{q}
-..\pdfliteral{0.3985 w}
-..\pdfliteral{9.96265 9.96265 l}
-..\pdfliteral{Q}
+\hbox(10.0+0.0)x10.0
+.\hbox(10.0+0.0)x10.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{9.96265 9.96265 l}
+...\pdfliteral{Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -32,12 +36,14 @@ l. ... }
TEST 3: \draw_path_curveto:nnn
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\pdfliteral{q}
-..\pdfliteral{0.3985 w}
-..\pdfliteral{0 28.34647 28.34647 28.34647 28.34647 56.69292 c}
-..\pdfliteral{Q}
+\hbox(28.45276+0.0)x28.45276
+.\hbox(28.45276+0.0)x28.45276
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 28.34647 28.34647 28.34647 28.34647 56.69292 c}
+...\pdfliteral{Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -46,16 +52,18 @@ l. ... }
TEST 4: \draw_path_close:
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\pdfliteral{q}
-..\pdfliteral{0.3985 w}
-..\pdfliteral{0 0 m}
-..\pdfliteral{0.99626 0 l}
-..\pdfliteral{0.99626 0.99626 l}
-..\pdfliteral{0 0.99626 l}
-..\pdfliteral{h}
-..\pdfliteral{Q}
+\hbox(1.0+0.0)x1.0
+.\hbox(1.0+0.0)x1.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\pdfliteral{q}
+...\pdfliteral{0.3985 w}
+...\pdfliteral{0 0 m}
+...\pdfliteral{0.99626 0 l}
+...\pdfliteral{0.99626 0.99626 l}
+...\pdfliteral{0 0.99626 l}
+...\pdfliteral{h}
+...\pdfliteral{Q}
! OK.
<argument> \l_tmpa_box
l. ... }
diff --git a/l3trial/l3draw/testfiles/m3draw003.uptex.tlg b/l3trial/l3draw/testfiles/m3draw003.uptex.tlg
index 1d6ebef..88d544e 100644
--- a/l3trial/l3draw/testfiles/m3draw003.uptex.tlg
+++ b/l3trial/l3draw/testfiles/m3draw003.uptex.tlg
@@ -4,12 +4,14 @@ Don't change this file in any respect.
TEST 1: \draw_path_moveto:n
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 9.96265 9.96265 m}
-..\special{pdf:literal Q}
+\hbox(10.0+0.0)x10.0
+.\hbox(10.0+0.0)x10.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 9.96265 9.96265 m}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -18,12 +20,14 @@ l. ... }
TEST 2: \draw_path_lineto:n
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 9.96265 9.96265 l}
-..\special{pdf:literal Q}
+\hbox(10.0+0.0)x10.0
+.\hbox(10.0+0.0)x10.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 9.96265 9.96265 l}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -32,12 +36,14 @@ l. ... }
TEST 3: \draw_path_curveto:nnn
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 0 28.34647 28.34647 28.34647 28.34647 56.69292 c}
-..\special{pdf:literal Q}
+\hbox(28.45276+0.0)x28.45276
+.\hbox(28.45276+0.0)x28.45276
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 28.34647 28.34647 28.34647 28.34647 56.69292 c}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -46,16 +52,18 @@ l. ... }
TEST 4: \draw_path_close:
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 0 0 m}
-..\special{pdf:literal 0.99626 0 l}
-..\special{pdf:literal 0.99626 0.99626 l}
-..\special{pdf:literal 0 0.99626 l}
-..\special{pdf:literal h}
-..\special{pdf:literal Q}
+\hbox(1.0+0.0)x1.0
+.\hbox(1.0+0.0)x1.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0.99626 0 l}
+...\special{pdf:literal 0.99626 0.99626 l}
+...\special{pdf:literal 0 0.99626 l}
+...\special{pdf:literal h}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
diff --git a/l3trial/l3draw/testfiles/m3draw003.xetex.tlg b/l3trial/l3draw/testfiles/m3draw003.xetex.tlg
index 1d6ebef..88d544e 100644
--- a/l3trial/l3draw/testfiles/m3draw003.xetex.tlg
+++ b/l3trial/l3draw/testfiles/m3draw003.xetex.tlg
@@ -4,12 +4,14 @@ Don't change this file in any respect.
TEST 1: \draw_path_moveto:n
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 9.96265 9.96265 m}
-..\special{pdf:literal Q}
+\hbox(10.0+0.0)x10.0
+.\hbox(10.0+0.0)x10.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 9.96265 9.96265 m}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -18,12 +20,14 @@ l. ... }
TEST 2: \draw_path_lineto:n
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 9.96265 9.96265 l}
-..\special{pdf:literal Q}
+\hbox(10.0+0.0)x10.0
+.\hbox(10.0+0.0)x10.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 9.96265 9.96265 l}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -32,12 +36,14 @@ l. ... }
TEST 3: \draw_path_curveto:nnn
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 0 28.34647 28.34647 28.34647 28.34647 56.69292 c}
-..\special{pdf:literal Q}
+\hbox(28.45276+0.0)x28.45276
+.\hbox(28.45276+0.0)x28.45276
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 28.34647 28.34647 28.34647 28.34647 56.69292 c}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
@@ -46,16 +52,18 @@ l. ... }
TEST 4: \draw_path_close:
============================================================
> \box...=
-\hbox(0.0+0.0)x0.0
-.\hbox(0.0+0.0)x0.0
-..\special{pdf:literal q}
-..\special{pdf:literal 0.3985 w}
-..\special{pdf:literal 0 0 m}
-..\special{pdf:literal 0.99626 0 l}
-..\special{pdf:literal 0.99626 0.99626 l}
-..\special{pdf:literal 0 0.99626 l}
-..\special{pdf:literal h}
-..\special{pdf:literal Q}
+\hbox(1.0+0.0)x1.0
+.\hbox(1.0+0.0)x1.0
+..\glue 0.0
+..\hbox(0.0+0.0)x0.0
+...\special{pdf:literal q}
+...\special{pdf:literal 0.3985 w}
+...\special{pdf:literal 0 0 m}
+...\special{pdf:literal 0.99626 0 l}
+...\special{pdf:literal 0.99626 0.99626 l}
+...\special{pdf:literal 0 0.99626 l}
+...\special{pdf:literal h}
+...\special{pdf:literal Q}
! OK.
<argument> \l_tmpa_box
l. ... }
More information about the latex3-commits
mailing list