Screen with width not divisible by 8 require special care when allocating the
buffer and when handling rotation.
Define a function for getting the needed buffer size (round up to next byte).
Change how rotation is done by changing coordinates instead of direct pixel
access.