I would to define a new "T" shape (i.e. the red and green shapes in the following image) so that I can then draw with TikZ the diagram below.
Unfortunately I cannot figure out how to do. To be honest, I have read the section "Declaring New Shapes" from the PGF manual and I am completely lost with the low level pgf commands.
How could I do? Suggestions on any direction are welcomed.