# Hatching that does not obscure a right-angle mark

Hatching - I suppose in the northeast direction - is to be added to the square with an edge length of $c$ in following diagram. I have a right-angle mark at one of the corners of the square. Is there code to instruct TikZ to draw these hatching lines not to go into the little square made by this right-angle mark? I would like these hatching lines to go to the right-angle mark, though. (What code would instruct TikZ to shade the square with an edge length of $c$? The shading should be drawn in the little square made by this right-angle mark.)

By the way, this is a diagram for a demonstration of the Pythagorean Theorem. I saw one web site that attributed this diagram to the 12 century Indian mathematician Bhaskara. Does anybody have a citation for this?

\documentclass[10pt]{amsart}
\usepackage{tikz}
\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}
\usepackage{tkz-euclide}
\usetkzobj{all}

\begin{document}

\begin{tikzpicture}
\path (-3,-3) coordinate (A) (-3,3) coordinate (B) (3,3) coordinate (C) (3, -3) coordinate (D);
\path (-3,-1) coordinate (P) (-1,3) coordinate (Q) (3,1) coordinate (R) (1,-3) coordinate (S);
\draw (A) -- (P) node [midway, left]{$a$} -- (B) node [midway, left]{$b$}
-- (Q) node [midway, above]{$a$} -- (C) node [midway, above]{$b$}
-- (R) node [midway, right]{$a$} -- (D) node [midway, right]{$b$}
-- (S) node [midway, below]{$a$} -- (A) node [midway, below]{$b$};
\draw (P) -- (Q) node [midway, left]{$c$} -- (R) node [midway, right, above]{$c$} -- (S) node [midway, right]{$c$} -- (P) node [midway, below]{$c$};
\draw[|<->|] ($(A)!7mm!-90:(D)$)--node[fill=white,sloped] {$a + b$} ($(D)!7mm!90:(A)$);
\draw[|<->|] ($(A)!7mm!90:(B)$)--node[fill=white,sloped] {$a + b$} ($(B)!7mm!-90:(A)$);
\tkzMarkRightAngle(P,A,S);
\tkzMarkRightAngle(Q,P,S);
\end{tikzpicture}

\end{document}

-

To hatch the square you can use the patterns by loading the patterns library;

\draw[pattern=north east lines] (P) -- (Q) node [midway, left]{$c$}
-- (R) node [midway, right, above]{$c$} -- (S) node [midway, right]{$c$}
-- (P) node [midway, below]{$c$} -- cycle;


Also, angle marking accepts drawing options

\tkzMarkRightAngle[fill=white](Q,P,S);


fills the square. Then you get

-