Consider the following code in LaTeX:
\begin{tikzpicture}
\node[circle,fill=red,text=white] (1) at (4,8) {$R_1$};
\node[circle,fill=red,text=white] (2) at (8,8) {$R_1$};
\node[circle,fill=blue,text=white] (4) at (4,5) {$R_2$};
\node[circle,fill=blue,text=white] (3) at (8,5) {$R_2$};
\draw[-] (1) -- node[above] {7} (2);
\draw[-] (2) -- node[right] {7} (3);
\draw[-] (3) -- node[below] {7} (4);
\draw[-] (4) -- node[left] {7} (1);
\draw[-] (1) -- node[pos=.2,below] {$10$} (3);
\draw[-] (2) -- node[pos=.2,below] {$10$} (4);
\node [draw=blue, fit= (4) (3)] {};
\node [draw=red, fit= (1) (2)] {};
\end{tikzpicture}
That produce this shape for us:
How it possible to change above code to make a diagonal red enclosing rectangle box as is bellow?