I'd like to create a key shape symbol using PSTricks
, but I have some problems filling it...
Here's the shape I'd like :
\documentclass[pstricks, float]{standalone}
usepackage[table, usenames, dvipsnames]{xcolor}
\usepackage{pstricks, pst-node, pst-circ, pst-plot,
pst-3dplot,pst-solides3d, pst-sigsys, pstricks-add,pst-eucl}
\begin{document}
\begin{pspicture}[labelangle=:U, showgrid=true](-3, -3)(5, 3)
\pscustom[fillstyle=solid, fillcolor=green]{
\psarc[]{-}(0.2, 0){0.8}{25}{346} % Exterior disk
\pscircle[linewidth=2pt](0, 0){0.25} % Hole
\psline[]{-}(0.9250, 0.3380)(3, 0.3380)(3.3, 0)(3, -0.3420)(2.8, -0.3420)
(2.8, -0.3420)(2.65, -0.1920)(2.55, -0.3420)(2.45, -0.1920)(2.25, -0.4920)
(2.15, -0.3420)(2.05, -0.4920)(1.95, -0.3420)(1.85, -0.4920)(1.65, -0.1920)
(1.55, -0.3420)(1.45, -0.1920)(1.25, -0.4920)(1.05, -0.1935)(0.9762, -0.1935)
}
\end{pspicture}
\end{document}
But the pscustom
doesn't work as expected.
Here's the result :
I have thus two problems :
- Create a closed shape with the
\psarc
and the\psline
- Scoop the
\pscircle
out of the shape
I haven't find the commands in the user's manual that allows me to do so, and I hope I'm wrong...
Besides, that I'd like to turn the key shape into a new PS object, let's say a \psKey
, that could be filled, linestyle-d, and so on... I know it's about the \makeatletter
and \makeatother
but I could get proper results...
Is this structure wrong ? Should I save it as psKey.tex ?
\makeatletter
\def\tor(#1){%
\rput(#1){%
%
% Code lines of the key drawing
%
}
}
\makeatother