看起来对圆弧进行非线性变换会产生扭曲。请参见下面的绿色和红色形状。这是预期的吗?我是否必须将路径操作限制为--
、to
和.. controls () ..
?
\documentclass{standalone}
\usepackage{tikz}
\usepgfmodule{nonlineartransformations}
\usetikzlibrary{curvilinear,shapes.geometric,shapes.arrows}
\begin{document}
\makeatletter
\begin{tikzpicture}
[
bump/.style={semicircle, draw, fill=green},
point/.style={single arrow, fill=cyan, single arrow head extend=1mm, minimum height=5mm},
]
\draw [help lines] (0,0) grid (3,2);
{
\pgfsetcurvilinearbeziercurve
{\pgfpoint{0mm}{20mm}}
{\pgfpoint{11mm}{20mm}}
{\pgfpoint{20mm}{11mm}}
{\pgfpoint{20mm}{0mm}}
\pgftransformnonlinear{\pgfpointcurvilinearbezierorthogonal\pgf@x\pgf@y}%
\pgfsettransformnonlinearflatness{2pt} % very precise
\draw (0,-30pt) grid [step=10pt] (80pt,30pt);
% not working
\fill [red] (0,-1) arc [radius=0.5, start angle=90, end angle=45];
% working
\fill [orange] (2,0) .. controls +(0,0.11) and +(-0.11,0) .. ++(0.2,0.2) .. controls +(0.11,0) and +(0,0.11) .. ++(0.2,-0.2) -- cycle;
% working
\node [single arrow, fill=cyan, single arrow head extend=2, minimum height=5mm, transform shape nonlinear] at (1.5,0) {};
% not working
\node [semicircle, draw, fill=green, transform shape nonlinear] at (1,1) {};
}
\end{tikzpicture}
\makeatother
\end{document}