Strange behaviour of origin

Denis Girou Denis.Girou at idris.fr
Tue Jul 20 20:51:25 CEST 1999


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

>>>>> "Christophe.Jorssen" == Christophe JORSSEN <Christophe.JORSSEN at wanadoo.fr> writes:

    Christophe.Jorssen> I think there is a strange behaviour of the graphic parameter "origin".
    Christophe.Jorssen> As a matter of fact, I've done that:

    Christophe.Jorssen> \documentclass{article}
    Christophe.Jorssen> \usepackage{pstricks}
    Christophe.Jorssen> \begin{document}
    Christophe.Jorssen> \begin{pspicture}(-5,-5)(5,5)
    Christophe.Jorssen> \psgrid
    Christophe.Jorssen> \psdot[dotstyle=o](0,0)
    Christophe.Jorssen> \psset{origin={1,1}}\psdot[dotstyle=oplus](0,0)
    Christophe.Jorssen> \end{pspicture}
    Christophe.Jorssen> \end{document}

    Christophe.Jorssen> The dot o is well-put at the "true"-point (0,0).
    Christophe.Jorssen> But the dot oplus isn't put at the "true"-point (1,1). It is put at the
    Christophe.Jorssen> "true"-point (-1,-1), just as if origin was set to:

    Christophe.Jorssen> origin={-1,-1}

    Christophe.Jorssen> Is it the normal behaviour of origin?

  You are right, this look strange... As far as I understand the description
of this parameter in the documentation, we can expect to move the origin in
(+x,+y) and not in (-x,-y), as it is explicitely done. Nevertheless, as this
is clearly volunteer in the code, as in all the old versions I check it was
the same and as the only example of usage I found in the files of Timothy
( pstricks/obsolete/doc/src/filetest.tex ) would look badly if we move the
origine in (+x,+y), I'm not really in favor to make a change in the code
(obviously, it will be trivial to change the behaviour to the other one):

\documentclass{article}

\usepackage{pstricks}

\newcommand{\Drawing}{%
\begin{pspicture}(-3,-3)(3,3)\psgrid[subgriddiv=0]
  \psset{dotscale=5}
  \psdot[dotstyle=o](0,0)
  \psset{origin={2,1}}
  \psdot[dotstyle=oplus](0,0)
  \psset{origin={1,2}}
  \psframe*(1,1)
\end{pspicture}}

\setlength{\textwidth}{15cm}

\pagestyle{empty}

\begin{document}

\Drawing
\hfill
%
\makeatletter
%\def\psset at origin#1{\pst@@getcoor{#1}\edef\psk at origin{\pst at coor \tx at NET }}
\def\psset at origin#1{\pst@@getcoor{#1}\edef\psk at origin{\pst at coor T }}
\makeatother
%
\Drawing

\end{document}


  In any case, the most important thing you can notice is that the "origin"
parameter is of very few utility. I _never_ use it personally in all my
PSTricks life... It is very restricted (note the "apply only to pure graphics
objects" - those of chapter II and \pscustom). Using simply \rput to move
parts of objects is the good way, and it apply not only to "pure" objects.

D.G.

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list