[pstricks] Using \newrgbcolor creates an offset in coordinates

Jakob van Bethlehem j.s.van.bethlehem at astro.rug.nl
Tue Jul 17 11:25:28 CEST 2012


Hello people,

First of all, thanks a lot for pstricks; it saved the day on many occasions for me. I'm a very happy user.
Recently I noticed something strange, when 'pstrick-ing' some low resolution bitmap. What I do then, is to include the bitmap, overdraw a grid, and then gradually fill in pstricks commands. This takes 
a while, but no more time than it takes to get the parameters right of bitmap-tracers. Also I'm using the auto-pst-pdf package.

Here's an example:

\documentclass[11pt]{article}
\pagestyle{empty}
\usepackage{pstricks}
\usepackage{graphicx}
\usepackage{auto-pst-pdf}

\usepackage{helvet}
\usepackage{courier}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}

\psset{xunit=0.5pt,yunit=0.5pt,runit=0.5pt}
\begin{pspicture}(0,0)(665,230)
\rput[bl](0,0){\includegraphics[scale=0.5]{figure}}
\psgrid[unit=50pt](0,0)(5,4)

%\newrgbcolor{dblue}{0 0 0.5}
\psline(33,28)(20,13)

\end{pspicture}
\end{document}

If I compile this example with pdflatex, everything is fine. Now uncomment the line with '\newrgbcolor' and recompile. It is not even necessary to use the color. Now the line has shifted to the right 
with respect to the figure and the grid. Every additional color that is added, will add an additional offset. I see the same behaviour for '\newgray', but haven't tested '\newhsbcolor' or 
'\newcmykcolor' though.

This is on a Linux installation, with pstricks 2006/08/10 v0.32. I realize this is quite old, but it's the version on the system. Does this sound familiar to anyone, maybe even something that was 
fixed in a more recent version? Or did I find a new bug and should I report it?

Sincerely,
Jakob van Bethlehem


More information about the PSTricks mailing list