| 1 |
% Copyright 2018 by Till Tantau |
| 2 |
% |
| 3 |
% This file may be distributed and/or modified |
| 4 |
% |
| 5 |
% 1. under the LaTeX Project Public License and/or |
| 6 |
% 2. under the GNU Public License. |
| 7 |
% |
| 8 |
% See the file doc/generic/pgf/licenses/LICENSE for more details. |
| 9 |
|
| 10 |
\ProvidesFileRCS{tikzlibraryviews.code.tex} |
| 11 |
|
| 12 |
|
| 13 |
\tikzset{ |
| 14 |
meet/.style={execute at begin scope={\tikz@lib@view@parse{meet}#1\pgf@stop},execute at end scope={\endpgfviewboxscope}}, |
| 15 |
view/.style={meet = {#1}}, |
| 16 |
slice/.style={execute at begin scope={\tikz@lib@view@parse{slice}#1\pgf@stop},execute at end scope={\endpgfviewboxscope}}, |
| 17 |
}% |
| 18 |
|
| 19 |
\def\tikz@lib@view@parse#1#2\pgf@stop{% |
| 20 |
\tikz@scan@one@point\tikz@lib@view@a#2\pgf@stop% |
| 21 |
\pgfviewboxscope{\tikz@lib@view@stored@a}{\tikz@lib@view@stored@b}{\tikz@lib@view@stored@c}{\tikz@lib@view@stored@d}{#1}% |
| 22 |
}% |
| 23 |
\def\tikz@lib@view@a#1{% |
| 24 |
\def\tikz@lib@view@stored@a{#1}% |
| 25 |
\pgfutil@ifnextchar r{\tikz@lib@view@a@rec}{\tikz@scan@one@point\tikz@lib@view@b}% |
| 26 |
}% |
| 27 |
\def\tikz@lib@view@a@rec rectangle{\tikz@scan@one@point\tikz@lib@view@b}% |
| 28 |
\def\tikz@lib@view@b#1{% |
| 29 |
\def\tikz@lib@view@stored@b{#1}% |
| 30 |
\pgfutil@ifnextchar\pgf@stop{% |
| 31 |
\let\tikz@lib@view@stored@c\tikz@lib@view@stored@a% |
| 32 |
\let\tikz@lib@view@stored@d\tikz@lib@view@stored@b% |
| 33 |
\pgfutil@gobble% |
| 34 |
}{\tikz@lib@view@b@at}% |
| 35 |
}% |
| 36 |
\def\tikz@lib@view@b@at at{\tikz@scan@one@point\tikz@lib@view@c}% |
| 37 |
\def\tikz@lib@view@c#1{% |
| 38 |
\def\tikz@lib@view@stored@c{#1}% |
| 39 |
\pgfutil@ifnextchar r{\tikz@lib@view@c@rec}{\tikz@scan@one@point\tikz@lib@view@d}% |
| 40 |
}% |
| 41 |
\def\tikz@lib@view@c@rec rectangle{\tikz@scan@one@point\tikz@lib@view@d}% |
| 42 |
\def\tikz@lib@view@d#1{\def\tikz@lib@view@stored@d{#1}\pgfutil@ifnextchar\pgf@stop\pgfutil@gobble{\tikzerror{Wrong syntax for meet or slice key}}}% |
| 43 |
|
| 44 |
|
| 45 |
\endinput |