fix incorrect brush drawing when rx and ry weren't the same, improve tool drawing and box drawing