将文本绑定到曲线

将文本绑定到曲线

你能帮我弄清楚如何弯曲此图表内的文本吗: 在此处输入图片描述

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{tikz}

\begin{document}

\vspace{0.5\parskip}

\begin{tikzpicture}[text=white, border/.style={line width=14mm}, font=\fontsize{10pt}{10pt}\bodyfont]

    \foreach \angle/\col [remember=\angle as \last (initially 0)] in 
        {108/red, 198/orange, 286/green, 359/blue}{

        % DRAW SECTOR %
        \draw[\col, border] (\last:1.25cm) 
            arc[start angle=\last, end angle=\angle, radius=1.25cm];

        % DRAW SEPARATOR %
        \draw[white, line width=1mm] (\last:0.25)--++(\last:1.70);
    }

    % MIDDLE CIRCLE %
    \node[minimum width=1.75cm, line width=1mm, draw, circle, white, fill=lightgray, text width=1.25cm, align=center] {Esprit d'équipe};

    % LABELS %
    \node at (030:1.45cm) {détails};
    \node at (060:1.40cm) {du};
    \node at (085:1.55cm) {Soucis};
    \node at (155:1.40cm) {Curiosité};
    \node at (220:1.35cm) {Prise};
    \node at (250:1.40cm) {d'initiative};
    \node at (315:1.40cm) {Patience};

\end{tikzpicture}

\vspace{-1.5\parskip}


\end{document}

答案1

像这样吗?

曲线我

\documentclass[tikz,multi,border=10pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{cfr-lm}
\usetikzlibrary{decorations.text}
\begin{document}
\begin{tikzpicture}
  [
    text=white,
    border/.style={line width=14mm},
    font=\sffamily\itshape,
    curve me/.style={%
     decorate,
      decoration={%
        text effects along path,
        text={#1},
        text align=center,
        text effects/.cd,
        text along path,
        characters={%
          font=\sffamily\small,
          text=white,
        },
      },
    },
  ]
  \foreach \angle/\col [remember=\angle as \last (initially 0)] in {108/red, 198/orange, 286/green, 359/blue}{
    \draw [\col, border] (\last:1.25cm) arc [start angle=\last, end angle=\angle, radius=1.25cm];
    \draw [white, line width=1mm] (\last:0.25)--++(\last:1.75);
  }
  \path [curve me={Soucis du d{é}tails}] (108:1.5cm) arc (108:0:1.5cm);
  \path [curve me={Curiosit{é}}] (198:1.5cm) arc (198:108:1.5cm);
  \path [curve me={Prise d'initiative}] (286:1.5cm) arc (286:198:1.5cm);
  \path [curve me=Patience] (359:1.5cm) arc (359:286:1.5cm);
  \path [draw=white, line width=1mm, fill=lightgray] circle (8.75mm);
  \path [curve me={Esprit d'{é}quipe}] (360:4mm) arc (360:0:4mm);
\end{tikzpicture}
\end{document}

相关内容