Qt 4.8
Classes | Macros | Functions | Variables
qtransform.cpp File Reference
#include "qtransform.h"
#include "qdatastream.h"
#include "qdebug.h"
#include "qmatrix.h"
#include "qregion.h"
#include "qpainterpath.h"
#include "qvariant.h"
#include <qmath.h>
#include <qnumeric.h>
#include <private/qbezier_p.h>

Go to the source code of this file.

Classes

struct  QHomogeneousCoordinate
 

Macros

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

Functions

static bool cubicTo_clipped (QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b, const QPointF &c, const QPointF &d, bool needsMoveTo)
 
static bool lineTo_clipped (QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b, bool needsMoveTo, bool needsLineTo=true)
 
static QHomogeneousCoordinate mapHomogeneous (const QTransform &transform, const QPointF &p)
 
static QPolygonF mapProjective (const QTransform &transform, const QPolygonF &poly)
 
static QPainterPath mapProjective (const QTransform &transform, const QPainterPath &path)
 
static bool needsPerspectiveClipping (const QRectF &rect, const QTransform &transform)
 
QDataStreamoperator<< (QDataStream &s, const QTransform &m)
 
QDebug operator<< (QDebug dbg, const QTransform &m)
 
QDataStreamoperator>> (QDataStream &s, QTransform &t)
 
Q_AUTOTEST_EXPORT QPainterPath qt_regionToPath (const QRegion &region)
 
Q_GUI_EXPORT bool qt_scaleForTransform (const QTransform &transform, qreal *scale)
 

Variables

const qreal deg2rad = qreal(0.017453292519943295769)
 
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_ + affine._dx; \
ny = FY_ + affine._dy; \
break; \
case TxScale: \
nx = affine._m11 * FX_ + affine._dx; \
ny = affine._m22 * FY_ + affine._dy; \
break; \
case TxRotate: \
case TxShear: \
case TxProject: \
nx = affine._m11 * FX_ + affine._m21 * FY_ + affine._dx; \
ny = affine._m12 * FX_ + affine._m22 * FY_ + affine._dy; \
if (t == TxProject) { \
qreal w = (m_13 * FX_ + m_23 * FY_ + m_33); \
if (w < qreal(Q_NEAR_CLIP)) w = qreal(Q_NEAR_CLIP); \
w = 1./w; \
nx *= w; \
ny *= w; \
} \
} \
} while (0)
#define Q_NEAR_CLIP
Definition: qtransform.cpp:56
double qreal
Definition: qglobal.h:1193

Definition at line 61 of file qtransform.cpp.

Referenced by QTransform::map(), QTransform::mapRect(), and QTransform::mapToPolygon().

◆ Q_NEAR_CLIP

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

Definition at line 56 of file qtransform.cpp.

Referenced by lineTo_clipped(), and needsPerspectiveClipping().

Function Documentation

◆ cubicTo_clipped()

static bool cubicTo_clipped ( QPainterPath path,
const QTransform transform,
const QPointF a,
const QPointF b,
const QPointF c,
const QPointF d,
bool  needsMoveTo 
)
inlinestatic

Definition at line 1608 of file qtransform.cpp.

Referenced by mapProjective().

1609 {
1610  // Convert projective xformed curves to line
1611  // segments so they can be transformed more accurately
1612 
1613  qreal scale;
1614  qt_scaleForTransform(transform, &scale);
1615 
1616  qreal curveThreshold = scale == 0 ? qreal(0.25) : (qreal(0.25) / scale);
1617 
1618  QPolygonF segment = QBezier::fromPoints(a, b, c, d).toPolygon(curveThreshold);
1619 
1620  for (int i = 0; i < segment.size() - 1; ++i)
1621  if (lineTo_clipped(path, transform, segment.at(i), segment.at(i+1), needsMoveTo))
1622  needsMoveTo = false;
1623 
1624  return !needsMoveTo;
1625 }
double qreal
Definition: qglobal.h:1193
Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
static QBezier fromPoints(const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4)
Definition: qbezier.cpp:71
static bool lineTo_clipped(QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b, bool needsMoveTo, bool needsLineTo=true)
The QPolygonF class provides a vector of points using floating point precision.
Definition: qpolygon.h:134
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
QPolygonF toPolygon(qreal bezier_flattening_threshold=0.5) const
Definition: qbezier.cpp:89
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137

◆ lineTo_clipped()

static bool lineTo_clipped ( QPainterPath path,
const QTransform transform,
const QPointF a,
const QPointF b,
bool  needsMoveTo,
bool  needsLineTo = true 
)
inlinestatic

Definition at line 1567 of file qtransform.cpp.

Referenced by cubicTo_clipped(), and mapProjective().

1569 {
1570  QHomogeneousCoordinate ha = mapHomogeneous(transform, a);
1571  QHomogeneousCoordinate hb = mapHomogeneous(transform, b);
1572 
1573  if (ha.w < Q_NEAR_CLIP && hb.w < Q_NEAR_CLIP)
1574  return false;
1575 
1576  if (hb.w < Q_NEAR_CLIP) {
1577  const qreal t = (Q_NEAR_CLIP - hb.w) / (ha.w - hb.w);
1578 
1579  hb.x += (ha.x - hb.x) * t;
1580  hb.y += (ha.y - hb.y) * t;
1581  hb.w = qreal(Q_NEAR_CLIP);
1582  } else if (ha.w < Q_NEAR_CLIP) {
1583  const qreal t = (Q_NEAR_CLIP - ha.w) / (hb.w - ha.w);
1584 
1585  ha.x += (hb.x - ha.x) * t;
1586  ha.y += (hb.y - ha.y) * t;
1587  ha.w = qreal(Q_NEAR_CLIP);
1588 
1589  const QPointF p = ha.toPoint();
1590  if (needsMoveTo) {
1591  path.moveTo(p);
1592  needsMoveTo = false;
1593  } else {
1594  path.lineTo(p);
1595  }
1596  }
1597 
1598  if (needsMoveTo)
1599  path.moveTo(ha.toPoint());
1600 
1601  if (needsLineTo)
1602  path.lineTo(hb.toPoint());
1603 
1604  return true;
1605 }
#define Q_NEAR_CLIP
Definition: qtransform.cpp:56
double qreal
Definition: qglobal.h:1193
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:214
void moveTo(const QPointF &p)
Moves the current point to the given point, implicitly starting a new subpath and closing the previou...
void lineTo(const QPointF &p)
Adds a straight line from the current position to the given endPoint.
static QHomogeneousCoordinate mapHomogeneous(const QTransform &transform, const QPointF &p)
const QPointF toPoint() const

◆ mapHomogeneous()

static QHomogeneousCoordinate mapHomogeneous ( const QTransform transform,
const QPointF p 
)
inlinestatic

Definition at line 1558 of file qtransform.cpp.

Referenced by lineTo_clipped().

1559 {
1561  c.x = transform.m11() * p.x() + transform.m21() * p.y() + transform.m31();
1562  c.y = transform.m12() * p.x() + transform.m22() * p.y() + transform.m32();
1563  c.w = transform.m13() * p.x() + transform.m23() * p.y() + transform.m33();
1564  return c;
1565 }
unsigned char c[8]
Definition: qnumeric_p.h:62
qreal m32() const
Returns the vertical translation factor.
Definition: qtransform.h:265
qreal m21() const
Returns the horizontal shearing factor.
Definition: qtransform.h:249
qreal m22() const
Returns the vertical scaling factor.
Definition: qtransform.h:253
qreal x() const
Returns the x-coordinate of this point.
Definition: qpoint.h:282
qreal m12() const
Returns the vertical shearing factor.
Definition: qtransform.h:241
qreal m31() const
Returns the horizontal translation factor.
Definition: qtransform.h:261
qreal m23() const
Returns the vertical projection factor.
Definition: qtransform.h:257
qreal y() const
Returns the y-coordinate of this point.
Definition: qpoint.h:287
qreal m13() const
Returns the horizontal projection factor.
Definition: qtransform.h:245
qreal m11() const
Returns the horizontal scaling factor.
Definition: qtransform.h:237
qreal m33() const
Returns the division factor.
Definition: qtransform.h:269

◆ mapProjective() [1/2]

static QPolygonF mapProjective ( const QTransform transform,
const QPolygonF poly 
)
static

Definition at line 1393 of file qtransform.cpp.

Referenced by QTransform::map().

1394 {
1395  if (poly.size() == 0)
1396  return poly;
1397 
1398  if (poly.size() == 1)
1399  return QPolygonF() << transform.map(poly.at(0));
1400 
1401  QPainterPath path;
1402  path.addPolygon(poly);
1403 
1404  path = transform.map(path);
1405 
1406  QPolygonF result;
1407  for (int i = 0; i < path.elementCount(); ++i)
1408  result << path.elementAt(i);
1409  return result;
1410 }
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
Definition: qpainterpath.h:67
void addPolygon(const QPolygonF &polygon)
Adds the given polygon to the path as an (unclosed) subpath.
const QPainterPath::Element & elementAt(int i) const
Returns the element at the given index in the painter path.
Definition: qpainterpath.h:402
The QPolygonF class provides a vector of points using floating point precision.
Definition: qpolygon.h:134
QPoint map(const QPoint &p) const
Creates and returns a QPoint object that is a copy of the given point, mapped into the coordinate sys...
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
int elementCount() const
Returns the number of path elements in the painter path.
Definition: qpainterpath.h:397
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137

◆ mapProjective() [2/2]

static QPainterPath mapProjective ( const QTransform transform,
const QPainterPath path 
)
static

Definition at line 1627 of file qtransform.cpp.

1628 {
1629  QPainterPath result;
1630 
1631  QPointF last;
1632  QPointF lastMoveTo;
1633  bool needsMoveTo = true;
1634  for (int i = 0; i < path.elementCount(); ++i) {
1635  switch (path.elementAt(i).type) {
1637  if (i > 0 && lastMoveTo != last)
1638  lineTo_clipped(result, transform, last, lastMoveTo, needsMoveTo);
1639 
1640  lastMoveTo = path.elementAt(i);
1641  last = path.elementAt(i);
1642  needsMoveTo = true;
1643  break;
1645  if (lineTo_clipped(result, transform, last, path.elementAt(i), needsMoveTo))
1646  needsMoveTo = false;
1647  last = path.elementAt(i);
1648  break;
1650  if (cubicTo_clipped(result, transform, last, path.elementAt(i), path.elementAt(i+1), path.elementAt(i+2), needsMoveTo))
1651  needsMoveTo = false;
1652  i += 2;
1653  last = path.elementAt(i);
1654  break;
1655  default:
1656  Q_ASSERT(false);
1657  }
1658  }
1659 
1660  if (path.elementCount() > 0 && lastMoveTo != last)
1661  lineTo_clipped(result, transform, last, lastMoveTo, needsMoveTo, false);
1662 
1663  result.setFillRule(path.fillRule());
1664  return result;
1665 }
ElementType type
the type of element
Definition: qpainterpath.h:81
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
Definition: qpainterpath.h:67
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:214
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
const QPainterPath::Element & elementAt(int i) const
Returns the element at the given index in the painter path.
Definition: qpainterpath.h:402
void setFillRule(Qt::FillRule fillRule)
Sets the fill rule of the painter path to the given fillRule.
static bool lineTo_clipped(QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b, bool needsMoveTo, bool needsLineTo=true)
Qt::FillRule fillRule() const
Returns the painter path&#39;s currently set fill rule.
int elementCount() const
Returns the number of path elements in the painter path.
Definition: qpainterpath.h:397
static bool cubicTo_clipped(QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b, const QPointF &c, const QPointF &d, bool needsMoveTo)

◆ needsPerspectiveClipping()

static bool needsPerspectiveClipping ( const QRectF rect,
const QTransform transform 
)
inlinestatic

Definition at line 1912 of file qtransform.cpp.

Referenced by QTransform::mapRect().

1913 {
1914  const qreal wx = qMin(transform.m13() * rect.left(), transform.m13() * rect.right());
1915  const qreal wy = qMin(transform.m23() * rect.top(), transform.m23() * rect.bottom());
1916 
1917  return wx + wy + transform.m33() < Q_NEAR_CLIP;
1918 }
#define Q_NEAR_CLIP
Definition: qtransform.cpp:56
qreal right() const
Returns the x-coordinate of the rectangle&#39;s right edge.
Definition: qrect.h:527
double qreal
Definition: qglobal.h:1193
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
qreal left() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:525
qreal m23() const
Returns the vertical projection factor.
Definition: qtransform.h:257
qreal top() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:526
qreal m13() const
Returns the horizontal projection factor.
Definition: qtransform.h:245
qreal bottom() const
Returns the y-coordinate of the rectangle&#39;s bottom edge.
Definition: qrect.h:528
qreal m33() const
Returns the division factor.
Definition: qtransform.h:269

◆ operator<<() [1/2]

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

Definition at line 1064 of file qtransform.cpp.

Referenced by qFuzzyCompare().

1065 {
1066  s << double(m.m11())
1067  << double(m.m12())
1068  << double(m.m13())
1069  << double(m.m21())
1070  << double(m.m22())
1071  << double(m.m23())
1072  << double(m.m31())
1073  << double(m.m32())
1074  << double(m.m33());
1075  return s;
1076 }
qreal m32() const
Returns the vertical translation factor.
Definition: qtransform.h:265
qreal m21() const
Returns the horizontal shearing factor.
Definition: qtransform.h:249
qreal m22() const
Returns the vertical scaling factor.
Definition: qtransform.h:253
qreal m12() const
Returns the vertical shearing factor.
Definition: qtransform.h:241
qreal m31() const
Returns the horizontal translation factor.
Definition: qtransform.h:261
qreal m23() const
Returns the vertical projection factor.
Definition: qtransform.h:257
qreal m13() const
Returns the horizontal projection factor.
Definition: qtransform.h:245
qreal m11() const
Returns the horizontal scaling factor.
Definition: qtransform.h:237
qreal m33() const
Returns the division factor.
Definition: qtransform.h:269

◆ operator<<() [2/2]

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

Definition at line 1115 of file qtransform.cpp.

1116 {
1117  static const char *typeStr[] =
1118  {
1119  "TxNone",
1120  "TxTranslate",
1121  "TxScale",
1122  0,
1123  "TxRotate",
1124  0, 0, 0,
1125  "TxShear",
1126  0, 0, 0, 0, 0, 0, 0,
1127  "TxProject"
1128  };
1129 
1130  dbg.nospace() << "QTransform(type=" << typeStr[m.type()] << ','
1131  << " 11=" << m.m11()
1132  << " 12=" << m.m12()
1133  << " 13=" << m.m13()
1134  << " 21=" << m.m21()
1135  << " 22=" << m.m22()
1136  << " 23=" << m.m23()
1137  << " 31=" << m.m31()
1138  << " 32=" << m.m32()
1139  << " 33=" << m.m33()
1140  << ')';
1141 
1142  return dbg.space();
1143 }
qreal m32() const
Returns the vertical translation factor.
Definition: qtransform.h:265
QDebug & nospace()
Clears the stream&#39;s internal flag that records whether the last character was a space and returns a r...
Definition: qdebug.h:92
qreal m21() const
Returns the horizontal shearing factor.
Definition: qtransform.h:249
qreal m22() const
Returns the vertical scaling factor.
Definition: qtransform.h:253
TransformationType type() const
Returns the transformation type of this matrix.
qreal m12() const
Returns the vertical shearing factor.
Definition: qtransform.h:241
qreal m31() const
Returns the horizontal translation factor.
Definition: qtransform.h:261
qreal m23() const
Returns the vertical projection factor.
Definition: qtransform.h:257
qreal m13() const
Returns the horizontal projection factor.
Definition: qtransform.h:245
QDebug & space()
Writes a space character to the debug stream and returns a reference to the stream.
Definition: qdebug.h:91
qreal m11() const
Returns the horizontal scaling factor.
Definition: qtransform.h:237
qreal m33() const
Returns the division factor.
Definition: qtransform.h:269

◆ operator>>()

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

Definition at line 1091 of file qtransform.cpp.

Referenced by qFuzzyCompare().

1092 {
1093  double m11, m12, m13,
1094  m21, m22, m23,
1095  m31, m32, m33;
1096 
1097  s >> m11;
1098  s >> m12;
1099  s >> m13;
1100  s >> m21;
1101  s >> m22;
1102  s >> m23;
1103  s >> m31;
1104  s >> m32;
1105  s >> m33;
1106  t.setMatrix(m11, m12, m13,
1107  m21, m22, m23,
1108  m31, m32, m33);
1109  return s;
1110 }
void setMatrix(qreal m11, qreal m12, qreal m13, qreal m21, qreal m22, qreal m23, qreal m31, qreal m32, qreal m33)
Sets the matrix elements to the specified values, m11, m12, m13 m21, m22, m23 m31, m32 and m33.

◆ qt_regionToPath()

Q_AUTOTEST_EXPORT QPainterPath qt_regionToPath ( const QRegion region)

Definition at line 1160 of file qregion.cpp.

Referenced by QTransform::map().

1161 {
1162  QPainterPath result;
1163  if (region.rectCount() == 1) {
1164  result.addRect(region.boundingRect());
1165  return result;
1166  }
1167 
1168  const QVector<QRect> rects = region.rects();
1169 
1170  QVarLengthArray<Segment> segments;
1171  segments.resize(4 * rects.size());
1172 
1173  const QRect *rect = rects.constData();
1174  const QRect *end = rect + rects.size();
1175 
1176  int lastRowSegmentCount = 0;
1177  Segment *lastRowSegments = 0;
1178 
1179  int lastSegment = 0;
1180  int lastY = 0;
1181  while (rect != end) {
1182  const int y = rect[0].y();
1183  int count = 0;
1184  while (&rect[count] != end && rect[count].y() == y)
1185  ++count;
1186 
1187  for (int i = 0; i < count; ++i) {
1188  int offset = lastSegment + i;
1189  segments[offset] = Segment(rect[i].topLeft());
1190  segments[offset += count] = Segment(rect[i].topRight() + QPoint(1, 0));
1191  segments[offset += count] = Segment(rect[i].bottomRight() + QPoint(1, 1));
1192  segments[offset += count] = Segment(rect[i].bottomLeft() + QPoint(0, 1));
1193 
1194  offset = lastSegment + i;
1195  for (int j = 0; j < 4; ++j)
1196  segments[offset + j * count].connect(segments[offset + ((j + 1) % 4) * count]);
1197  }
1198 
1199  if (lastRowSegments && lastY == y)
1200  mergeSegments(lastRowSegments, lastRowSegmentCount, &segments[lastSegment], count);
1201 
1202  lastRowSegments = &segments[lastSegment + 2 * count];
1203  lastRowSegmentCount = count;
1204  lastSegment += 4 * count;
1205  lastY = y + rect[0].height();
1206  rect += count;
1207  }
1208 
1209  for (int i = 0; i < lastSegment; ++i) {
1210  Segment *segment = &segments[i];
1211  if (!segment->added)
1212  addSegmentsToPath(segment, result);
1213  }
1214 
1215  return result;
1216 }
void resize(int size)
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
Definition: qpainterpath.h:67
QRect boundingRect() const
Returns the bounding rectangle of this region.
Definition: qregion.cpp:4363
int height() const
Returns the height of the rectangle.
Definition: qrect.h:306
int rectCount() const
Returns the number of rectangles that will be returned in rects().
Definition: qregion.cpp:4461
void addRect(const QRectF &rect)
Adds the given rectangle to this path as a closed subpath.
int y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:255
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
QVector< QRect > rects() const
Returns an array of non-overlapping rectangles that make up the region.
Definition: qregion.cpp:4412
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
const T * constData() const
Returns a const pointer to the data stored in the vector.
Definition: qvector.h:154
static const KeyPair *const end
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137

◆ qt_scaleForTransform()

Q_GUI_EXPORT bool qt_scaleForTransform ( const QTransform transform,
qreal scale 
)

Definition at line 2407 of file qtransform.cpp.

Referenced by QPaintEngineEx::createState(), cubicTo_clipped(), QPixmapBlurFilter::draw(), QGL2PaintEngineEx::fill(), lineTo_clipped(), qt_blurImage(), QStrokerOps::setCurveThresholdFromTransform(), QVGPaintEnginePrivate::setTransform(), QGL2PaintEngineEx::stroke(), QOpenGLPaintEnginePrivate::strokeLines(), QOpenGLPaintEnginePrivate::strokePath(), QX11PaintEngine::updateMatrix(), QRasterPaintEngine::updateMatrix(), and QVGPaintEnginePrivate::updateTransform().

2408 {
2409  const QTransform::TransformationType type = transform.type();
2410  if (type <= QTransform::TxTranslate) {
2411  if (scale)
2412  *scale = 1;
2413  return true;
2414  } else if (type == QTransform::TxScale) {
2415  const qreal xScale = qAbs(transform.m11());
2416  const qreal yScale = qAbs(transform.m22());
2417  if (scale)
2418  *scale = qMax(xScale, yScale);
2419  return qFuzzyCompare(xScale, yScale);
2420  }
2421 
2422  const qreal xScale = transform.m11() * transform.m11()
2423  + transform.m21() * transform.m21();
2424  const qreal yScale = transform.m12() * transform.m12()
2425  + transform.m22() * transform.m22();
2426  if (scale)
2427  *scale = qSqrt(qMax(xScale, yScale));
2428  return type == QTransform::TxRotate && qFuzzyCompare(xScale, yScale);
2429 }
int type
Definition: qmetatype.cpp:239
double qreal
Definition: qglobal.h:1193
qreal m21() const
Returns the horizontal shearing factor.
Definition: qtransform.h:249
qreal m22() const
Returns the vertical scaling factor.
Definition: qtransform.h:253
Q_DECL_CONSTEXPR T qAbs(const T &t)
Definition: qglobal.h:1201
TransformationType type() const
Returns the transformation type of this matrix.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
qreal m12() const
Returns the vertical shearing factor.
Definition: qtransform.h:241
TransformationType
Definition: qtransform.h:68
bool qFuzzyCompare(const QMatrix &m1, const QMatrix &m2)
The qFuzzyCompare function is for comparing two matrices using a fuzziness factor.
Definition: qmatrix.h:172
qreal qSqrt(qreal v)
Definition: qmath.h:205
qreal m11() const
Returns the horizontal scaling factor.
Definition: qtransform.h:237

Variable Documentation

◆ deg2rad

const qreal deg2rad = qreal(0.017453292519943295769)

Definition at line 595 of file qtransform.cpp.

Referenced by QTransform::rotate().

◆ inv_dist_to_plane

const qreal inv_dist_to_plane = 1. / 1024.

Definition at line 596 of file qtransform.cpp.

Referenced by QTransform::rotate(), and QTransform::rotateRadians().