[pstricks] pstricks special coordinates computations
Herbert Voss
Herbert.Voss at gmx.net
Thu Nov 23 18:25:43 CET 2006
Randy Yates schrieb:
> Is there a way to translate dimensions to relative coordinates?
> For example, if I want to place a dot at relative coordinate
> (!0 0) moved left by 5pt, how can I do this inside a (!xyz abc)
> coordinate computation? I noticed that, e.g., (!0 0 5pt sub)
> crashes the stack at dvips time.
it is esier using the unit 1pt
Herbert
\documentclass[12pt,a4paper]{article}
\usepackage{pstricks}
\SpecialCoor
\begin{document}
\begin{pspicture}(1,1)
\psline(1,0)
\makeatletter
\pst at dimb=5pt
\psline[linecolor=red](1,1)
(!0 0 \pst at number\pst at dimb \pst at number\psyunit div sub)
\psline[linecolor=blue](0,1)(!1 0 5 \pst at number\psyunit div sub)
\makeatother
\end{pspicture}
\vspace{1cm}
\psset{unit=1pt}
\begin{pspicture}(1cm,1cm)
\psline(1cm,0)
\psline[linecolor=red](28,28)(!0 0 5 sub)
\psline[linecolor=blue](0,28)(!28 0 5 sub)
\end{pspicture}
\end{document}
More information about the PSTricks
mailing list