Rewrote rectangle primitive