How can I get \filldraw
to fill the wedge when I use \filldraw let .. in
syntax?
\documentclass[convert = false]{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\filldraw[inner color = blue!50!, outer color = blue!10!black] let
\p0 = (0, 0),
\p1 = (1, 0),
\p2 = (.707, .707),
\n1 = {atan2(\x1 - \x0, \y1 - \y0)},
\n2 = {atan2(\x2 - \x0, \y2 - \y0)},
\n3 = {1cm}
in (0, 0) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2];
\end{tikzpicture}
\end{document}
What I would like to achieve is this:
where \filldraw
was used in this manner:
\filldraw[inner color = blue!50!, outer color = blue!10!black] (2.5, 0) --
+(.5, 0) arc (0:35.2644:.5cm);
Best Answer
You are missing
--
to build a path (I changed the scale just for the example):When filling (filldrawing), I always prefer to use
-- cycle
at the end of the path, as in: