summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/generic/pst-node/Changes5
-rw-r--r--Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdfbin286075 -> 294026 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex63
-rw-r--r--Master/texmf-dist/dvips/pst-node/pst-node.pro5
-rw-r--r--Master/texmf-dist/tex/generic/pst-node/pst-node.tex38
5 files changed, 105 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-node/Changes b/Master/texmf-dist/doc/generic/pst-node/Changes
index b66bb5219e2..6c6c2644755 100644
--- a/Master/texmf-dist/doc/generic/pst-node/Changes
+++ b/Master/texmf-dist/doc/generic/pst-node/Changes
@@ -1,4 +1,9 @@
----- pst-node.tex
+1.14 2010-10-28 - added the macros
+ \psGetEdgeA and \psGetEdgeB for getting the
+ edge coordinates of connections
+ - added the macro \psDefBoxNodes, which sets
+ 12 nodes of the given argument, see documentation
1.13 2010-06-06 - changed all *put macros for using pst@refangle
1.12 2010-04-30 - moved concatstring into the base pstricks.pro
- fixed bug with nbput (ms)
diff --git a/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdf b/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdf
index dc9b88560bb..9e26953ff67 100644
--- a/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex b/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex
index dd3c3af411c..aadd639d842 100644
--- a/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-node/pst-node-doc.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-node-doc.tex 304 2010-04-22 08:23:39Z herbert $
+%% $Id: pst-node-doc.tex 440 2010-12-28 21:06:39Z herbert $
\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
headexclude,footexclude,oneside]{pst-doc}
\listfiles
@@ -75,6 +75,34 @@ The following pages are from the original documentation of
\clearpage
\setcounter{page}{33}
\part{New commands}
+
+\section{Setting bounding box nodes with \nxLcs{psDefBoxNodes}}
+
+\begin{BDef}
+\Lcs{psDefBoxNodes}\Largb{node name}\\
+%\Lcs{psGetNodeEdgeA}\Largb{node type}\Largb{node name}
+\end{BDef}
+
+Setting nodes for a bounding box of a given text. There will be 12 nodes defined,
+with the name that has the suffixes
+\texttt{:tl, :tC, :tr,
+:Cl, :C, :Cr,
+:Bl, :BC, :Br,
+:bl, :bc, :br}. The prefix is always the given node name.
+
+\begin{LTXexample}[pos=t]
+\psscalebox{15}{\psDefBoxNodes{Age}{\color{red!50}\sffamily Age}}%
+\pspolygon[linecolor=blue,fillstyle=solid,
+ fillcolor=magenta!30,opacity=0.3](Age:tl)(Age:tr)(Age:br)(Age:bl)%
+\psline[linestyle=dashed,linecolor=blue](Age:Bl)(Age:Br)%
+\psdots(Age:tl)(Age:tC)(Age:tr)(Age:Cl)(Age:C)(Age:Cr)%
+ (Age:Bl)(Age:BC)(Age:Br)(Age:bl)(Age:bC)(Age:br)%
+\pcline[arrows=<->,linecolor=blue,arrowscale=1.25](Age:tC)(Age:Br)
+\end{LTXexample}
+
+
+\clearpage
+
%--------------------------------------------------------------------------------------
\section{Relative nodes with \nxLcs{psGetNodeCenter}}
%--------------------------------------------------------------------------------------
@@ -113,6 +141,39 @@ relative to the first one, with 4 units left and 4 units up.
\end{pspicture}
\end{LTXexample}
+\clearpage
+
+
+%--------------------------------------------------------------------------------------
+\section{Getting node edges with \nxLcs{psGetNodeEdgeA} and \nxLcs{psGetNodeEdgeB}}
+%--------------------------------------------------------------------------------------
+
+\begin{BDef}
+\Lcs{psGetNodeEdgeA}\Largb{node name}\\
+\Lcs{psGetNodeEdgeB}\Largb{node name}\\
+\end{BDef}
+
+When two nodes are connected the line often did not use the center of the defined
+nodes. Values as \Lkeyword{nodesep} or \Lkeyword{offset} are also taken into account
+as a surrounding border of a node. With these new macros one can get the edge coordinates
+of two given nodes. The coordinates are saved on \PS side in the values \Larg{node.x}
+and \Larg{node.y}.
+
+
+\begin{LTXexample}[pos=t]
+\Huge
+\hspace*{4cm}\rnode{B}{Node B}
+
+\vspace{2cm}
+\rnode{A}{Node A}
+\ncline{A}{B}
+\pscircle*[linecolor=blue,opacity=0.4](!\psGetEdgeA{A}{B}){10pt}
+\pscircle*[linecolor=blue,opacity=0.4](!\psGetEdgeB{A}{B}){10pt}
+\end{LTXexample}
+
+
+
+
%--------------------------------------------------------------------------------------
\section{\nxLcs{ncdiag} and \nxLcs{pcdiag}}
%--------------------------------------------------------------------------------------
diff --git a/Master/texmf-dist/dvips/pst-node/pst-node.pro b/Master/texmf-dist/dvips/pst-node/pst-node.pro
index c1a814d6af6..083b54a78fe 100644
--- a/Master/texmf-dist/dvips/pst-node/pst-node.pro
+++ b/Master/texmf-dist/dvips/pst-node/pst-node.pro
@@ -1,4 +1,4 @@
-% $Id: pst-node.pro 304 2010-04-22 08:23:39Z herbert $
+% $Id: pst-node.pro 440 2010-12-28 21:06:39Z herbert $
%%
%% PostScript prologue for pst-node.tex.
%% Version 1.12, 2010/04/30.
@@ -10,10 +10,11 @@
/tx@NodeDict 400 dict def tx@NodeDict begin
tx@Dict begin % from main pstricks dict
/T /translate load def
+ /CP /currentpoint load def
end
/NewNode { % on stack: { x y } boolean N@name type InitXnode
gsave
- /next ED % { x y } boolean N@name type
+ /next exch def % { x y } boolean N@name type
dict dup % { x y } boolean N@name dict dict
3 1 roll def % { x y } boolean dict N@name dict def
exch { dup 3 1 roll def } if % { x y } dict boolean
diff --git a/Master/texmf-dist/tex/generic/pst-node/pst-node.tex b/Master/texmf-dist/tex/generic/pst-node/pst-node.tex
index cdb81b38bb6..6c94d8afec0 100644
--- a/Master/texmf-dist/tex/generic/pst-node/pst-node.tex
+++ b/Master/texmf-dist/tex/generic/pst-node/pst-node.tex
@@ -1,4 +1,4 @@
-% $Id: pst-node.tex 304 2010-04-22 08:23:39Z herbert $
+% $Id: pst-node.tex 440 2010-12-28 21:06:39Z herbert $
%% BEGIN pst-node.tex
%%
%% Nodes with PSTricks.
@@ -18,8 +18,8 @@
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex \fi\relax
\ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi
%
-\def\fileversion{1.13}
-\def\filedate{2010/06/06}
+\def\fileversion{1.14}
+\def\filedate{2010/12/28}
\message{ v\fileversion, \filedate}
%
\edef\TheAtCode{\the\catcode`\@}
@@ -976,6 +976,7 @@ tx@Dict begin \psline@iii pop end
\def\Aput@i[#1]{\addto@par{labelsep=#1}\naput@i}
\def\Bput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\Bput@i}{\nbput@i}}}
\def\Bput@i[#1]{\addto@par{labelsep=#1}\nbput@i}
+%
\def\node@coor#1;#2\@nil{%
\pst@getnode{#1}\pst@tempg
\edef\pst@coor{%
@@ -984,12 +985,14 @@ tx@Dict begin \psline@iii pop end
\pslbrace \pst@tempg load \tx@GetCenter \psrbrace
\pslbrace 0 0 \psrbrace ifelse
end }}
+%
\def\Node@coor[#1]#2;#3\@nil{%
\begingroup
\psset{#1}%
\@ifnextchar\bgroup{\Node@@@coor}{\Node@@coor}#2\@nil
\endgroup
\let\pst@coor\pst@tempg}
+%
\def\Node@@coor#1\@nil{%
\pst@getnode{#1}\pst@tempg
\xdef\pst@tempg{%
@@ -1202,6 +1205,14 @@ end }}%
%\def\psGetNodeEdgeA#1#2{ tx@NodeDict begin /N@#2 load #2 GetEdgeA end % x y on stack in system coor
% \pst@number\psyunit div /#1.y exch def % /#1.y in user coor
% \pst@number\psxunit div /#1.x exch def } % /#1.x in user coor
+\def\psGetEdgeA#1#2{
+ tx@NodeDict begin \psk@offsetA \psk@offsetB neg
+ \psk@nodesepA \psk@nodesepB 0 0
+ /N@#1 /N@#2 InitNC { NCCoor } if pop pop \tx@UserCoor end}
+\def\psGetEdgeB#1#2{
+ tx@NodeDict begin \psk@offsetA \psk@offsetB neg
+ \psk@nodesepA \psk@nodesepB 0 0
+ /N@#1 /N@#2 InitNC { NCCoor } if 4 2 roll pop pop \tx@UserCoor end}
%
%%%%%%%%%%%%%% the pst-node-tools part %%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -1264,6 +1275,27 @@ end }}%
XA linelength angle cos mul add YA linelength angle sin mul add ){#4}%
}
%
+\def\psDefBoxNodes#1#2{\rnode[tl]{#1:tl}{\rnode[Bl]{#1:Bl}{\rnode[tr]{#1:tr}{%
+ \rnode[bl]{#1:bl}{\rnode[Br]{#1:Br}{\rnode[br]{#1:br}{#2}}}}}}%
+ \pnode(!\psGetNodeCenter{#1:bl}
+ \psGetNodeCenter{#1:tl}
+ #1:bl.x #1:tl.x add 2 div #1:bl.y #1:tl.y add 2 div ){#1:Cl}%
+ \pnode(!\psGetNodeCenter{#1:tr}
+ \psGetNodeCenter{#1:br}
+ #1:tr.x #1:br.x add 2 div #1:tr.y #1:br.y add 2 div ){#1:Cr}%
+ \pnode(!\psGetNodeCenter{#1:Cl}
+ \psGetNodeCenter{#1:Cr}
+ #1:Cl.x #1:Cr.x add 2 div #1:Cl.y #1:Cr.y add 2 div ){#1:C}%
+ \pnode(!\psGetNodeCenter{#1:Br}
+ \psGetNodeCenter{#1:Bl}
+ #1:Br.x #1:Bl.x add 2 div #1:Br.y #1:Bl.y add 2 div ){#1:BC}%
+ \pnode(!\psGetNodeCenter{#1:tr}
+ \psGetNodeCenter{#1:tl}
+ #1:tr.x #1:tl.x add 2 div #1:tr.y #1:tl.y add 2 div ){#1:tC}%
+ \pnode(!\psGetNodeCenter{#1:br}
+ \psGetNodeCenter{#1:bl}
+ #1:br.x #1:bl.x add 2 div #1:br.y #1:bl.y add 2 div ){#1:bC}}
+%
%% Author: Michael Sharpe (msharpe at ucsd.edu)
% Macros defined in this file:
% \defaultvalue{<command>}{<value>} assigns <value> to <command> is command is not defined, or is empty.