[pstricks] Giving "dash" four parameters

Сторожев Максим maxim at lpbl.spb.ru
Mon Jul 7 13:02:33 CEST 2003


Hello, all!
Times come and I have to do something with dash, cause this parameter takes only 2 arguments, so I would make something like this:
\psline[linestyle=dashed, dash=5pt 1pt 1pt 1pt](0,0)(1,1) and see the result... But I had to hack some pstricks code:
----- begin of code ----
\newdimen\pst at dimgg
\newdimen\pst at dimhh
\def\psset at dash#1{%
\pst at expandafter\psset@@dash{#1} {\pst at missing} {\pst at missing} {}\@nil
\edef\psk at dash{\pst at number\pst at dimgg \pst at number\pst at dimhh \pst at number\pst at dimg \pst at number\pst at dimh}}
\def\psset@@dash#1 #2 #3 #4 #5\@nil{%
\pssetlength\pst at dimg{#1}%
\pssetlength\pst at dimh{#2}
\pssetlength\pst at dimgg{#3}
\pssetlength\pst at dimhh{#4}}
\def\psls at dashed{%
%-----disabled strings----
%\ifpsdashadjust
%\psk at dash \pst at linetype\space \tx at DashLine
%\else
%----disabled strings----
[ \psk at dash ] 0 setdash stroke
%----disabled strings----
%\fi
}
\psset at dash{3pt 5pt 3pt 5pt}
---- end of code ----
Well, everything is working, but you see some string of the original code are disabled... I have disabled the pattern Dashline... My question is: Am I right, or it could been made more clearly without making some strings commented?

P.S. Well, sorry for bad English, I think... this language isn't my native, i am russian... :-)

Buy-buy All!
Maksim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20030707/58736daa/attachment.html 


More information about the PSTricks mailing list