I need to draw masks (with various shapes) over an image. For example, I made a circle mask like this:
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\definecolor{background}{HTML}{2C414C}
\definecolor{foreground}{HTML}{FFFFFF}
\usetikzlibrary{positioning,fit}
\begin{document}
\begin{tikzpicture}[inner sep=0pt, outer sep=0pt, draw=foreground, fill=foreground]
\node (image) {\includegraphics{example-image}};
\fill [red, opacity=0.5,even odd rule]
(image.north west) rectangle (image.south east) % Cover up everything
(0,1) circle [radius=50pt]; % Punch a hole
\end{tikzpicture}
\end{document}
How do I use a more complex shape instead of the circle? Specifically, I need a heart shape. I tried using the one from this answer, but it either causes errors or doesn't appear:
\begin{tikzpicture}[inner sep=0pt, outer sep=0pt, draw=foreground, fill=foreground]
\node (image) {\includegraphics{example-image}};
\fill [red, opacity=0.5,even odd rule]
(image.north west) rectangle (image.south east)
(0,1) draw .. controls (0,0.75) and (-1.5,1.00) .. (-1.5,2) arc (180:0:0.75) -- cycle;
(0,1) draw .. controls (0,0.75) and ( 1.5,1.00) .. ( 1.5,2) arc (0:180:0.75) -- cycle;
\end{tikzpicture}
Error: ! Use of \@next doesn't match its definition.



