如何利用新的 arrows.meta 实现“隐身”?

如何利用新的 arrows.meta 实现“隐身”?
\documentclass{memoir}

\usepackage{pgfcore}
\usepackage{pgfplots}
\usetikzlibrary{arrows, arrows.meta}

\begin{document}
\resizebox{\linewidth}{!}{
  \begin{tikzpicture}[>=stealth']
  \foreach \arrowa [count=\i from 1] in {stealth, Stealth, {Stealth[round]}, >} {
    \path (0.0, {-0.3 * \i}) edge [-\arrowa] (1.0, {-0.3 * \i});
  }
\end{tikzpicture}
}
\end{document}

如何stealth'使用新arrows.meta库?

在此处输入图片描述

答案1

感谢@Symbol1,从 pgflibraryarrows 复制了此代码并开始将其调整为 arrows.meta。长度、宽度和插入不起作用。它应该被称为Stealthy[round]

\pgfdeclarearrow{
  name=Stealthy,
  defaults={
    length  = +3.6pt +5.4,
    width'  = +0pt +0.5,
    inset'  = +0pt 0.5,
    line width = +0pt 1 1,
  },
  setup code = {
    \pgfutil@tempdima=0.28pt%
    \advance\pgfutil@tempdima by.3\pgflinewidth%
    \pgfutil@tempdimb=6\pgfutil@tempdima\advance\pgfutil@tempdimb by.5\pgflinewidth%
    \pgfarrowsleftextend{+-\pgfutil@tempdimb}
    \pgfutil@tempdimb=2\pgfutil@tempdima\advance\pgfutil@tempdimb by0.5\pgflinewidth%
    \pgfarrowsrightextend{+\pgfutil@tempdimb}
  },
  drawing code = {
    \pgfutil@tempdima=0.28pt%
    \ifdim\pgfarrowlinewidth=\pgflinewidth\else\pgfsetlinewidth{\pgfarrowlinewidth}\fi
    \advance\pgfutil@tempdima by.3\pgflinewidth%
    \pgfsetdash{}{+0pt}
    \ifpgfarrowroundjoin\pgfsetroundjoin\else\pgfsetmiterjoin\fi
    \pgfpathmoveto{\pgfqpoint{2\pgfutil@tempdima}{0\pgfutil@tempdima}}
    \pgfpathcurveto
    {\pgfqpoint{-.5\pgfutil@tempdima}{.5\pgfutil@tempdima}}
    {\pgfqpoint{-3\pgfutil@tempdima}{1.5\pgfutil@tempdima}}
    {\pgfqpoint{-6\pgfutil@tempdima}{3.25\pgfutil@tempdima}}
    \pgfpathcurveto
    {\pgfqpoint{-3\pgfutil@tempdima}{1\pgfutil@tempdima}}
    {\pgfqpoint{-3\pgfutil@tempdima}{-1\pgfutil@tempdima}}
    {\pgfqpoint{-6\pgfutil@tempdima}{-3.25\pgfutil@tempdima}}
    \pgfpathcurveto
    {\pgfqpoint{-3\pgfutil@tempdima}{-1.5\pgfutil@tempdima}}
    {\pgfqpoint{-.5\pgfutil@tempdima}{-.5\pgfutil@tempdima}}
    {\pgfqpoint{2\pgfutil@tempdima}{0\pgfutil@tempdima}}
    \pgfpathclose
    \ifpgfarrowopen\pgfusepathqstroke\else\ifdim\pgfarrowlinewidth>0pt\pgfusepathqfillstroke\else\pgfusepathqfill\fi\fi
  },
  parameters = {
    \the\pgfarrowlinewidth,%
    \ifpgfarrowopen o\fi%
    \ifpgfarrowroundjoin j\fi
  },
}

相关内容