You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.2 KiB
48 lines
1.2 KiB
% Copyright 2006 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{tikzlibraryfadings.code.tex}
|
|
|
|
\usepgflibrary{fadings}%
|
|
|
|
%
|
|
% Environments for creating fadings
|
|
%
|
|
|
|
\def\tikzfadingfrompicture{%
|
|
\begingroup%
|
|
\setbox\pgfpic=\hbox\bgroup%
|
|
\tikzpicture%
|
|
}%
|
|
\def\endtikzfadingfrompicture{%
|
|
\global\let\tikz@smuggle=\tikz@fig@name%
|
|
\endtikzpicture
|
|
\egroup%
|
|
\pgfdeclarefading{\tikz@smuggle}{\box\pgfpic}%
|
|
\endgroup%
|
|
}%
|
|
|
|
% This makes it easier to maintain compatibility with the external lib:
|
|
\def\starttikzfadingfrompicture{\tikzfadingfrompicture}%
|
|
\def\stopttikzfadingfrompicture{\endtikzfadingfrompicture}%
|
|
|
|
\def\tikzfading[#1]{%
|
|
{%
|
|
\setbox\pgfpic=\hbox{%
|
|
\tikzset{#1}%
|
|
\global\let\tikz@smuggle=\tikz@fig@name%
|
|
\tikz{%
|
|
\useasboundingbox(0,0) (100bp,100bp);
|
|
\node at (50bp,50bp) [rotate=\tikz@shade@angle]
|
|
{\pgfuseshading{\tikz@shading}};
|
|
}%
|
|
}%
|
|
\pgfdeclarefading{\tikz@smuggle}{\box\pgfpic}%
|
|
}%
|
|
}%
|
|
|