[pstricks] Silly question abou pspicture... sorry

Herbert Voss LaTeX at zedat.fu-berlin.de
Wed May 2 22:38:31 CEST 2007


Pedro Jorge Caridade wrote:
> Hi all
> Since I need to import some pstricks graphics into flash and keep track 
> of the initial (pstricks) coordinates, I need to create a pspicture with 
> some fixed size. This part is easy :)!!! Now comes the question: My 
> top-left corner should be (0,0) and my lower-right corner (xmax,ymax). 
> How can I do this in a pspicture environment? Everything that I tried 
> (xunit, origin, swapaxes, etc) always give lower-left corner (0,0). 
> Below is some example.
>
>   

you can redefine some of the macros and changing the y-coordinate
from + to -, e.g. for your example #2:

\documentclass{minimal}
\usepackage{pstricks,bm}
\usepackage[papersize={643px,482px}]{geometry}
\geometry{margin={0pt,0pt},centering,ignoreall,dvips}
\pagestyle{empty}
\usepackage{helvet}
\renewcommand{\rmdefault}{phv}

\makeatletter
\def\pst@@picture[#1]#2(#3,#4){\@ifnextchar(%
  {\pst@@@picture[#1](#3,-#4)}%
  {\pst@@@picture[#1](0,0)(#3,-#4)}}
\def\psframe at i(#1,#2){%
  \@ifnextchar({\psframe at ii(#1,-#2)}{\psframe at ii(0,0)(#1,-#2)}}
\def\rput at iv(#1,#2){\pst at killglue\pst at makebox{\rput at v{#1,-#2}}}
\makeatother

\begin{document}

\noindent
\begin{pspicture}(643pt,482pt)% x right y down
\psframe[fillstyle=solid,fillcolor={[HTML]{E4F2FF}},linestyle=none](643pt,482pt)
\rput[t](321pt,10pt){\psscalebox{3.0}{{\color[HTML]{0200F0}$\bm{%
  \mathrm{X}_3}$ \textbf{pseudo-rotation}}}}%
\rput[rt](635pt,475pt){\psscalebox{0.8}{\mbox{\gray%
  \usefont{OT1}{phv}{b}{n}\copyright\ Varandas \& Caridade (2006)}}}%
\end{pspicture}

\end{document}


Herbert



More information about the PSTricks mailing list