Fixing CGContextTranslateCTM: invalid context 0x0

This errors happens when the `visibleArea` width or height are zero.