digiKam
|
Public Types | |
enum | TransformationAction { NoTransformation = 0 , FlipHorizontal = 1 , FlipVertical = 2 , Rotate90 = 5 , Rotate180 = 6 , Rotate270 = 7 } |
Public Member Functions | |
MetaEngine::ImageOrientation | exifOrientation () const |
bool | isNoTransform () const |
MetaEngineRotation () | |
MetaEngineRotation (int m11, int m12, int m21, int m22) | |
MetaEngineRotation (MetaEngine::ImageOrientation exifOrientation) | |
MetaEngineRotation (TransformationAction action) | |
bool | operator!= (const MetaEngineRotation &ma) const |
MetaEngineRotation & | operator*= (const MetaEngineRotation &ma) |
MetaEngineRotation & | operator*= (MetaEngine::ImageOrientation exifOrientation) |
MetaEngineRotation & | operator*= (QList< TransformationAction > actions) |
MetaEngineRotation & | operator*= (TransformationAction action) |
bool | operator== (const MetaEngineRotation &ma) const |
QTransform | toTransform () const |
QList< TransformationAction > | transformations () const |
Static Public Member Functions | |
static QTransform | toTransform (MetaEngine::ImageOrientation orientation) |
Protected Member Functions | |
void | set (int m11, int m12, int m21, int m22) |
Protected Attributes | |
int | m [2][2] |
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.
Digikam::MetaEngineRotation::MetaEngineRotation | ( | ) |
Constructs the identity matrix (the matrix describing no transformation)
References set().
|
explicit |
Returns the matrix corresponding to the given TransformationAction
References Digikam::Matrix::matrix().
|
explicit |
Returns the matrix corresponding to the given TransformationAction
References exifOrientation(), and Digikam::Matrix::matrix().
Digikam::MetaEngineRotation::MetaEngineRotation | ( | int | m11, |
int | m12, | ||
int | m21, | ||
int | m22 | ||
) |
References set().
MetaEngine::ImageOrientation Digikam::MetaEngineRotation::exifOrientation | ( | ) | const |
Returns the Exif orientation flag describing this matrix. Returns ORIENTATION_UNSPECIFIED if no flag matches this matrix.
References Digikam::MetaEngine::ORIENTATION_HFLIP, Digikam::MetaEngine::ORIENTATION_NORMAL, Digikam::MetaEngine::ORIENTATION_ROT_180, Digikam::MetaEngine::ORIENTATION_ROT_270, Digikam::MetaEngine::ORIENTATION_ROT_90, Digikam::MetaEngine::ORIENTATION_ROT_90_HFLIP, Digikam::MetaEngine::ORIENTATION_ROT_90_VFLIP, Digikam::MetaEngine::ORIENTATION_UNSPECIFIED, and Digikam::MetaEngine::ORIENTATION_VFLIP.
Referenced by Digikam::LoadSaveThread::exifOrientation(), MetaEngineRotation(), operator*=(), toTransform(), and Digikam::FileActionMngrFileWorker::transform().
bool Digikam::MetaEngineRotation::isNoTransform | ( | ) | const |
Returns true of this matrix describes no transformation (is the identity matrix)
bool Digikam::MetaEngineRotation::operator!= | ( | const MetaEngineRotation & | ma | ) | const |
MetaEngineRotation & Digikam::MetaEngineRotation::operator*= | ( | const MetaEngineRotation & | ma | ) |
MetaEngineRotation & Digikam::MetaEngineRotation::operator*= | ( | MetaEngine::ImageOrientation | exifOrientation | ) |
Applies the given Exif orientation flag to this matrix
References exifOrientation(), and Digikam::Matrix::matrix().
MetaEngineRotation & Digikam::MetaEngineRotation::operator*= | ( | QList< TransformationAction > | actions | ) |
Applies the given transform actions to this matrix
References Digikam::Matrix::matrix().
MetaEngineRotation & Digikam::MetaEngineRotation::operator*= | ( | TransformationAction | action | ) |
Applies the given transform to this matrix
References Digikam::Matrix::matrix().
bool Digikam::MetaEngineRotation::operator== | ( | const MetaEngineRotation & | ma | ) | const |
References m.
|
protected |
References m.
Referenced by MetaEngineRotation(), and operator*=().
QTransform Digikam::MetaEngineRotation::toTransform | ( | ) | const |
Returns a QTransform representing this matrix
References exifOrientation().
Referenced by Digikam::LoadSaveThread::exifOrientation(), Digikam::MetaEngine::rotateExifQImage(), and Digikam::JPEGUtils::JpegRotator::updateMetadata().
|
static |
Returns a QTransform for the given Exif orientation
References Digikam::Matrix::matrix(), Digikam::MetaEngine::ORIENTATION_HFLIP, Digikam::MetaEngine::ORIENTATION_NORMAL, Digikam::MetaEngine::ORIENTATION_ROT_180, Digikam::MetaEngine::ORIENTATION_ROT_270, Digikam::MetaEngine::ORIENTATION_ROT_90, Digikam::MetaEngine::ORIENTATION_ROT_90_HFLIP, Digikam::MetaEngine::ORIENTATION_ROT_90_VFLIP, Digikam::MetaEngine::ORIENTATION_UNSPECIFIED, and Digikam::MetaEngine::ORIENTATION_VFLIP.
QList< MetaEngineRotation::TransformationAction > Digikam::MetaEngineRotation::transformations | ( | ) | const |
Returns the actions described by this matrix. 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.
Converts the mathematically correct description into the primitive operations that can be carried out losslessly.
References FlipHorizontal, FlipVertical, Rotate180, Rotate270, and Rotate90.
Referenced by Digikam::JPEGUtils::JpegRotator::exifTransform().
|
protected |
Referenced by operator*=(), operator==(), and set().