blob: 6225c5abc21f37b9317be19addd19392b6c34952 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
% 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 $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-dvisvgm.def,v 1.3 2013/08/23 09:50:22 tantau Exp $
% Driver commands for dvisvgm
%
% Load common pdf commands:
%
\input pgfsys-common-svg.def
\def\pgfsys@invoke#1{{\let\#\pgf@sys@svg@hash\special{dvisvgm:raw #1}}}
\def\pgfsys@beginpicture{\pgfsys@invoke{<g transform="translate({?x},{?y}) scale(1,-1)">}}
\def\pgfsys@endpicture{\pgfsys@invoke{</g>}}
\def\pgfsys@svg@newline{{?nl}}
\def\pgfsys@hbox#1{%
{%
\setbox#1=\hbox{\box#1}%
\wd#1=0pt%
\ht#1=0pt%
\dp#1=0pt%
\pgfsetcolor{.}%
\pgfsys@invoke{<g stroke="none" transform="scale(-1,1) translate({?x},{?y}) scale(-1,-1)">}\box#1\pgfsys@invoke{</g>}%
}%
}
\def\pgfsys@shadingoutsidepgfpicture#1{%
\begingroup%
#1%
\setbox\pgfpic=\hbox to0pt{%
\pgfsys@beginpicture%
\pgfsys@beginscope%
\pgf@sys@svg@sh@defs%
\pgf@sys@svg@sh%
\pgfsys@endscope%
\pgfsys@endpicture%
\hss%
}%
\pgf@process{\pgf@sys@svg@pos}%
\pgf@picminx=0pt%
\pgf@picminy=0pt%
\pgf@picmaxx=\pgf@x%
\pgf@picmaxy=\pgf@y%
\def\pgf@trimleft@final{0pt}%
\def\pgf@trimright@final{0pt}%
\def\pgf@shift@baseline{0pt}%
\pgfsys@typesetpicturebox\pgfpic%
\endgroup%
}
\def\pgfsys@shadinginsidepgfpicture#1{%
#1%
\pgf@sys@svg@sh@defs% hmmm....
\pgf@process{\pgf@sys@svg@pos}
\pgf@xa=-.5\pgf@x%
\pgf@ya=-.5\pgf@y%
\pgfsysprotocol@literal{<g transform="translate(\pgf@sys@tonumber{\pgf@xa},\pgf@sys@tonumber{\pgf@ya})">}%
\pgf@sys@svg@sh%
\pgfsysprotocol@literal{</g>}%
}
\endinput
%%% Local Variables:
%%% mode: latex
%%% End:
|