In relation to this question: Shorten curved arrow proportionally to length
I have tried to use a curveto decoration to make a proportional shortening of a curve. My only problem is the arrow head. Is it possible to attach the arrow head to the decoration and not to the path?
"Shortened" with pre=moveto:
\documentclass[tikz, border=1 cm]{standalone}
\usetikzlibrary{decorations.pathmorphing, arrows.meta, bending}
\begin{document}
\begin{tikzpicture}
\newcommand{\mypath}{(0,0) to[out=80, in=100, min distance=1cm] (1,0)}
\draw[ultra thick] \mypath;
\draw[red, ->, decoration={curveto, pre=moveto, pre length=0.5*\pgfmetadecoratedpathlength}, decorate] \mypath; %relative shortening
%\draw[pink, {_[sep=1cm]}->] \mypath; %absolute shortening
\end{tikzpicture}
\end{document}
"Shortened" with post=moveto:
\documentclass[tikz, border=1 cm]{standalone}
\usetikzlibrary{decorations.pathmorphing, arrows.meta, bending}
\begin{document}
\begin{tikzpicture}
\newcommand{\mypath}{(0,0) to[out=80, in=100, min distance=1cm] (1,0)}
\draw[ultra thick] \mypath;
\draw[green, ->, decoration={curveto, post=moveto, post length=0.5*\pgfmetadecoratedpathlength}, decorate] \mypath; %relative shortening
%\draw[orange, -{>[sep=1cm]}] \mypath; %absolute shortening
\end{tikzpicture}
\end{document}
I know that the arrow head can be made afterwards with markings, but my question is about making a "curveto with arrow" decoration.



curvetodecoration itself had apreandpost- I can not currently wrap my head around it. -something withshow path constructionand redefinecurvetoin terms of a decoration withcurveto... wait.. what. I need to sleep. – hpekristiansen Nov 20 '21 at 13:50preandpostis built uponcurveto.curvetois an ordinary decoration declared by\pgfdeclaredecoration, whilepreandpostare part of a meta decorationtikz@internaldeclared by\pgfdeclaremetadecorationand making use ofcurvetoand the like. – muzimuzhi Z Nov 20 '21 at 14:31