Let's say I have such a simple tikz "contour" object defined with \draw:
\documentclass{standalone}
\usepackage{tikz}
\tikzset{x=1pt, y=1pt, z=1pt}
\begin{document}
\def\object{
\draw[blue, thick, -stealth] (0, 0)
.. controls (5, -5)
and (10, 5)
.. (15, 0);
}
\begin{tikzpicture}
\object
\end{tikzpicture}
\end{document}
Is there a way I could convert it to an actual \filled path? Drawing it is easy with \draw, but transforming it (in particular, fading it) would be more easy if it were drawn with \fill.. but what a pain would it be to design it with \fill!
I am aware that the problem is that, since it is declared as a path, it has no width in theory. The thing is that it does have a width orelse we could not see it. The question is: how to take this actual width into account and turn it into an explicit path?
Put it another way: how would you draw a black outline around this object?
(Yes, I am thinking about Inkscape's object to path or convert to path feature.)
[EDIT] If my understanding of this related question is correct, I would need to highjack the code from stealth in a heavy \makeatletter .. \makeatother section so that I could retrieve the actual contour of the whole arrow.
However, I am actually using Stealth from arrows.meta, and I would not like the code to be rewritten if I fancy change Stealth to Latex. What I am looking for is a more generic solution to retrieve the actual path primitive built when I type: \draw[blue, thick, -stealth] (0, 0) .. controls (5, -5) and (10, 5) .. (15, 0); It must be computed at some point internally otherwise the compilation would be meaningless. How can I get this intermediate result?
In an ideal world, I would type:
\getActualPath{\object}{\result}
and \result would then be magically expanded as:
\path[cm={{0.8,0.0,0.0,-0.8,(-0.398,5.38)}}]
(17.3457,1.2305) -- (16.9707,3.8555) .. controls (16.4721,3.4476) and
(15.9195,3.2113) .. (15.3516,3.1621) .. controls (14.6806,3.1040) and
(14.0125,3.2715) .. (13.3496,3.5488) .. controls (12.0238,4.1035) and
(10.6766,5.1107) .. (9.2793,6.0215) .. controls (7.8820,6.9323) and
(6.4476,7.7369) .. (5.0586,7.9473) .. controls (3.6696,8.1576) and
(2.3182,7.8417) .. (0.8496,6.3730) -- (0.1465,7.0762) .. controls
(1.7912,8.7209) and (3.5542,9.1820) .. (5.2070,8.9316) .. controls
(6.8598,8.6813) and (8.3943,7.7895) .. (9.8242,6.8574) .. controls
(11.2541,5.9253) and (12.5908,4.9452) .. (13.7344,4.4668) .. controls
(14.3062,4.2276) and (14.8182,4.1155) .. (15.2656,4.1543) .. controls
(15.6068,4.1839) and (15.9194,4.2931) .. (16.2363,4.5293) --
(13.6836,4.8926) -- (19.1777,6.7246) -- (17.3457,1.2305) -- cycle
so that
\begin{tikzpicture}
\result[draw, fill=blue, line width=.1pt];
\end{tikzpicture}
would draw
and, with \usetikzlibrary{fadings},
\begin{tikzpicture}
\result[path fading=west, fill=blue];
\end{tikzpicture}
would draw
and
\begin{tikzpicture}
\result[clip];
\node () at (8, 5) {\includegraphics[width=50pt]{example-image-a}};
\end{tikzpicture}
would draw
.. would this not be neat?





\newcommand\object[1][draw]{\path[blue, thick, -stealth, #1] (0, 0) .. controls (5, -5) and (10, 5) .. (15, 0);}and then\object[fill]? – Henri Menke Apr 04 '16 at 10:56\def\object{[blue, thick, -stealth] (0, 0) .. controls (5, -5) and (10, 5) .. (15, 0);}and then\draw\objectand\fill\object. – Henri Menke Apr 04 '16 at 10:57drawa black outline all around the blue arrow, like you would do with a pencil.. or 2)clipa random picture so that it would be shaped like this arrow.. or 3)shadethis arrow to that it would fade away going west.. For all these purposes, I would need the actual contour object to be apath, not just(0, 0) .. controls (5, -5) and (10, 5) .. (15, 0). – iago-lito Apr 04 '16 at 11:11arrows.metahas changed things? But that answer suggests it can be done for paths. I don't think this is a duplicate now it has been edited. It may well not be possible, though. That is, there may well be no solution which works as easily as you hope. – cfr Apr 04 '16 at 11:54arrows.metamakes. – cfr Apr 04 '16 at 13:04