Qt 4.8
Classes | Macros | Enumerations | Functions | Variables
qtessellator.cpp File Reference
#include "qtessellator_p.h"
#include <QRect>
#include <QList>
#include <QDebug>
#include <qmath.h>
#include <limits.h>

Go to the source code of this file.

Classes

struct  QCoincidingEdge
 
class  QTessellatorPrivate
 
struct  QTessellatorPrivate::Edge
 
class  QTessellatorPrivate::EdgeSorter
 
struct  QTessellatorPrivate::Intersection
 
struct  QTessellatorPrivate::IntersectionLink
 
class  QTessellatorPrivate::Scanline
 
struct  QTessellatorPrivate::Vertex
 
struct  QTessellatorPrivate::Vertices
 

Macros

#define QDEBUG   if (1){} else qDebug
 

Enumerations

enum  VertexFlags {
  LineBeforeStarts = 0x1, LineBeforeEnds = 0x2, LineBeforeHorizontal = 0x4, LineAfterStarts = 0x8,
  LineAfterEnds = 0x10, LineAfterHorizontal = 0x20
}
 

Functions

static void cancelEdges (QCoincidingEdge &e1, QCoincidingEdge &e2)
 
static bool compareVertex (const QTessellatorPrivate::Vertex *p1, const QTessellatorPrivate::Vertex *p2)
 
static void fillTrapezoid (Q27Dot5 y1, Q27Dot5 y2, int left, int right, const QTessellatorPrivate::Vertices &vertices, QTessellator::Trapezoid *trap)
 
static bool sameSign (qint64 a, qint64 b)
 

Variables

static const bool emit_clever = true
 
static const bool mark_clever = false
 

Macro Definition Documentation

◆ QDEBUG

#define QDEBUG   if (1){} else qDebug

Enumeration Type Documentation

◆ VertexFlags

Enumerator
LineBeforeStarts 
LineBeforeEnds 
LineBeforeHorizontal 
LineAfterStarts 
LineAfterEnds 
LineAfterHorizontal 

Definition at line 63 of file qtessellator.cpp.

Function Documentation

◆ cancelEdges()

static void cancelEdges ( QCoincidingEdge e1,
QCoincidingEdge e2 
)
static

Definition at line 706 of file qtessellator.cpp.

Referenced by QTessellatorPrivate::cancelCoincidingEdges().

◆ compareVertex()

static bool compareVertex ( const QTessellatorPrivate::Vertex p1,
const QTessellatorPrivate::Vertex p2 
)
inlinestatic

Definition at line 368 of file qtessellator.cpp.

Referenced by QTessellatorPrivate::collectAndSortVertices().

370 {
371  if (p1->y == p2->y) {
372  if (p1->x == p2->x)
373  return p1 < p2;
374  return p1->x < p2->x;
375  }
376  return p1->y < p2->y;
377 }

◆ fillTrapezoid()

static void fillTrapezoid ( Q27Dot5  y1,
Q27Dot5  y2,
int  left,
int  right,
const QTessellatorPrivate::Vertices vertices,
QTessellator::Trapezoid trap 
)
inlinestatic

Definition at line 588 of file qtessellator.cpp.

Referenced by QTessellatorPrivate::emitEdges().

591 {
592  trap->top = y1;
593  trap->bottom = y2;
594  const QTessellatorPrivate::Vertex *v = vertices[left];
595  trap->topLeft = v;
596  trap->bottomLeft = vertices.next(v);
597  if (trap->topLeft->y > trap->bottomLeft->y)
598  qSwap(trap->topLeft,trap->bottomLeft);
599  v = vertices[right];
600  trap->topRight = v;
601  trap->bottomRight = vertices.next(v);
602  if (trap->topRight->y > trap->bottomRight->y)
603  qSwap(trap->topRight, trap->bottomRight);
604 }
const Vertex * topRight
const Vertex * bottomLeft
QTextStream & right(QTextStream &stream)
Calls QTextStream::setFieldAlignment(QTextStream::AlignRight) on stream and returns stream...
const Vertex * bottomRight
void qSwap(T &value1, T &value2)
Definition: qglobal.h:2181
const Vertex * topLeft
QTextStream & left(QTextStream &stream)
Calls QTextStream::setFieldAlignment(QTextStream::AlignLeft) on stream and returns stream...

◆ sameSign()

static bool sameSign ( qint64  a,
qint64  b 
)
inlinestatic

Definition at line 280 of file qtessellator.cpp.

Referenced by QTessellatorPrivate::Edge::intersect().

280  {
281  return (((qint64) ((quint64) a ^ (quint64) b)) >= 0 );
282 }
long ASN1_INTEGER_get ASN1_INTEGER * a
unsigned __int64 quint64
Definition: qglobal.h:943
__int64 qint64
Definition: qglobal.h:942

Variable Documentation

◆ emit_clever

const bool emit_clever = true
static

Definition at line 60 of file qtessellator.cpp.

Referenced by QTessellatorPrivate::emitEdges().

◆ mark_clever

const bool mark_clever = false
static

Definition at line 61 of file qtessellator.cpp.

Referenced by QTessellatorPrivate::addEdges().