946 // If the Devmode was obtained later on from the DocumentProperties dialog |
946 // If the Devmode was obtained later on from the DocumentProperties dialog |
947 // the DC won't have been updated and its settings may be for PORTRAIT. |
947 // the DC won't have been updated and its settings may be for PORTRAIT. |
948 // This may happen in other cases too, but was observed for the above. |
948 // This may happen in other cases too, but was observed for the above. |
949 // To get a DC compatible with this devmode we should really call |
949 // To get a DC compatible with this devmode we should really call |
950 // CreateDC() again to get a DC for the devmode we are using. |
950 // CreateDC() again to get a DC for the devmode we are using. |
951 // The changes for that are a lot more risk, so to minimise that |
951 // The changes for that are a lot more risk, so to minimize that |
952 // risk, assume its not LANDSCAPE unless width > height, even if the |
952 // risk, assume its not LANDSCAPE unless width > height, even if the |
953 // devmode says its LANDSCAPE. |
953 // devmode says its LANDSCAPE. |
954 // if the values were obtained from a rotated device, swap. |
954 // if the values were obtained from a rotated device, swap. |
955 if ((getOrientationFromDevMode2(hDevMode) == DMORIENT_LANDSCAPE) && |
955 if ((getOrientationFromDevMode2(hDevMode) == DMORIENT_LANDSCAPE) && |
956 (imgPixelWid > imgPixelHgt)) { |
956 (imgPixelWid > imgPixelHgt)) { |