Support rotation and landscape orientation

This should resolve #12 and #24.