summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx331
1 files changed, 121 insertions, 210 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index 5ccd56959c7..8b5aa7d53c1 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -22,10 +22,6 @@
%
%<*driver>
\documentclass[full,kernel]{l3doc}
-%</driver>
-%<*driver|package>
-%</driver|package>
-%<*driver>
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -45,7 +41,7 @@
% }^^A
% }
%
-% \date{Released 2017/12/16}
+% \date{Released 2018/02/21}
%
% \maketitle
%
@@ -126,20 +122,50 @@
%
% \section{Color support}
%
-% \begin{function}[added = 2017-10-25]
-% {\__driver_color_select:n, \__driver_color_select:V}
+% \begin{function}[added = 2018-02-20]{\driver_color_cmyk:nnnn}
+% \begin{syntax}
+% \cs{driver_color_cmyk:nnnn} \Arg{cyan} \Arg{magenta} \Arg{yellow}
+% \Arg{black}
+% \end{syntax}
+% Sets the color to the CMYK values specified, all of which are
+% fp denotations in the range $0$ and $1$. For drawing colors, see
+% \cs{driver_draw_color_cmyk:nnnn}, \emph{etc.}
+% \end{function}
+%
+% \begin{function}[added = 2018-02-20]{\driver_color_gray:n}
+% \begin{syntax}
+% \cs{driver_color_gray:n} \Arg{gray}
+% \end{syntax}
+% Sets the color to the grayscale value specified, which is
+% fp denotations in the range $0$ and $1$. For drawing colors, see
+% \cs{driver_draw_color_gray:n}, \emph{etc.}
+% \end{function}
+%
+% \begin{function}[added = 2018-02-20]{\driver_color_rgb:nnn}
% \begin{syntax}
-% \cs{__driver_color_select:n} \Arg{color}
+% \cs{driver_color_rgb:nnn} \Arg{red} \Arg{green} \Arg{blue}
% \end{syntax}
-% Selects the \meta{color} (which is given in low-level format: a
-% \meta{model} followed by a space and one or more space-separated
-% axes).
+% Sets the color to the RGB values specified, all of which are
+% fp denotations in the range $0$ and $1$. For drawing colors, see
+% \cs{driver_draw_color_rgb:nnn}, \emph{etc.}
% \end{function}
%
-% \begin{function}[added = 2017-10-25]
-% {\__driver_color_pickup:N}
+% \begin{function}[added = 2018-02-20]{\driver_color_reset:}
% \begin{syntax}
-% \cs{__driver_color_pickup:N} \meta{tl}
+% \cs{driver_color_reset:}
+% \end{syntax}
+% Resets the active color to that before a call to
+% \cs{driver_color_\meta{model}:n(nnn)}. This function should be inserted
+% after the \TeX{} group setting a color, \emph{i.e.}~normally
+% \begin{verbatim}
+% % Use of \driver_color_rgb:nnn, etc.
+% \group_insert_after:N \driver_color_reset:
+% \end{verbatim}
+% \end{function}
+%
+% \begin{function}[added = 2018-02-20]{\driver_color_pickup:N}
+% \begin{syntax}
+% \cs{driver_color_pickup:N} \meta{tl}
% \end{syntax}
% In \LaTeXe{} package mode, collects data on the current color from
% \tn{current@color} and stores it in the low-level format used by \pkg{expl3}
@@ -383,11 +409,11 @@
% \driver_draw_stroke_cmyk:nnnn
% }
% \begin{syntax}
-% \cs{driver_draw_color_cmyk:nnnn} \Arg{cyan} \Arg{magneta} \Arg{yellow}
+% \cs{driver_draw_color_cmyk:nnnn} \Arg{cyan} \Arg{magenta} \Arg{yellow}
% \Arg{black}
% \end{syntax}
% Sets the color for drawing to the CMYK values specified, all of which are
-% fp expressions which should evaluate to between $0$ and $1$. The
+% fp denotations in the range $0$ and $1$. The
% \texttt{fill} and \texttt{stroke} versions set only the color for those
% operations. Note that the general setting is more efficient with some
% drivers so should in most cases be preferred.
@@ -403,7 +429,7 @@
% \cs{driver_draw_color_gray:n} \Arg{gray}
% \end{syntax}
% Sets the color for drawing to the grayscale value specified, which is
-% fp expressions which should evaluate to between $0$ and $1$. The
+% fp denotations in the range $0$ and $1$. The
% \texttt{fill} and \texttt{stroke} versions set only the color for those
% operations. Note that the general setting is more efficient with some
% drivers so should in most cases be preferred.
@@ -419,7 +445,7 @@
% \cs{driver_draw_color_rgb:nnn} \Arg{red} \Arg{green} \Arg{blue}
% \end{syntax}
% Sets the color for drawing to the RGB values specified, all of which are
-% fp expressions which should evaluate to between $0$ and $1$. The
+% fp denotations in the range $0$ and $1$. The
% \texttt{fill} and \texttt{stroke} versions set only the color for those
% operations. Note that the general setting is more efficient with some
% drivers so should in most cases be preferred.
@@ -521,18 +547,19 @@
%<*dvisvgm|dvipdfmx|dvips|xdvipdfmx>
% \end{macrocode}
%
-% \begin{macro}{\@@_color_pickup:N}
+% \begin{macro}{\driver_color_pickup:N}
+% \begin{macro}{\@@_color_pickup:w}
% Allow for \LaTeXe{} color. Here, the possible input values are limited:
% \texttt{dvips}-style colors can mainly be taken as-is with the exception
% spot ones (here we need a model and a tint).
% \begin{macrocode}
%<*package>
-\cs_new_protected:Npn \@@_color_pickup:N #1 { }
+\cs_new_protected:Npn \driver_color_pickup:N #1 { }
\AtBeginDocument
{
\@ifpackageloaded { color }
{
- \cs_set_protected:Npn \@@_color_pickup:N #1
+ \cs_set_protected:Npn \driver_color_pickup:N #1
{
\exp_args:NV \tl_if_head_is_space:nTF \current@color
{
@@ -542,9 +569,9 @@
\exp_after:wN \use:n \current@color \c_space_tl 1
}
}
- { \exp_after:wN \@@_color_pickup_aux:w \current@color \q_stop #1 }
+ { \exp_after:wN \@@_color_pickup:w \current@color \q_stop #1 }
}
- \cs_new_protected:Npn \@@_color_pickup_aux:w #1 ~ #2 \q_stop #3
+ \cs_new_protected:Npn \@@_color_pickup:w #1 ~ #2 \q_stop #3
{ \tl_set:Nn #3 { #1 ~ #2 } }
}
{ }
@@ -552,36 +579,27 @@
%</package>
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
-% \begin{macro}{\@@_color_select:n, \@@_color_select:V}
-% \begin{macro}[EXP]{\@@_convert_model:w}
-% \begin{macro}[EXP]{\@@_color_convert_spot:}
-% \begin{macro}[EXP]{\@@_color_convert_spot:w}
-% \begin{macro}{\@@_color_reset:}
-% Mainly no conversation but a little work with \texttt{spot} colors as they
-% can't have a tint level here! The easy route of just picking up
-% \texttt{spot} as a model won't work as there could be additional models
-% created for mixing named colors. (They would not be supported at the moment,
-% but still need to be handled.)
+% \begin{macro}{\driver_color_cmyk:nnnn}
+% \begin{macro}{\driver_color_gray:n}
+% \begin{macro}{\driver_color_rgb:nnn}
+% \begin{macro}{\driver_color_spot:nn}
+% \begin{macro}{\@@_color_select:n}
+% \begin{macro}{\driver_color_reset:}
+% Simply dump the data.
% \begin{macrocode}
+\cs_new_protected:Npn \driver_color_cmyk:nnnn #1#2#3#4
+ { \@@_color_select:n { cmyk~ #1 ~ #2 ~ #3 ~ #4 } }
+\cs_new_protected:Npn \driver_color_gray:n #1
+ { \@@_color_select:n { gray~ #1 } }
+\cs_new_protected:Npn \driver_color_rgb:nnn #1#2#3
+ { \@@_color_select:n { rgb~ #1 ~ #2 ~ #3 } }
+\cs_new_protected:Npn \driver_color_spot:nn #1#2
+ { \@@_color_select:n { color~push~\c_space_tl #1 } }
\cs_new_protected:Npn \@@_color_select:n #1
- {
- \tex_special:D
- {
- color~push~
- \cs_if_exist_use:cF
- { @@_color_convert_ \@@_convert_model:w #1 \q_stop :n }
- { \use:n }
- {#1}
- }
- }
-\cs_generate_variant:Nn \@@_color_select:n { V }
-\cs_new:Npn \@@_convert_model:w #1 ~ #2 \q_stop {#1}
-\cs_new:Npn \@@_color_convert_spot:n #1
- { \@@_color_convert_spot:w #1 \q_stop }
-\cs_new:Npn \@@_color_convert_spot:w #1 ~ #2 ~ #3 \q_stop
- { \c_space_tl #2 }
-\cs_new_protected:Npn \@@_color_reset:
+ { \tex_special:D { color~push~ #1 } }
+\cs_new_protected:Npn \driver_color_reset:
{ \tex_special:D { color~pop } }
% \end{macrocode}
% \end{macro}
@@ -589,6 +607,7 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
%</dvisvgm|dvipdfmx|dvips|xdvipdfmx>
@@ -600,27 +619,27 @@
%<*pdfmode>
% \end{macrocode}
%
-% \begin{macro}{\@@_color_pickup:N}
-% \begin{macro}{\@@_color_pickup_aux:w}
+% \begin{macro}{\driver_color_pickup:N}
+% \begin{macro}{\@@_color_pickup:w}
% The current color in driver-dependent format: pick up the package-mode
% data if available. We end up converting back and forward in this route as
% we store our color data in \texttt{dvips} format.
% The \tn{current@color} needs to be \texttt{x}-expanded before
-% \cs{@@_color_pickup_aux:w} breaks it apart, because for instance
+% \cs{@@_color_pickup:w} breaks it apart, because for instance
% \pkg{xcolor} sets it to be instructions to generate a colour
% \begin{macrocode}
%<*package>
-\cs_new_protected:Npn \@@_color_pickup:N #1 { }
+\cs_new_protected:Npn \driver_color_pickup:N #1 { }
\AtBeginDocument
{
\@ifpackageloaded { color }
{
- \cs_set_protected:Npn \@@_color_pickup:N #1
+ \cs_set_protected:Npn \driver_color_pickup:N #1
{
- \exp_last_unbraced:Nx \@@_color_pickup_aux:w
+ \exp_last_unbraced:Nx \@@_color_pickup:w
{ \current@color } ~ 0 ~ 0 ~ 0 \q_stop #1
}
- \cs_new_protected:Npn \@@_color_pickup_aux:w
+ \cs_new_protected:Npn \@@_color_pickup:w
#1 ~ #2 ~ #3 ~ #4 ~ #5 ~ #6 \q_stop #7
{
\str_if_eq:nnTF {#2} { g }
@@ -659,47 +678,30 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_color_select:n, \@@_color_select:V}
-% \begin{macro}[EXP]{\@@_color_convert:w}
-% \begin{macro}[EXP]
-% {
-% \@@_color_convert_gray:w ,
-% \@@_color_convert_cmyk:w ,
-% \@@_color_convert_rgb:w ,
-% \@@_color_convert_spot:w
-% }
-% \begin{macro}{\@@_color_reset:}
-% There is a dedicated primitive/primitive interface for setting colors.
-% As with scoping, this approach is not suitable for cached operations.
-% Most of the conversions are trivial but the need to cover spot colors
-% makes life slightly more interesting.
-% \begin{macrocode}
+% \begin{macro}{\driver_color_cmyk:nnnn}
+% \begin{macro}{\driver_color_gray:n}
+% \begin{macro}{\driver_color_rgb:nnn}
+% \begin{macro}{\driver_color_spot:nn}
+% \begin{macro}{\@@_color_select:n}
+% \begin{macro}{\driver_color_reset:}
+% Simply dump the data, but allowing for \LuaTeX{}.
+% \begin{macrocode}
+\cs_new_protected:Npn \driver_color_cmyk:nnnn #1#2#3#4
+ { \@@_color_select:n { #1 ~ #2 ~ #3 ~ #4 ~ k ~ #1 ~ #2 ~ #3 ~ #4 ~ K } }
+\cs_new_protected:Npn \driver_color_gray:n #1
+ { \@@_color_select:n { #1 ~ g ~ #1 ~ G } }
+\cs_new_protected:Npn \driver_color_rgb:nnn #1#2#3
+ { \@@_color_select:n { #1 ~ #2 ~ #3 ~ rg ~ #1 ~ #2 ~ #3 ~ RG } }
+\cs_new_protected:Npn \driver_color_spot:nn #1#2
+ { \@@_color_select:n { /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ sc ~ #2 ~ SC } }
\cs_new_protected:Npx \@@_color_select:n #1
{
\cs_if_exist:NTF \luatex_pdfextension:D
{ \luatex_pdfextension:D colorstack }
{ \pdftex_pdfcolorstack:D }
- \exp_not:N \l_@@_color_stack_int push
- {
- \exp_not:N \@@_color_convert:w
- #1
- \exp_not:N \q_stop
- }
- }
-\cs_generate_variant:Nn \@@_color_select:n { V }
-\cs_new:Npn \@@_color_convert:w #1 ~ #2 \q_stop
- { \use:c { @@_color_convert_ #1 :w } #2 \q_stop }
-\cs_new:Npn \@@_color_convert_gray:w #1 \q_stop
- { #1 ~ g ~ #1 ~ G }
-\cs_new:Npn \@@_color_convert_cmyk:w #1 \q_stop
- { #1 ~ k ~ #1 ~ K }
-\cs_new:Npn \@@_color_convert_rgb:w #1 \q_stop
- { #1 ~ rg ~ #1 ~ RG }
-\cs_new:Npn \@@_color_convert_spot:w #1 ~ #2 \q_stop
- {
- /#1 ~ cs ~ /#1 ~ CS ~ #2 ~ sc ~ #2 ~ SC
+ \exp_not:N \l_@@_color_stack_int push {#1}
}
-\cs_new_protected:Npx \@@_color_reset:
+\cs_new_protected:Npx \driver_color_reset:
{
\cs_if_exist:NTF \luatex_pdfextension:D
{ \luatex_pdfextension:D colorstack }
@@ -711,6 +713,8 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macrocode}
%</pdfmode>
@@ -1107,7 +1111,7 @@
{ \dim_to_decimal_in_bp:n {#1} ~ setlinewidth }
}
\cs_new_protected:Npn \driver_draw_miterlimit:n #1
- { \@@_draw_literal:x { \fp_eval:n {#1} ~ setmiterlimit } }
+ { \@@_draw_literal:n { #1 ~ setmiterlimit } }
\cs_new_protected:Npn \driver_draw_cap_butt:
{ \@@_draw_literal:n { 0 ~ setlinecap } }
\cs_new_protected:Npn \driver_draw_cap_round:
@@ -1158,81 +1162,42 @@
}
\cs_new_protected:Npn \driver_draw_color_cmyk:nnnn #1#2#3#4
{
- \@@_draw_literal:x
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
- setcmykcolor ~
- }
+ \@@_draw_literal:n { #1 ~ #2 ~ #3 ~ #4 ~ setcmykcolor }
\@@_draw_color_reset:
}
\cs_new_protected:Npn \driver_draw_fill_cmyk:nnnn #1#2#3#4
{
- \@@_draw_literal:x
- {
- /l3fc ~
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
- setcmykcolor
- } ~
- def
- }
+ \@@_draw_literal:n
+ { /l3fc ~ { #1 ~ #2 ~ #3 ~ #4 ~ setcmykcolor ~ } ~ def }
}
\cs_new_protected:Npn \driver_draw_stroke_cmyk:nnnn #1#2#3#4
{
- \@@_draw_literal:x
- {
- /l3sc ~
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
- setcmykcolor
- } ~
- def
- }
+ \@@_draw_literal:n
+ { /l3sc ~ { #1 ~ #2 ~ #3 ~ #4 ~ setcmykcolor ~ } ~ def }
}
\cs_new_protected:Npn \driver_draw_color_gray:n #1
{
- \@@_draw_literal:x { fp_eval:n {#1} ~ setgray }
+ \@@_draw_literal:n { #1 ~ setgray }
\@@_draw_color_reset:
}
\cs_new_protected:Npn \driver_draw_fill_gray:n #1
- { \@@_draw_literal:x { /l3fc ~ { \fp_eval:n {#1} ~ setgray } ~ def } }
+ { \@@_draw_literal:n { /l3fc ~ { #1 ~ setgray } ~ def } }
\cs_new_protected:Npn \driver_draw_stroke_gray:n #1
- { \@@_draw_literal:x { /l3sc ~ { \fp_eval:n {#1} ~ setgray } ~ def } }
+ { \@@_draw_literal:n { /l3sc ~ { #1 ~ setgray } ~ def } }
\cs_new_protected:Npn \driver_draw_color_rgb:nnn #1#2#3
{
- \@@_draw_literal:x
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~
- setrgbcolor
- }
+ \@@_draw_literal:n { #1 ~ #2 ~ #3 ~ setrgbcolor }
\@@_draw_color_reset:
}
\cs_new_protected:Npn \driver_draw_fill_rgb:nnn #1#2#3
{
- \@@_draw_literal:x
- {
- /l3fc ~
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~
- setrgbcolor
- } ~
- def
- }
+ \@@_draw_literal:n
+ { /l3fc ~ { #1 ~ #2 ~ #3 ~ setrgbcolor } ~ def }
}
\cs_new_protected:Npn \driver_draw_stroke_rgb:nnn #1#2#3
{
- \@@_draw_literal:x
- {
- /l3sc ~
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~
- setrgbcolor
- } ~
- def
- }
+ \@@_draw_literal:n
+ { /l3sc ~ { #1 ~ #2 ~ #3 ~ setrgbcolor } ~ def }
}
% \end{macrocode}
% \end{macro}
@@ -1250,8 +1215,7 @@
\@@_draw_literal:x
{
[
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
+ #1 ~ #2 ~ #3 ~ #4 ~
\dim_to_decimal_in_bp:n {#5} ~ \dim_to_decimal_in_bp:n {#6} ~
] ~
concat
@@ -2067,7 +2031,7 @@
{ \dim_to_decimal_in_bp:n {#1} ~ w }
}
\cs_new_protected:Npn \driver_draw_miterlimit:n #1
- { \@@_draw_literal:x { \fp_eval:n {#1} ~ M } }
+ { \@@_draw_literal:x { #1 ~ M } }
\cs_new_protected:Npn \driver_draw_cap_butt:
{ \@@_draw_literal:n { 0 ~ J } }
\cs_new_protected:Npn \driver_draw_cap_round:
@@ -2093,103 +2057,51 @@
% \driver_draw_fill_cmyk:nnnn ,
% \driver_draw_stroke_cmyk:nnnn
% }
-% \begin{macro}{\@@_draw_color_cmyk_aux:nnnn}
% \begin{macro}
% {
% \driver_draw_color_gray:n ,
% \driver_draw_fill_gray:n ,
% \driver_draw_stroke_gray:n
% }
-% \begin{macro}{\@@_draw_color_gray_aux:n}
% \begin{macro}
% {
% \driver_draw_color_rgb:nnn ,
% \driver_draw_fill_rgb:nnn ,
% \driver_draw_stroke_rgb:nnn
% }
-% \begin{macro}{\@@_draw_color_rgb_aux:nnn}
% Yet more fast conversion, all using the FPU to allow for expressions
% in numerical input.
% \begin{macrocode}
\cs_new_protected:Npn \driver_draw_color_cmyk:nnnn #1#2#3#4
{
- \use:x
- {
- \@@_draw_color_cmyk_aux:nnnn
- { \fp_eval:n {#1} }
- { \fp_eval:n {#2} }
- { \fp_eval:n {#3} }
- { \fp_eval:n {#4} }
- }
- }
-\cs_new_protected:Npn \@@_draw_color_cmyk_aux:nnnn #1#2#3#4
- {
\@@_draw_literal:n
{ #1 ~ #2 ~ #3 ~ #4 ~ k ~ #1 ~ #2 ~ #3 ~ #4 ~ K }
}
\cs_new_protected:Npn \driver_draw_fill_cmyk:nnnn #1#2#3#4
{
- \@@_draw_literal:x
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
- k
- }
+ \@@_draw_literal:n { #1 ~ #2 ~ #3 ~ #4 ~ k }
}
\cs_new_protected:Npn \driver_draw_stroke_cmyk:nnnn #1#2#3#4
- {
- \@@_draw_literal:x
- {
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
- K
- }
- }
+ { \@@_draw_literal:n { #1 ~ #2 ~ #3 ~ #4 ~ K } }
\cs_new_protected:Npn \driver_draw_color_gray:n #1
- {
- \use:x
- { \@@_draw_color_gray_aux:n { \fp_eval:n {#1} } }
- }
-\cs_new_protected:Npn \@@_draw_color_gray_aux:n #1
- {
- \@@_draw_literal:n { #1 ~ g ~ #1 ~ G }
- }
+ { \@@_draw_literal:n { #1 ~ g ~ #1 ~ G } }
\cs_new_protected:Npn \driver_draw_fill_gray:n #1
- { \@@_draw_literal:x { \fp_eval:n {#1} ~ g } }
+ { \@@_draw_literal:n { #1 ~ g } }
\cs_new_protected:Npn \driver_draw_stroke_gray:n #1
- { \@@_draw_literal:x { \fp_eval:n {#1} ~ G } }
+ { \@@_draw_literal:n { #1 ~ G } }
\cs_new_protected:Npn \driver_draw_color_rgb:nnn #1#2#3
{
- \use:x
- {
- \@@_draw_color_rgb_aux:nnn
- { \fp_eval:n {#1} }
- { \fp_eval:n {#2} }
- { \fp_eval:n {#3} }
- }
- }
-\cs_new_protected:Npn \@@_draw_color_rgb_aux:nnn #1#2#3
- {
\@@_draw_literal:n
{ #1 ~ #2 ~ #3 ~ rg ~ #1 ~ #2 ~ #3 ~ RG }
}
\cs_new_protected:Npn \driver_draw_fill_rgb:nnn #1#2#3
- {
- \@@_draw_literal:x
- { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ rg }
- }
+ { \@@_draw_literal:n { #1 ~ #2 ~ #3 ~ rg } }
\cs_new_protected:Npn \driver_draw_stroke_rgb:nnn #1#2#3
- {
- \@@_draw_literal:x
- { \fp_eval:n {#1} ~ \fp_eval:n {#2} ~ \fp_eval:n {#3} ~ RG }
- }
+ { \@@_draw_literal:n { #1 ~ #2 ~ #3 ~ RG } }
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
%
% \begin{macro}{\driver_draw_transformcm:nnnnnn}
% The first four arguments here are floats (the affine matrix), the last
@@ -2200,8 +2112,7 @@
{
\@@_draw_literal:x
{
- \fp_eval:n {#1} ~ \fp_eval:n {#2} ~
- \fp_eval:n {#3} ~ \fp_eval:n {#4} ~
+ #1 ~ #2 ~ #3 ~ #4 ~
\dim_to_decimal_in_bp:n {#5} ~ \dim_to_decimal_in_bp:n {#6} ~
cm
}
@@ -2717,7 +2628,7 @@
\cs_new_protected:Npn \driver_draw_linewidth:n #1
{ \@@_draw_scope:x { stroke-width=" \dim_to_decimal:n {#1} " } }
\cs_new_protected:Npn \driver_draw_miterlimit:n #1
- { \@@_draw_scope:x { stroke-miterlimit=" \fp_eval:n {#1} " } }
+ { \@@_draw_scope:x { stroke-miterlimit=" #1 " } }
\cs_new_protected:Npn \driver_draw_cap_butt:
{ \@@_draw_scope:n { stroke-linecap="butt" } }
\cs_new_protected:Npn \driver_draw_cap_round: