QtBase  v6.3.1
Classes | Macros | Functions | Variables
qtransform.cpp File Reference
#include "qtransform.h"
#include "qdatastream.h"
#include "qdebug.h"
#include "qhashfunctions.h"
#include "qregion.h"
#include "qpainterpath.h"
#include "qpainterpath_p.h"
#include "qvariant.h"
#include "qmath_p.h"
#include <qnumeric.h>
#include <private/qbezier_p.h>
Include dependency graph for qtransform.cpp:

Go to the source code of this file.

Classes

struct  QHomogeneousCoordinate
 

Macros

#define Q_NEAR_CLIP   (sizeof(qreal) == sizeof(double) ? 0.000001 : 0.0001)
 
#define MAP(x, y, nx, ny)
 

Functions

QDataStreamoperator<< (QDataStream &s, const QTransform &m)
 
QDataStreamoperator>> (QDataStream &s, QTransform &t)
 
QDebug operator<< (QDebug dbg, const QTransform &m)
 
QPainterPath qt_regionToPath (const QRegion &region)
 
Q_GUI_EXPORT bool qt_scaleForTransform (const QTransform &transform, qreal *scale)
 
QDataStreamoperator>> (QDataStream &s, QTransform::Affine &m)
 
QDataStreamoperator<< (QDataStream &s, const QTransform::Affine &m)
 

Variables

const qreal inv_dist_to_plane = 1. / 1024.
 

Macro Definition Documentation

◆ MAP

#define MAP (   x,
  y,
  nx,
  ny 
)
Value:
do { \
qreal FX_ = x; \
qreal FY_ = y; \
switch(t) { \
case TxNone: \
nx = FX_; \
ny = FY_; \
break; \
case TxTranslate: \
nx = FX_ + m_matrix[2][0]; \
ny = FY_ + m_matrix[2][1]; \
break; \
case TxScale: \
nx = m_matrix[0][0] * FX_ + m_matrix[2][0]; \
ny = m_matrix[1][1] * FY_ + m_matrix[2][1]; \
break; \
case TxRotate: \
case TxShear: \
case TxProject: \
nx = m_matrix[0][0] * FX_ + m_matrix[1][0] * FY_ + m_matrix[2][0]; \
ny = m_matrix[0][1] * FX_ + m_matrix[1][1] * FY_ + m_matrix[2][1]; \
if (t == TxProject) { \
qreal w = (m_matrix[0][2] * FX_ + m_matrix[1][2] * FY_ + m_matrix[2][2]); \
w = 1./w; \
nx *= w; \
ny *= w; \
} \
} \
} while (0)
QT_END_INCLUDE_NAMESPACE typedef double qreal
Definition: qglobal.h:341
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint y
GLdouble GLdouble t
[9]
Definition: qopenglext.h:243
#define Q_NEAR_CLIP
Definition: qtransform.cpp:63

Definition at line 68 of file qtransform.cpp.

◆ Q_NEAR_CLIP

#define Q_NEAR_CLIP   (sizeof(qreal) == sizeof(double) ? 0.000001 : 0.0001)

Definition at line 63 of file qtransform.cpp.

Function Documentation

◆ operator<<() [1/3]

QDataStream& operator<< ( QDataStream s,
const QTransform m 
)
related

Definition at line 1034 of file qtransform.cpp.

◆ operator<<() [2/3]

QDataStream& operator<< ( QDataStream s,
const QTransform::Affine &  m 
)

Definition at line 2350 of file qtransform.cpp.

◆ operator<<() [3/3]

QDebug operator<< ( QDebug  dbg,
const QTransform m 
)

Definition at line 1082 of file qtransform.cpp.

◆ operator>>() [1/2]

QDataStream& operator>> ( QDataStream s,
QTransform t 
)
related

Definition at line 1058 of file qtransform.cpp.

◆ operator>>() [2/2]

QDataStream& operator>> ( QDataStream s,
QTransform::Affine &  m 
)

Definition at line 2324 of file qtransform.cpp.

◆ qt_regionToPath()

QPainterPath qt_regionToPath ( const QRegion region)

Definition at line 1043 of file qregion.cpp.

◆ qt_scaleForTransform()

Q_GUI_EXPORT bool qt_scaleForTransform ( const QTransform transform,
qreal scale 
)

Definition at line 2283 of file qtransform.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ inv_dist_to_plane

const qreal inv_dist_to_plane = 1. / 1024.

Definition at line 572 of file qtransform.cpp.