Use element dimensions for painting