2

It seems like doing a nonlinear transform on an arc produces something warped. See the green and red shapes below. Is this expected? Do I have to restrict paths operations to --, to, and .. 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}

enter image description here

tsj
  • 481

0 Answers0