KExiv2Iface::RotationMatrix

Search for usage in LXR

#include <KExiv2/RotationMatrix>

Public Types

enum  TransformationAction {
  NoTransformation = 0, FlipHorizontal = 1, FlipVertical = 2, Rotate90 = 5,
  Rotate180 = 6, Rotate270 = 7
}
 

Public Member Functions

 RotationMatrix ()
 
 RotationMatrix (TransformationAction action)
 
 RotationMatrix (KExiv2::ImageOrientation exifOrientation)
 
 RotationMatrix (int m11, int m12, int m21, int m22)
 
KExiv2::ImageOrientation exifOrientation () const
 
bool isNoTransform () const
 
bool operator!= (const RotationMatrix &ma) const
 
RotationMatrixoperator*= (const RotationMatrix &ma)
 
RotationMatrixoperator*= (TransformationAction action)
 
RotationMatrixoperator*= (QList< TransformationAction > actions)
 
RotationMatrixoperator*= (KExiv2::ImageOrientation exifOrientation)
 
bool operator== (const RotationMatrix &ma) const
 
QMatrix toMatrix () const
 
QList< TransformationActiontransformations () const
 

Static Public Member Functions

static QMatrix toMatrix (KExiv2::ImageOrientation orientation)
 

Protected Member Functions

void set (int m11, int m12, int m21, int m22)
 

Protected Attributes

int m [2][2]
 

Detailed Description

RotationMatrix.

Definition at line 29 of file rotationmatrix.h.

Member Enumeration Documentation

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 40 of file rotationmatrix.h.

Constructor & Destructor Documentation

KExiv2Iface::RotationMatrix::RotationMatrix ( )

Constructs the identity matrix (the matrix describing no transformation)

Definition at line 114 of file rotationmatrix.cpp.

KExiv2Iface::RotationMatrix::RotationMatrix ( TransformationAction  action)

Returns the matrix corresponding to the given TransformationAction.

Definition at line 119 of file rotationmatrix.cpp.

KExiv2Iface::RotationMatrix::RotationMatrix ( KExiv2::ImageOrientation  exifOrientation)

Returns the matrix corresponding to the given TransformationAction.

Definition at line 124 of file rotationmatrix.cpp.

Member Function Documentation

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.

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.

RotationMatrix & KExiv2Iface::RotationMatrix::operator*= ( TransformationAction  action)

Applies the given transform to this matrix.

Definition at line 168 of file rotationmatrix.cpp.

RotationMatrix & KExiv2Iface::RotationMatrix::operator*= ( QList< TransformationAction actions)

Applies the given transform actions to this matrix.

Definition at line 173 of file rotationmatrix.cpp.

RotationMatrix & KExiv2Iface::RotationMatrix::operator*= ( KExiv2::ImageOrientation  exifOrientation)

Applies the given Exif orientation flag to this matrix.

Definition at line 183 of file rotationmatrix.cpp.

QMatrix KExiv2Iface::RotationMatrix::toMatrix ( ) const

Returns a QMatrix representing this matrix.

Definition at line 270 of file rotationmatrix.cpp.

QMatrix KExiv2Iface::RotationMatrix::toMatrix ( KExiv2::ImageOrientation  orientation)
static

Returns a QMatrix for the given Exif orientation.

Definition at line 275 of file rotationmatrix.cpp.

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.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Jun 20 2021 22:35:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.