1

I would like to draw a cross at a specific position. I already know how to draw a circle with

\pscircle[...](x,y){...}

is there something as simple that doesn't require any other package.

For now I only use pstricks-add in a standalone document class.

1

For example an easy and a more complex solution:

\documentclass[border=3mm,pstricks]{standalone}
\makeatletter
\def\psCross{\pst@object{psCross}}
\def\psCross@i(#1)#2{%
    \begin@SpecialObj
    \pst@dima=#2
    \rput{\psk@gangle}(#1){\psline(-0.5\pst@dima,0)(0.5\pst@dima,0)%
                  \psline(0,-0.5\pst@dima,0)(0,0.5\pst@dima,0)}%
    \end@SpecialObj}
\makeatother
\begin{document}

\begin{pspicture}[showgrid](-3,-3)(3,3)
\psdot[dotsize=4cm,dotstyle=x](0,0)
\end{pspicture}

\begin{pspicture}[showgrid](-3,-3)(3,3)
\psCross(-2,-2){1cm}
\psCross[linecolor=red,linewidth=2pt,gangle=45](0,0){2cm}
\psCross[linecolor=blue,linewidth=6pt,strokeopacity=0.4,gangle=60](0,1){4cm}
\end{pspicture}

\end{document}

enter image description here

  • nice answer thank you ! I also ended up using 2 pslines but I hoped there was already something defined. Your answer defines this... so thanks again – PinkFloyd Mar 4 '16 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.