OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 return static_cast<ImageOrientationEnum>(exifValue); | 77 return static_cast<ImageOrientationEnum>(exifValue); |
78 } | 78 } |
79 | 79 |
80 // This transform can be used for drawing an image according to the orientat
ion. | 80 // This transform can be used for drawing an image according to the orientat
ion. |
81 // It should be used in a right-handed coordinate system. | 81 // It should be used in a right-handed coordinate system. |
82 AffineTransform transformFromDefault(const FloatSize& drawnSize) const; | 82 AffineTransform transformFromDefault(const FloatSize& drawnSize) const; |
83 | 83 |
84 inline bool operator==(const ImageOrientation& other) const { return other.m
_orientation == m_orientation; } | 84 inline bool operator==(const ImageOrientation& other) const { return other.m
_orientation == m_orientation; } |
85 inline bool operator!=(const ImageOrientation& other) const { return !(*this
== other); } | 85 inline bool operator!=(const ImageOrientation& other) const { return !(*this
== other); } |
86 | 86 |
| 87 ImageOrientationEnum orientation() const { return m_orientation; } |
| 88 |
87 private: | 89 private: |
88 // FIXME: This only needs to be one byte. | 90 // FIXME: This only needs to be one byte. |
89 ImageOrientationEnum m_orientation; | 91 ImageOrientationEnum m_orientation; |
90 }; | 92 }; |
91 | 93 |
92 } // namespace blink | 94 } // namespace blink |
93 | 95 |
94 #endif // ImageOrientation_h | 96 #endif // ImageOrientation_h |
OLD | NEW |