Using graphics stack for parity between rectangle and graphics