[latex3-commits] [git/LaTeX3-latex3-latex3] master: Align some internal names with PostScript CTM (646cab3)
Joseph Wright
joseph.wright at morningstar2.co.uk
Sat Mar 3 18:05:25 CET 2018
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/646cab39aa731b252917247581ada0390df08e62
>---------------------------------------------------------------
commit 646cab39aa731b252917247581ada0390df08e62
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Sat Mar 3 17:05:25 2018 +0000
Align some internal names with PostScript CTM
The CTM is 'backward' compared withwat one might expect ...
>---------------------------------------------------------------
646cab39aa731b252917247581ada0390df08e62
l3experimental/l3draw/l3draw-points.dtx | 16 +++----
l3experimental/l3draw/l3draw-transforms.dtx | 66 ++++++++++++++-------------
2 files changed, 42 insertions(+), 40 deletions(-)
diff --git a/l3experimental/l3draw/l3draw-points.dtx b/l3experimental/l3draw/l3draw-points.dtx
index 4c8d29f..7480593 100644
--- a/l3experimental/l3draw/l3draw-points.dtx
+++ b/l3experimental/l3draw/l3draw-points.dtx
@@ -885,14 +885,14 @@
\@@_point_to_dim:n
{
(
- \l_@@_matrix_aa_fp * #1
- + \l_@@_matrix_ba_fp * #2
+ \l_@@_matrix_a_fp * #1
+ + \l_@@_matrix_c_fp * #2
+ \l_@@_xshift_dim
)
,
(
- \l_@@_matrix_ab_fp * #1
- + \l_@@_matrix_bb_fp * #2
+ \l_@@_matrix_b_fp * #1
+ + \l_@@_matrix_d_fp * #2
+ \l_@@_yshift_dim
)
}
@@ -925,13 +925,13 @@
\@@_point_to_dim:n
{
(
- \l_@@_matrix_aa_fp * #1
- + \l_@@_matrix_ba_fp * #2
+ \l_@@_matrix_a_fp * #1
+ + \l_@@_matrix_c_fp * #2
)
,
(
- \l_@@_matrix_ab_fp * #1
- + \l_@@_matrix_bb_fp * #2
+ \l_@@_matrix_b_fp * #1
+ + \l_@@_matrix_d_fp * #2
)
}
}
diff --git a/l3experimental/l3draw/l3draw-transforms.dtx b/l3experimental/l3draw/l3draw-transforms.dtx
index 800f7cc..86377ab 100644
--- a/l3experimental/l3draw/l3draw-transforms.dtx
+++ b/l3experimental/l3draw/l3draw-transforms.dtx
@@ -81,17 +81,19 @@
%
% \begin{variable}
% {
-% \l_@@_matrix_aa_fp, \l_@@_matrix_ab_fp,
-% \l_@@_matrix_ba_fp, \l_@@_matrix_aa_fp,
+% \l_@@_matrix_a_fp,
+% \l_@@_matrix_b_fp,
+% \l_@@_matrix_c_fp,
+% \l_@@_matrix_a_fp,
% \l_@@_xshift_dim,
% \l_@@_yshift_dim
% }
% The active matrix and shifts.
% \begin{macrocode}
-\fp_new:N \l_@@_matrix_aa_fp
-\fp_new:N \l_@@_matrix_ab_fp
-\fp_new:N \l_@@_matrix_ba_fp
-\fp_new:N \l_@@_matrix_bb_fp
+\fp_new:N \l_@@_matrix_a_fp
+\fp_new:N \l_@@_matrix_b_fp
+\fp_new:N \l_@@_matrix_c_fp
+\fp_new:N \l_@@_matrix_d_fp
\dim_new:N \l_@@_xshift_dim
\dim_new:N \l_@@_yshift_dim
% \end{macrocode}
@@ -102,10 +104,10 @@
% \begin{macrocode}
\cs_new_protected:Npn \draw_transform_matrix_reset:
{
- \fp_set:Nn \l_@@_matrix_aa_fp { 1 }
- \fp_zero:N \l_@@_matrix_ab_fp
- \fp_zero:N \l_@@_matrix_ba_fp
- \fp_set:Nn \l_@@_matrix_bb_fp { 1 }
+ \fp_set:Nn \l_@@_matrix_a_fp { 1 }
+ \fp_zero:N \l_@@_matrix_b_fp
+ \fp_zero:N \l_@@_matrix_c_fp
+ \fp_set:Nn \l_@@_matrix_d_fp { 1 }
}
\cs_new_protected:Npn \draw_transform_shift_reset:
{
@@ -126,16 +128,16 @@
% \begin{macrocode}
\cs_new_protected:Npn \draw_transform_matrix:nnnn #1#2#3#4
{
- \fp_set:Nn \l_@@_matrix_aa_fp {#1}
- \fp_set:Nn \l_@@_matrix_ab_fp {#2}
- \fp_set:Nn \l_@@_matrix_ba_fp {#3}
- \fp_set:Nn \l_@@_matrix_bb_fp {#4}
+ \fp_set:Nn \l_@@_matrix_a_fp {#1}
+ \fp_set:Nn \l_@@_matrix_b_fp {#2}
+ \fp_set:Nn \l_@@_matrix_c_fp {#3}
+ \fp_set:Nn \l_@@_matrix_d_fp {#4}
\bool_lazy_all:nTF
{
- { \fp_compare_p:nNn \l_@@_matrix_aa_fp = \c_one_fp }
- { \fp_compare_p:nNn \l_@@_matrix_ab_fp = \c_zero_fp }
- { \fp_compare_p:nNn \l_@@_matrix_ba_fp = \c_zero_fp }
- { \fp_compare_p:nNn \l_@@_matrix_bb_fp = \c_one_fp }
+ { \fp_compare_p:nNn \l_@@_matrix_a_fp = \c_one_fp }
+ { \fp_compare_p:nNn \l_@@_matrix_b_fp = \c_zero_fp }
+ { \fp_compare_p:nNn \l_@@_matrix_c_fp = \c_zero_fp }
+ { \fp_compare_p:nNn \l_@@_matrix_d_fp = \c_one_fp }
}
{ \bool_set_false:N \l_@@_matrix_active_bool }
{ \bool_set_true:N \l_@@_matrix_active_bool }
@@ -178,10 +180,10 @@
\use:x
{
\draw_transform_matrix:nnnn
- { #1 * \l_@@_matrix_aa_fp + #2 * \l_@@_matrix_ba_fp }
- { #1 * \l_@@_matrix_ab_fp + #2 * \l_@@_matrix_bb_fp }
- { #3 * \l_@@_matrix_aa_fp + #4 * \l_@@_matrix_ba_fp }
- { #3 * \l_@@_matrix_ab_fp + #4 * \l_@@_matrix_bb_fp }
+ { #1 * \l_@@_matrix_a_fp + #2 * \l_@@_matrix_c_fp }
+ { #1 * \l_@@_matrix_b_fp + #2 * \l_@@_matrix_d_fp }
+ { #3 * \l_@@_matrix_a_fp + #4 * \l_@@_matrix_c_fp }
+ { #3 * \l_@@_matrix_b_fp + #4 * \l_@@_matrix_d_fp }
}
}
\cs_new_protected:Npn \draw_transform_shift_concat:n #1
@@ -216,8 +218,8 @@
{
1 /
(
- \l_@@_matrix_aa_fp * \l_@@_matrix_bb_fp
- - \l_@@_matrix_ab_fp * \l_@@_matrix_ba_fp
+ \l_@@_matrix_a_fp * \l_@@_matrix_d_fp
+ - \l_@@_matrix_b_fp * \l_@@_matrix_c_fp
)
}
}
@@ -225,14 +227,14 @@
}
\cs_new_protected:Npn \@@_transform_invert:n #1
{
- \fp_set:Nn \l_@@_matrix_aa_fp
- { \l_@@_matrix_bb_fp * #1 }
- \fp_set:Nn \l_@@_matrix_ab_fp
- { -\l_@@_matrix_ab_fp * #1 }
- \fp_set:Nn \l_@@_matrix_ba_fp
- { -\l_@@_matrix_ba_fp * #1 }
- \fp_set:Nn \l_@@_matrix_bb_fp
- { \l_@@_matrix_aa_fp * #1 }
+ \fp_set:Nn \l_@@_matrix_a_fp
+ { \l_@@_matrix_d_fp * #1 }
+ \fp_set:Nn \l_@@_matrix_b_fp
+ { -\l_@@_matrix_b_fp * #1 }
+ \fp_set:Nn \l_@@_matrix_c_fp
+ { -\l_@@_matrix_c_fp * #1 }
+ \fp_set:Nn \l_@@_matrix_d_fp
+ { \l_@@_matrix_a_fp * #1 }
}
\cs_generate_variant:Nn \@@_transform_invert:n { f }
\cs_new_protected:Npn \draw_transform_shift_invert:
More information about the latex3-commits
mailing list