How to shade a right triangle like in the picture?
Here's my code:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetikzlibrary{intersections}
\usepackage{amsmath}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}
\begin{document}
\begin{tikzpicture}[scale=2]
\coordinate [label=left:$\textcolor{white}A$] (A) at (1cm,-3cm);
\coordinate [label=below:$\textcolor{white}B$] (B) at (1cm,1cm);
\coordinate [label=below:$\textcolor{white}C$] (C) at (-4cm,1cm);
\node at (-3.4cm, .85cm) {$\textcolor{blue}{38^\circ}$};
\tkzMarkAngle[size=0.4cm,color=black,mark=](A,C,B)
\tkzMarkRightAngle[draw=red,size=.2](C,B,A);
\draw [thick=black] (A) -- node[right] {$\textrm{\textcolor{blue}{11}}$} (B) -- node[sloped,above] {$\textrm{\textcolor{blue}{x}}$} (C) -- node[sloped, above] {$\textrm{\textcolor{white}{hypotenuse = 82}}$} (A);
\end{tikzpicture}
\end{document}
Don't mind the text's in white; I use it when it's needed.
Best Answer
Another option. Only with TikZ and its library
angles
.Then there is something wrong with the numbers, so I'm letting TikZ do the math for me.
This is the code:
An the output: