KExiv2Iface::RotationMatrix
#include <KExiv2/RotationMatrix>
Public Types | |
enum | TransformationAction { NoTransformation = 0 , FlipHorizontal = 1 , FlipVertical = 2 , Rotate90 = 5 , Rotate180 = 6 , Rotate270 = 7 } |
Public Member Functions | |
RotationMatrix () | |
RotationMatrix (int m11, int m12, int m21, int m22) | |
RotationMatrix (KExiv2::ImageOrientation exifOrientation) | |
RotationMatrix (TransformationAction action) | |
KExiv2::ImageOrientation | exifOrientation () const |
bool | isNoTransform () const |
bool | operator!= (const RotationMatrix &ma) const |
RotationMatrix & | operator*= (const RotationMatrix &ma) |
RotationMatrix & | operator*= (KExiv2::ImageOrientation exifOrientation) |
RotationMatrix & | operator*= (QList< TransformationAction > actions) |
RotationMatrix & | operator*= (TransformationAction action) |
bool | operator== (const RotationMatrix &ma) const |
QTransform | toTransform () const |
QList< TransformationAction > | transformations () const |
Static Public Member Functions | |
static QTransform | toTransform (KExiv2::ImageOrientation orientation) |
Protected Member Functions | |
void | set (int m11, int m12, int m21, int m22) |
Protected Attributes | |
int | m [2][2] |
Detailed Description
Definition at line 35 of file rotationmatrix.h.
Member Enumeration Documentation
◆ TransformationAction
This describes single transform primitives.
Note some of the defined Exif rotation flags combine two of these actions. The enum values correspond to those defined as JXFORM_CODE in the often used the JPEG tool transupp.h.
Enumerator | |
---|---|
FlipHorizontal | no transformation |
FlipVertical | horizontal flip |
Rotate90 | vertical flip |
Rotate180 | 90-degree clockwise rotation |
Rotate270 | 180-degree rotation |
Definition at line 46 of file rotationmatrix.h.
Constructor & Destructor Documentation
◆ RotationMatrix() [1/4]
KExiv2Iface::RotationMatrix::RotationMatrix | ( | ) |
Constructs the identity matrix (the matrix describing no transformation)
Definition at line 114 of file rotationmatrix.cpp.
◆ RotationMatrix() [2/4]
KExiv2Iface::RotationMatrix::RotationMatrix | ( | TransformationAction | action | ) |
Returns the matrix corresponding to the given TransformationAction.
Definition at line 119 of file rotationmatrix.cpp.
◆ RotationMatrix() [3/4]
KExiv2Iface::RotationMatrix::RotationMatrix | ( | KExiv2::ImageOrientation | exifOrientation | ) |
Returns the matrix corresponding to the given TransformationAction.
Definition at line 124 of file rotationmatrix.cpp.
◆ RotationMatrix() [4/4]
KExiv2Iface::RotationMatrix::RotationMatrix | ( | int | m11, |
int | m12, | ||
int | m21, | ||
int | m22 ) |
Definition at line 129 of file rotationmatrix.cpp.
Member Function Documentation
◆ exifOrientation()
KExiv2::ImageOrientation KExiv2Iface::RotationMatrix::exifOrientation | ( | ) | const |
Returns the Exif orienation flag describing this matrix.
Returns ORIENTATION_UNSPECIFIED if no flag matches this matrix.
Definition at line 231 of file rotationmatrix.cpp.
◆ isNoTransform()
bool KExiv2Iface::RotationMatrix::isNoTransform | ( | ) | const |
Returns true of this matrix describes no transformation (is the identity matrix)
Definition at line 142 of file rotationmatrix.cpp.
◆ operator!=()
bool KExiv2Iface::RotationMatrix::operator!= | ( | const RotationMatrix & | ma | ) | const |
Definition at line 163 of file rotationmatrix.cpp.
◆ operator*=() [1/4]
RotationMatrix & KExiv2Iface::RotationMatrix::operator*= | ( | const RotationMatrix & | ma | ) |
Definition at line 147 of file rotationmatrix.cpp.
◆ operator*=() [2/4]
RotationMatrix & KExiv2Iface::RotationMatrix::operator*= | ( | KExiv2::ImageOrientation | exifOrientation | ) |
Applies the given Exif orientation flag to this matrix.
Definition at line 183 of file rotationmatrix.cpp.
◆ operator*=() [3/4]
RotationMatrix & KExiv2Iface::RotationMatrix::operator*= | ( | QList< TransformationAction > | actions | ) |
Applies the given transform actions to this matrix.
Definition at line 173 of file rotationmatrix.cpp.
◆ operator*=() [4/4]
RotationMatrix & KExiv2Iface::RotationMatrix::operator*= | ( | TransformationAction | action | ) |
Applies the given transform to this matrix.
Definition at line 168 of file rotationmatrix.cpp.
◆ operator==()
bool KExiv2Iface::RotationMatrix::operator== | ( | const RotationMatrix & | ma | ) | const |
Definition at line 155 of file rotationmatrix.cpp.
◆ set()
|
protected |
Definition at line 134 of file rotationmatrix.cpp.
◆ toTransform() [1/2]
QTransform KExiv2Iface::RotationMatrix::toTransform | ( | ) | const |
Returns a QTransform representing this matrix.
- Since
- 5.1
Definition at line 270 of file rotationmatrix.cpp.
◆ toTransform() [2/2]
|
static |
Returns a QTransform for the given Exif orientation.
- Since
- 5.1
Definition at line 275 of file rotationmatrix.cpp.
◆ transformations()
QList< RotationMatrix::TransformationAction > KExiv2Iface::RotationMatrix::transformations | ( | ) | const |
Returns the actions described by this matrix.
Converts the mathematically correct description into the primitive operations that can be carried out losslessly.
The order matters. Not all possible matrices are supported, but all those that can be combined by Exif rotation flags and the transform actions above. If isNoTransform() or the matrix is not supported returns an empty list.
Definition at line 191 of file rotationmatrix.cpp.
Member Data Documentation
◆ m
|
protected |
Definition at line 130 of file rotationmatrix.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:03:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.