summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/tex/tikzlibrarypatterns.code.tex
blob: 8ef495bbba91808d430989a8027a560ab28550d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% Copyright 2018 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.

\ProvidesFileRCS{tikzlibrarypatterns.code.tex}

\usepgflibrary{patterns}%

\tikzoption{pattern color}{\edef\tikz@pattern@color{#1}}%
\tikzoption{pattern}[]{%
  \edef\tikz@temp{#1}%
  \ifx\tikz@temp\tikz@nonetext%
    \tikz@addmode{\tikz@mode@fillfalse}%
  \else%
    \ifx\tikz@temp\pgfutil@empty%
    \else%
      \tikz@addoption{\pgfsetfillpattern{#1}{\tikz@pattern@color}}%
      \def\tikz@pattern{#1}%
    \fi%
    \tikz@addmode{\tikz@mode@filltrue}%
  \fi%
}%
\def\tikz@pattern@color{black}%
\def\tikz@pattern{dots}%

\endinput