Qt 4.8
Macros | Functions | Variables
qoutlinemapper.cpp File Reference
#include "qoutlinemapper_p.h"
#include <private/qpainterpath_p.h>
#include "qmath.h"
#include <stdlib.h>

Go to the source code of this file.

Macros

#define qreal_to_fixed_26_6(f)   (int(f * 64))
 

Functions

static const QRectF boundingRect (const QPointF *points, int pointCount)
 

Variables

static const qreal aliasedCoordinateDelta = 0.5 - 0.015625
 

Macro Definition Documentation

◆ qreal_to_fixed_26_6

#define qreal_to_fixed_26_6 (   f)    (int(f * 64))

Definition at line 52 of file qoutlinemapper.cpp.

Referenced by QOutlineMapper::convertElements().

Function Documentation

◆ boundingRect()

static const QRectF boundingRect ( const QPointF points,
int  pointCount 
)
static

Definition at line 57 of file qoutlinemapper.cpp.

Referenced by QAlphaPaintEnginePrivate::addPenWidth(), adjustedItemBoundingRect(), adjustedItemEffectiveBoundingRect(), QmlJSDebugger::QDeclarativeViewInspector::adjustToScreenBoundaries(), QFontMetrics::boundingRect(), QPainter::boundingRect(), QPrintPreviewWidgetPrivate::calcCurrentPage(), QGraphicsItemEffectSourcePrivate::deviceRect(), QWidgetEffectSourcePrivate::deviceRect(), QTextLayout::draw(), QPainterPrivate::draw_helper(), QPainterPrivate::drawStretchedGradient(), QGL2PaintEngineExPrivate::drawVertexArrays(), QPicturePaintEngine::end(), QOutlineMapper::endOutline(), QGraphicsViewPrivate::findItems(), QIntersectionFinder::hasIntersections(), QGraphicsScene::itemsBoundingRect(), QFontMetrics::operator!=(), QDecorationWindows::paintButton(), QDecorationDefault::paintButton(), QGraphicsView::paintEvent(), QWidgetPrivate::paintSiblingsRecursive(), QmlJSDebugger::LiveSelectionRectangle::rect(), QWidgetPrivate::screenGeometry(), QGLEllipseMaskGenerator::screenRect(), QX11WindowSurface::setGeometry(), QmlJSDebugger::LiveSelectionIndicator::setItems(), QWSServer::setMaxWindowRect(), QGraphicsItem::setTransformOriginPoint(), QGL2PEXVertexArray::stopCount(), QPolygon::swap(), QPainterPath::swap(), QPainter::testRenderHint(), QGraphicsView::updateScene(), QGraphicsScenePrivate::updateTouchPointsForItem(), and QRegion::xored().

58 {
59  const QPointF *e = points;
60  const QPointF *last = points + pointCount;
61  qreal minx, maxx, miny, maxy;
62  minx = maxx = e->x();
63  miny = maxy = e->y();
64  while (++e < last) {
65  if (e->x() < minx)
66  minx = e->x();
67  else if (e->x() > maxx)
68  maxx = e->x();
69  if (e->y() < miny)
70  miny = e->y();
71  else if (e->y() > maxy)
72  maxy = e->y();
73  }
74  return QRectF(QPointF(minx, miny), QPointF(maxx, maxy));
75 }
double qreal
Definition: qglobal.h:1193
The QPointF class defines a point in the plane using floating point precision.
Definition: qpoint.h:214
qreal x() const
Returns the x-coordinate of this point.
Definition: qpoint.h:282
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511
qreal y() const
Returns the y-coordinate of this point.
Definition: qpoint.h:287

Variable Documentation

◆ aliasedCoordinateDelta

const qreal aliasedCoordinateDelta = 0.5 - 0.015625
static

Definition at line 50 of file qoutlinemapper.cpp.