summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def36
1 files changed, 28 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
index f7864d34070..016f909d24f 100644
--- a/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
+++ b/Master/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-tex4ht.def
@@ -1,4 +1,4 @@
-\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-tex4ht.def,v 1.8 2005/08/13 18:59:56 tantau Exp $
+\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/systemlayer/pgfsys-tex4ht.def,v 1.9 2005/11/15 17:46:37 tantau Exp $
% Copyright 2005 by Till Tantau <tantau@cs.tu-berlin.de>.
%
@@ -57,16 +57,36 @@
\ifdim\pgf@y<1pt%
\pgf@y=1pt%
\fi%
+ \pgf@xc=\pgf@x%
+ \pgf@yc=\pgf@y%
+ \pgfsysprotocol@flushcurrentprotocol%
\HCode{<object data="\jobname-\the\pgf@sys@svg@picnum.svg"
- width="\the\pgf@x" height="\the\pgf@y"
- type="image/svg+xml"><p>SVG-Viewer needed.</p></object>}%
+ width="}%
+ % Calculate pixel coordinates (this does not really make sense, but
+ % we have to do it anyway). Assume 96dpi.
+ \pgf@x=1.3333333\pgf@x%
+ \pgf@y=1.3333333\pgf@y%
+ % Add one pixel for security:
+ \advance\pgf@x by1pt%
+ \advance\pgf@y by1pt%
+ \pgf@sys@pt\pgf@x%
+ \pgfsysprotocol@flushcurrentprotocol%
+ \pgfsys@invoke{" height="}%
+ \pgf@sys@pt\pgf@y%
+ \pgfsysprotocol@flushcurrentprotocol%
+ \pgfsys@invoke{" type="image/svg+xml"><p>SVG-Viewer needed.</p></object>}%
\special{t4ht>\jobname-\the\pgf@sys@svg@picnum.svg}%
- \pgfsys@invoke{<svg width="\the\pgf@x" height="\the\pgf@y" viewBox="}%
- \pgf@sys@pt{\pgf@xa}\pgf@sys@pt{\pgf@ya}\pgf@sys@pt{\pgf@x}\pgf@sys@pt{\pgf@y}%
+ \pgfsys@invoke{<svg xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink" width="\the\pgf@xc"
+ height="\the\pgf@yc" viewBox="}%
+ \pgf@sys@pt{\pgf@xa}\pgf@sys@pt{\pgf@ya}\pgf@sys@pt{\pgf@xc}\pgf@sys@pt{\pgf@yc}%
\pgfsysprotocol@flushcurrentprotocol%
\pgf@ya=-\pgf@ya%
- \pgfsys@invoke{">\Hnewline <g transform="translate(0,\the\pgf@yb) scale(1,-1)
- translate(0,\the\pgf@ya)">\Hnewline }%
+ \pgfsys@invoke{">\Hnewline <g transform="translate(0,}
+ \pgf@sys@pt\pgf@yb\pgfsysprotocol@flushcurrentprotocol%
+ \pgfsys@invoke{) scale(1,-1) translate(0,}%
+ \pgf@sys@pt\pgf@ya\pgfsysprotocol@flushcurrentprotocol%
+ \pgfsys@invoke{)">\Hnewline }%
\setlength\pgf@x{\pgf@shift@baseline}%
\advance\pgf@x by-\pgf@picminy\relax%
\advance\pgf@picmaxy by-\pgf@picminy\relax% maxy is now the height
@@ -92,7 +112,7 @@
\fi% tweak for TikZ
\HCode{<text
style="stroke:none"
- transform="scale(1,-1) translate(\the\pgf@x,0pt)"
+ transform="scale(1,-1) translate(\pgf@sys@tonumber{\pgf@x},0)"
text-anchor="middle"
}%
\ifx\f@size\@empty%