可以改进吗?帮我修复此代码

可以改进吗?帮我修复此代码

在此处输入图片描述在此处输入图片描述

\documentclass{standalone}
\usepackage{tikz}

\begin{document}
\usetikzlibrary{backgrounds}
\def\centerarc[#1](#2)(#3:#4:#5);%
% Syntax: [draw options] (center) (initial angle:final angle:radius)
    {
    %\draw[#1] ($(#2)+({#5*cos(#3)},{#5*sin(#3)})$) arc (#3:#4:#5);
    \draw[#1]([shift=(#3:#5)]#2) arc (#3:#4:#5);
    }
\begin{tikzpicture}
\centerarc[black,line width=5](0,0)(45:90:1cm);
\centerarc[black,line width=5](0,0)(135:180:1cm);
\centerarc[black,line width=5](0,0)(225:265:1cm);
\centerarc[black,line width=5](0,0)(315:360:1cm);
\draw [rotate=45,black,line width=5] (-1.085,0)--(1.085,0);
\draw [rotate=45,black,line width=5] (0,-1.085)--(0,1.085);

\end{tikzpicture}

\end{document} 

答案1

看看这是否适合你:

\documentclass{standalone}
\usepackage{tikz}

\begin{document}
    \begin{tikzpicture}[line width=5pt]
\foreach \i in {0, 90, 180, 270}
\draw[rotate=\i] (0,0) -- ++ (45:1) arc (45:90:1);
    \end{tikzpicture}
\end{document} 

在此处输入图片描述

相关内容