fix size of paintbuffer