[Problem] Hachures starting position

Denis Girou Denis.Girou at idris.fr
Fri Dec 12 23:33:16 CET 1997


-----------------------------------------------------------------------------
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.
-----------------------------------------------------------------------------

  Nearly all the time, the starting position of hachures doesn't matter
and I was the first to have never look at it before. But on special
circonstances, when we must put contiguous areas filled by hachures, we can
want to control them. And I discover that up to now the starting point is
randomly positioned.

  It seems very easy to correct. But I would like to know if it work too with
other driver than mine (dvips).

  My test case is:

\documentclass{article}

\usepackage{pstricks}

\newcommand{\Square}{%
\begin{pspicture}(1,1)
  \psframe[fillstyle=hlines,hatchwidth=0.5\psunit,hatchsep=0.5\psunit](1,1)
\end{pspicture}}

\pagestyle{empty}

\begin{document}

\psset{unit=4}

\Square\hspace{3cm}\Square

\vspace{3cm}
\Square\hspace{3cm}\Square

\makeatletter
\pst at def{LineFill}<{%
gsave
  abs CLW add
  /a ED
  a 0 dtransform round exch round exch 2 copy idtransform
      exch Atan rotate idtransform pop
  /a ED
% DG/SR modification begin - Dec. 12, 1997
%  .25 .25 itransform translate pathbbox
  .25 .25 itransform pathbbox
% DG/SR modification end
  /y2 ED
  a Div ceiling cvi
  /x2 ED
  /y1 ED
  a Div cvi
  /x1 ED
  /y2 y2 y1 sub def
  clip
  newpath
  2 setlinecap
  systemdict
  /setstrokeadjust known { true setstrokeadjust } if
  x2 x1 sub 1 add {
    x1 a mul y1 moveto
    0 y2 rlineto
    stroke
    /x1 x1 1 add def }
  repeat
  grestore }>
\makeatother

\vspace{3cm}
\Square\hspace{3cm}\Square

\end{document}

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