The following example produces three Rectangle elements, each element 100 pixels.

The first Rectangle is red, and its upper-left (x, y) position is specified as (0, 0). The second Rectangle is green, and its upper-left position is (100, 100), which is just below, and to the right of, the first square. The third Rectangle is blue, and its upper-left position is (50, 50). Hence, the third Rectangle covers the lower-right quadrant of the first Rectangle and the upper-left quadrant of the second.

Because the third Rectangle is laid out last, it appears to be on top of the other two squares—that is, the overlapping portions assume the color of the third Rectangle.