diff options
author | Karl Berry <karl@freefriends.org> | 2007-06-17 23:22:38 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-06-17 23:22:38 +0000 |
commit | 5c5c7843fbd37c6960799b6e1a32d5948966316c (patch) | |
tree | ea73f6b5ba799656992ebe2f34beccd2555f1342 /Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex | |
parent | f0c1f4cdb9fad83f293fd91d194538425f9f7633 (diff) |
pgf 1.18 (15jun07)
git-svn-id: svn://tug.org/texlive/trunk@4459 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex')
-rw-r--r-- | Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex | 123 |
1 files changed, 87 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex index a3bb4b05cef..286ac78c216 100644 --- a/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex +++ b/Master/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex @@ -7,7 +7,7 @@ % % See the file doc/generic/pgf/licenses/LICENSE for more details. -\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorescopes.code.tex,v 1.20 2006/10/23 08:38:17 tantau Exp $ +\ProvidesFileRCS $Header: /cvsroot/pgf/pgf/generic/pgf/basiclayer/pgfcorescopes.code.tex,v 1.24 2007/06/07 07:41:10 tantau Exp $ % Globals @@ -150,7 +150,7 @@ \def\pgf@text@options{#1}% \pgf@maketext\pgf@after@text} \def\pgf@after@text{% - { + {% \def\pgf@text@hshift{center}% \def\pgf@text@vshift{center}% \def\pgf@marshal{\setkeys{pgfbox}}% @@ -158,13 +158,13 @@ \csname pgf@halign\pgf@text@hshift\endcsname% \csname pgf@valign\pgf@text@vshift\endcsname% % Protocol sizes: - \pgf@process{\pgfpointtransformed{\pgfpoint{0pt}{\dp\pgf@hbox}}}% + \pgf@process{\pgfpointtransformed{\pgfqpoint{0pt}{\dp\pgf@hbox}}}% \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@process{\pgfpointtransformed{\pgfpoint{\wd\pgf@hbox}{\dp\pgf@hbox}}}% + \pgf@process{\pgfpointtransformed{\pgfqpoint{\wd\pgf@hbox}{\dp\pgf@hbox}}}% \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@process{\pgfpointtransformed{\pgfpoint{0pt}{\ht\pgf@hbox}}}% + \pgf@process{\pgfpointtransformed{\pgfqpoint{0pt}{\ht\pgf@hbox}}}% \pgf@protocolsizes{\pgf@x}{\pgf@y}% - \pgf@process{\pgfpointtransformed{\pgfpoint{\wd\pgf@hbox}{\ht\pgf@hbox}}}% + \pgf@process{\pgfpointtransformed{\pgfqpoint{\wd\pgf@hbox}{\ht\pgf@hbox}}}% \pgf@protocolsizes{\pgf@x}{\pgf@y}% \pgfqboxsynced{\pgf@hbox}% }% @@ -182,12 +182,12 @@ \define@key{pgfbox}{rotate}{\pgftransformrotate{#1}} \def\pgf@halignleft{}% do nothing -\def\pgf@haligncenter{\pgftransformxshift{-.5\wd\pgf@hbox}} -\def\pgf@halignright{\pgftransformxshift{-\wd\pgf@hbox}}% +\def\pgf@haligncenter{\pgftransformxshift{+-.5\wd\pgf@hbox}} +\def\pgf@halignright{\pgftransformxshift{+-\wd\pgf@hbox}}% \def\pgf@valignbase{}% do nothing -\def\pgf@valignbottom{\pgftransformyshift{\dp\pgf@hbox}}% -\def\pgf@valigncenter{\pgftransformyshift{.5\dp\pgf@hbox}\pgftransformyshift{-.5\ht\pgf@hbox}}% -\def\pgf@valigntop{\pgftransformyshift{-\ht\pgf@hbox}}% +\def\pgf@valignbottom{\pgftransformyshift{+\dp\pgf@hbox}}% +\def\pgf@valigncenter{\pgftransformyshift{+.5\dp\pgf@hbox}\pgftransformyshift{+-.5\ht\pgf@hbox}}% +\def\pgf@valigntop{\pgftransformyshift{+-\ht\pgf@hbox}}% % Internal function for creating a hbox. @@ -237,6 +237,7 @@ \pgfpicturetrue% \global\advance\pgf@picture@serial@count by1\relax% \edef\pgfpictureid{pgfid\the\pgf@picture@serial@count}% + \let\pgf@nodecallback=\pgfutil@gobble% \pgf@picmaxx=-16000pt\relax% \pgf@picminx=16000pt\relax% \pgf@picmaxy=-16000pt\relax% @@ -245,10 +246,10 @@ \pgf@resetpathsizes% \pgfutil@ifnextchar\bgroup\pgf@oldpicture\pgf@picture} \def\pgf@oldpicture#1#2#3#4{% - \setlength\pgf@picminx{#1}% - \setlength\pgf@picminy{#2}% - \setlength\pgf@picmaxx{#3}% - \setlength\pgf@picmaxy{#4}% + \pgfmathsetlength\pgf@picminx{#1}% + \pgfmathsetlength\pgf@picminy{#2}% + \pgfmathsetlength\pgf@picmaxx{#3}% + \pgfmathsetlength\pgf@picmaxy{#4}% \pgf@relevantforpicturesizefalse% \pgf@picture} @@ -309,7 +310,22 @@ \box\pgf@layerbox@main% } +\def\pgf@selectfont{\pgf@selectfontorig\nullfont} +\def\pgf@setlength#1#2{% these will be used only when \nullfont is active + \begingroup% keep font setting local + \pgfutil@selectfont% restore font + \pgf@setlengthorig#1{#2}% calculate dimension (possibly using calc) + \expandafter% + \endgroup% + \expandafter#1\expandafter=\the#1\relax} +\def\pgf@addtolength#1#2{% + \begingroup% keep font setting local + \pgfutil@selectfont% restore font + \pgf@addtolengthorig#1{#2}% calculate dimension (possibly using calc) + \expandafter% + \endgroup% + \expandafter#1\expandafter=\the#1\relax} % Sets the baseline at the y-coordinate of a given point @@ -409,6 +425,47 @@ +% Interrupt bounding box +% +% Description: +% +% The environment can be used to temporarily setup a new bounding box +% computation. The bounding box will be made empty at the beginning of +% the environment and will be reset to its old value after the +% environment. +% +% Example: +% +% \begin{pgfinterruptboundinbox} +% \pgfmoveto{\pgfpoint{1cm}{0cm}} +% \pgfmoveto{\pgfpoint{1cm}{1cm}} +% \pgfusepath{stroke} +% \end{pgfinterruptboundinbox} + +\def\pgfinterruptboundingbox +{% + \begingroup% + \edef\pgf@interrupt@savemaxx{\the\pgf@picmaxx}% + \edef\pgf@interrupt@saveminx{\the\pgf@picminx}% + \edef\pgf@interrupt@savemaxy{\the\pgf@picmaxy}% + \edef\pgf@interrupt@saveminy{\the\pgf@picminy}% + \pgf@picmaxx=-16000pt\relax% + \pgf@picminx=16000pt\relax% + \pgf@picmaxy=-16000pt\relax% + \pgf@picminy=16000pt\relax% +} +\def\endpgfinterruptboundingbox +{% + \global\pgf@picmaxx=\pgf@interrupt@savemaxx% + \global\pgf@picmaxy=\pgf@interrupt@savemaxy% + \global\pgf@picminx=\pgf@interrupt@saveminx% + \global\pgf@picminy=\pgf@interrupt@saveminy% + \endgroup% +} + + + + % Interrupts a picture % @@ -450,30 +507,24 @@ \def\pgfinterruptpicture {% \begingroup% - \edef\pgf@interrupt@savemaxx{\the\pgf@picmaxx}% - \edef\pgf@interrupt@saveminx{\the\pgf@picminx}% - \edef\pgf@interrupt@savemaxy{\the\pgf@picmaxy}% - \edef\pgf@interrupt@saveminy{\the\pgf@picminy}% - \pgftransformreset% - \pgfinterruptpath% - \ifx\pgf@setlengthorig\@undefined% - \else% - \let\setlength\pgf@setlengthorig% - \let\addtolength\pgf@addtolengthorig% - \let\selectfont\pgf@selectfontorig% - \fi% - \selectfont% - \pgfpicturefalse% - \pgf@savelayers% + \pgfinterruptboundingbox% + \pgftransformreset% + \pgfinterruptpath% + \ifx\pgf@selectfontorig\@undefined% + \else% + \let\setlength\pgf@setlengthorig% + \let\addtolength\pgf@addtolengthorig% + \let\selectfont\pgf@selectfontorig% + \fi% + \pgfutil@selectfont% + \pgfpicturefalse% + \pgf@savelayers% } \def\endpgfinterruptpicture {% - \pgf@restorelayers% - \endpgfinterruptpath% - \global\pgf@picmaxx=\pgf@interrupt@savemaxx% - \global\pgf@picmaxy=\pgf@interrupt@savemaxy% - \global\pgf@picminx=\pgf@interrupt@saveminx% - \global\pgf@picminy=\pgf@interrupt@saveminy% + \pgf@restorelayers% + \endpgfinterruptpath% + \endpgfinterruptboundingbox% \endgroup% } |