added buffer data for rect drawing