Skip to content

Commit 8606b49

Browse files
committed
feat: allow empty value for /pgf/arrow keys/fill
1 parent 44f8137 commit 8606b49

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

doc/generic/pgf/pgfmanual-en-tikz-arrows.tex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ \subsubsection{Coloring}
796796
filled.
797797
\end{key}
798798

799-
\begin{key}{/pgf/arrow keys/fill=\meta{color or |none|}}
799+
\begin{key}{/pgf/arrow keys/fill=\meta{color or |none| or empty}}
800800
Use this key to explicitly set the color used for filling the arrow tips.
801801
This color can be different from the color used to draw (stroke) the arrow
802802
tip:
@@ -818,6 +818,11 @@ \subsubsection{Coloring}
818818
}
819819
\end{codeexample}
820820
%
821+
If the argument is left empty or omitted altogether, no explicit fill color
822+
will be set, meaning that the fill color will be determined by whatever was
823+
used last as a fill color. In case that the ``current'' fill color is
824+
intended, it is better to explicitly use |fill=.|.
825+
821826
Note that such ``open'' arrow tips are a bit difficult to draw in some
822827
case: The problem is that the line must be shortened by just the right
823828
amount so that it ends exactly on the back end of the arrow tip. In some

tex/generic/pgf/basiclayer/pgfcorearrows.code.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,13 @@
510510
fill/.code={%
511511
\def\pgf@temp{#1}%
512512
\ifx\pgf@temp\pgf@nonetext%
513-
\pgfarrowsaddtooptions{\pgfarrowopentrue}
513+
\pgfarrowsaddtooptions{\pgfarrowopentrue}%
514+
\else\ifx\pgf@temp\pgfkeysnovalue@text%
515+
\pgfarrowsaddtooptions{\pgfarrowopenfalse}%
514516
\else
515-
\pgfarrowsaddtooptions{\pgfarrowopenfalse\def\pgf@arrows@fill@color{#1}}
516-
\fi
517+
\pgfarrowsaddtooptions{\pgfarrowopenfalse\def\pgf@arrows@fill@color{#1}}%
518+
\fi\fi
517519
},
518-
fill/.value required,
519520
open/.style={fill=none},
520521
.unknown/.code={
521522
\expandafter\pgfutil@in@\expandafter!\expandafter{\pgfkeyscurrentname}%

0 commit comments

Comments
 (0)