I'm trying to fill half of my rectangle with a green color. I would like the transition to be along a diagonal of the rectangle.
Here is the code I have currently
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows}
\begin{document}
\begin{tikzpicture}
\node [rectangle,draw,thick,text width=1.5cm,minimum height=1.5cm,
text centered,rounded corners, drop shadow, fill=yellow, name = re] {Test};
\end{tikzpicture}
\end{document}
This (of course) gives me an only yellow rectangle. I would like something like this instead.
I have looked at http://www.texample.net/tikz/examples/rectangle-node-with-diagonal-fill/, but I didn't get it to work with the drop shadow (and it seems like a lot of code for a simple task).
I'm considering drawing an invisible triangle under the rectangle with clipping, but I'm not sure how to do that, or if it's the smartest way.