diff --git a/doc/generic/pgf/CHANGELOG.md b/doc/generic/pgf/CHANGELOG.md index a9d8f9ade..cd9008a49 100644 --- a/doc/generic/pgf/CHANGELOG.md +++ b/doc/generic/pgf/CHANGELOG.md @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Resolve overfull hboxes >=20pt in the manual - Adapt `\graphicspath` setting for flattened doc tree #1191 - Promote warning "Plot data file \`...' not found" to error +- Allow empty value for /pgf/arrow keys/fill to make it behave more like /tikz/fill #1352 ### Contributors @@ -37,6 +38,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Qrrbrbirlbel - quark67 - Rocky Zhang (@rockyzhz) +- Romano Giannetti (@rmano) - Yukai Chou (@muzimuzhi) - Alexander Grahn - Max Chernoff diff --git a/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex b/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex index f691e350a..3844f907f 100644 --- a/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex +++ b/doc/generic/pgf/pgfmanual-en-tikz-arrows.tex @@ -796,7 +796,7 @@ \subsubsection{Coloring} filled. \end{key} -\begin{key}{/pgf/arrow keys/fill=\meta{color or |none|}} +\begin{key}{/pgf/arrow keys/fill=\meta{color} (default \normalfont is scope's color setting)} Use this key to explicitly set the color used for filling the arrow tips. This color can be different from the color used to draw (stroke) the arrow tip: @@ -818,6 +818,10 @@ \subsubsection{Coloring} } \end{codeexample} % + If the argument is left empty or omitted altogether, no explicit fill color + will be set, meaning that the fill color will be determined by whatever was used + last as a fill color in the current scope. + Note that such ``open'' arrow tips are a bit difficult to draw in some case: The problem is that the line must be shortened by just the right amount so that it ends exactly on the back end of the arrow tip. In some @@ -827,7 +831,7 @@ \subsubsection{Coloring} A shorthand for |fill=none|. \end{key} - When you use both the |color| and |fill| option, the |color| option must + When you use both the |color| and |fill| options, the |color| option must come first since it will reset the filling to the color specified for drawing. % diff --git a/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex b/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex index 7f079fa84..4e0b5abd8 100644 --- a/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex +++ b/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex @@ -510,12 +510,14 @@ fill/.code={% \def\pgf@temp{#1}% \ifx\pgf@temp\pgf@nonetext% - \pgfarrowsaddtooptions{\pgfarrowopentrue} + \pgfarrowsaddtooptions{\pgfarrowopentrue}% + \else\ifx\pgf@temp\pgfutil@empty% + \pgfarrowsaddtooptions{\pgfarrowopenfalse}% \else - \pgfarrowsaddtooptions{\pgfarrowopenfalse\def\pgf@arrows@fill@color{#1}} - \fi + \pgfarrowsaddtooptions{\pgfarrowopenfalse\def\pgf@arrows@fill@color{#1}}% + \fi\fi }, - fill/.value required, + fill/.default=, open/.style={fill=none}, .unknown/.code={ \expandafter\pgfutil@in@\expandafter!\expandafter{\pgfkeyscurrentname}%