答案1
我个人更喜欢它,even odd rule
因为它可以避免用白色覆盖某些东西。因此,这些图形可以放在非平凡的背景之上。
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\begin{document}
\begin{tikzpicture}[declare function={a=3;b=2;}]
\draw[fill=blue,even odd rule]
(a,-a) node[right]{$X$} rectangle ++ (-2*a,2*a) node[above]{$Y$}
(b,-b) rectangle ++ (-2*b,2*b) ;
\begin{scope}[thick,decoration={calligraphic brace,raise=0.3ex}]
\draw[decorate] (b,-a) -- (-b,-a) node[midway,below=0.5ex]{$A$};
\draw[decorate] (-a,-b) -- (-a,b) node[midway,left=0.5ex]{$B$};
\path (0,a/2+b/2) node[circle,fill,inner sep=1pt,label=right:{$(x_0,y_0)$}]{};
\end{scope}
\end{tikzpicture}
\end{document}