Taking orientation into account.