Wie ändere ich im Handbuch 97.12 die Darstellung auf gestrichelte Linien?

Wie ändere ich im Handbuch 97.12 die Darstellung auf gestrichelte Linien?

Dieses Beispiel stammt aus Abschnitt 97.12 derdas pgfHandbuch. Es erklärt perfekt, was ich tun möchte, aber ich brauche die Ränder des Rechtecks ​​aus gestrichelten Linien.

\begin{tikzpicture}
   \pgfsetcornersarced{\pgfpoint{5mm}{5mm}}
   \pgfpathrectanglecorners{\pgfpointorigin}{\pgfpoint{3cm}{2cm}}
   \pgfusepath{stroke}
\end{tikzpicture}

Danke!

Antwort1

Lesen Sie einfach den nächsten Unterabschnitt über \pgfsetdash:

\documentclass{article}
\usepackage{pgf}
\begin{document}
\begin{pgfpicture}
  \pgfsetcornersarced{\pgfpoint{5mm}{5mm}}
  \pgfpathrectanglecorners{\pgfpointorigin}{\pgfpoint{3cm}{2cm}}
  \pgfsetdash{{3pt}{2pt}}{0pt}
  \pgfusepath{stroke}
\end{pgfpicture}
\end{document}

Ergebnis

Dasselbe in TikZ:

\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  \draw[
    rounded corners=5mm,
    dash pattern=on 3pt off 2pt,
  ] (0, 0) rectangle (3, 2);
\end{tikzpicture}
\end{document}

verwandte Informationen