[pstricks] pstricks-add

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri Nov 7 11:08:15 CET 2008


Patrice Mégret schrieb:

> In  some of the past versions of pstricks-add, there were \pslineII, ... to draw colour lines.
> I don't find these commands in the last pstricks-add version.
> 
> Can you let me know if you have cancelled these commands or replace by other ones.


it is no more part of the current pstricks-add. I defined it only
to understand how PSTricks works.

Herbert


\pst at def{LineII}<{%
  NArray
  /n n 1 sub def
  /y1 ED /x1 ED x1 y1 ArrowA x1 y1 moveto
  \psk at linecap\space 3 gt
    {\psk at linecap\space 0 lt {0 setlinecap} if }
    {\psk at linecap\space setlinecap} ifelse
  n {
    /y2 ED /x2 ED
    /y0 y1 def /x0 x1 def
    /length x2 x1 sub y2 y1 sub Pyth def
    \psk at dashNo\space 1.0 lt
      {/cntMax 1.0 \psk at dashNo\space div .49 add cvi def}
      {/cntMax length \psk at dashNo\space div .49 add cvi def} ifelse
    x2 x1 sub cntMax div /dx ED
    y2 y1 sub cntMax div /dy ED
    /cnt 0 def
    cntMax {
      gsave
      /x1 x1 dx add def
      /y1 y1 dy add def
      x1 y1
      cnt 2 mod 0 eq
        { \pst at usecolor\psDashColorI }
        { \pst at usecolor\psDashColorII } ifelse
      lineto stroke
      /cnt cnt 1 add def
      grestore
      x1 y1 moveto
    } repeat
    /y1 y2 def /x1 x2 def
  } repeat
  x0 y0 x2 y2 ArrowB L pop pop
}>
%
\def\pslineII{\pst at object{pslineII}}
\def\pslineII at i{%
    \pst at getarrows{%
        \begin at OpenObj
        \pst at getcoors[\pslineII at ii%
    }%
}
\def\pslineII at ii{%
  \addto at pscode{%
    \pst at cp
    \ifshowpoints true \else false \fi
    \tx at LineII
  }%
  \end at OpenObj%
}



More information about the PSTricks mailing list