summaryrefslogtreecommitdiff
path: root/graphics/pgf/base/tex/generic/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/base/tex/generic/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex')
-rw-r--r--graphics/pgf/base/tex/generic/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex45
1 files changed, 45 insertions, 0 deletions
diff --git a/graphics/pgf/base/tex/generic/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex b/graphics/pgf/base/tex/generic/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex
new file mode 100644
index 0000000000..8ced1b64f3
--- /dev/null
+++ b/graphics/pgf/base/tex/generic/frontendlayer/tikz/libraries/tikzlibraryviews.code.tex
@@ -0,0 +1,45 @@
+% 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{tikzlibraryviews.code.tex}
+
+
+\tikzset{
+ meet/.style={execute at begin scope={\tikz@lib@view@parse{meet}#1\pgf@stop},execute at end scope={\endpgfviewboxscope}},
+ view/.style={meet = {#1}},
+ slice/.style={execute at begin scope={\tikz@lib@view@parse{slice}#1\pgf@stop},execute at end scope={\endpgfviewboxscope}},
+}%
+
+\def\tikz@lib@view@parse#1#2\pgf@stop{%
+ \tikz@scan@one@point\tikz@lib@view@a#2\pgf@stop%
+ \pgfviewboxscope{\tikz@lib@view@stored@a}{\tikz@lib@view@stored@b}{\tikz@lib@view@stored@c}{\tikz@lib@view@stored@d}{#1}%
+}%
+\def\tikz@lib@view@a#1{%
+ \def\tikz@lib@view@stored@a{#1}%
+ \pgfutil@ifnextchar r{\tikz@lib@view@a@rec}{\tikz@scan@one@point\tikz@lib@view@b}%
+}%
+\def\tikz@lib@view@a@rec rectangle{\tikz@scan@one@point\tikz@lib@view@b}%
+\def\tikz@lib@view@b#1{%
+ \def\tikz@lib@view@stored@b{#1}%
+ \pgfutil@ifnextchar\pgf@stop{%
+ \let\tikz@lib@view@stored@c\tikz@lib@view@stored@a%
+ \let\tikz@lib@view@stored@d\tikz@lib@view@stored@b%
+ \pgfutil@gobble%
+ }{\tikz@lib@view@b@at}%
+}%
+\def\tikz@lib@view@b@at at{\tikz@scan@one@point\tikz@lib@view@c}%
+\def\tikz@lib@view@c#1{%
+ \def\tikz@lib@view@stored@c{#1}%
+ \pgfutil@ifnextchar r{\tikz@lib@view@c@rec}{\tikz@scan@one@point\tikz@lib@view@d}%
+}%
+\def\tikz@lib@view@c@rec rectangle{\tikz@scan@one@point\tikz@lib@view@d}%
+\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}}}%
+
+
+\endinput