Qt 4.8
Public Functions | Private Functions | Properties | List of all members
QGLPathMaskGenerator Class Reference
Inheritance diagram for QGLPathMaskGenerator:
QGLTrapezoidMaskGenerator QGLMaskGenerator

Public Functions

 QGLPathMaskGenerator (const QPainterPath &path, const QTransform &matrix, QGLOffscreen &offscreen, GLuint maskFragmentProgram)
 
- Public Functions inherited from QGLTrapezoidMaskGenerator
void drawMask (const QRect &rect)
 
 QGLTrapezoidMaskGenerator (const QPainterPath &path, const QTransform &matrix, QGLOffscreen &offscreen, GLuint maskFragmentProgram, qreal strokeWidth=-1.0)
 
QRect screenRect ()
 
- Public Functions inherited from QGLMaskGenerator
QTransform matrix () const
 
QPainterPath path () const
 
 QGLMaskGenerator (const QPainterPath &path, const QTransform &matrix, qreal stroke_width=-1)
 
qreal strokeWidth () const
 
virtual ~QGLMaskGenerator ()
 

Private Functions

QRect computeScreenRect ()
 
QVector< QGLTrapezoidgenerateTrapezoids ()
 

Properties

QPolygonF poly
 

Detailed Description

Definition at line 3052 of file qpaintengine_opengl.cpp.

Constructors and Destructors

◆ QGLPathMaskGenerator()

QGLPathMaskGenerator::QGLPathMaskGenerator ( const QPainterPath path,
const QTransform matrix,
QGLOffscreen offscreen,
GLuint  maskFragmentProgram 
)

Definition at line 3187 of file qpaintengine_opengl.cpp.

3188  : QGLTrapezoidMaskGenerator(path, matrix, offs, program)
3189 {
3190 }
QGLTrapezoidMaskGenerator(const QPainterPath &path, const QTransform &matrix, QGLOffscreen &offscreen, GLuint maskFragmentProgram, qreal strokeWidth=-1.0)

Functions

◆ computeScreenRect()

QRect QGLPathMaskGenerator::computeScreenRect ( )
privatevirtual

Implements QGLTrapezoidMaskGenerator.

Definition at line 3192 of file qpaintengine_opengl.cpp.

3193 {
3194  poly = path().toFillPolygon(matrix());
3195  return poly.boundingRect().toAlignedRect();
3196 }
QRect toAlignedRect() const
Returns a QRect based on the values of this rectangle that is the smallest possible integer rectangle...
Definition: qrect.cpp:2817
QRectF boundingRect() const
Returns the bounding rectangle of the polygon, or QRectF(0,0,0,0) if the polygon is empty...
Definition: qpolygon.cpp:742
QPolygonF toFillPolygon(const QMatrix &matrix=QMatrix()) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
QTransform matrix() const
QPainterPath path() const

◆ generateTrapezoids()

QVector< QGLTrapezoid > QGLPathMaskGenerator::generateTrapezoids ( )
privatevirtual

Implements QGLTrapezoidMaskGenerator.

Definition at line 3198 of file qpaintengine_opengl.cpp.

3199 {
3200  QOpenGLImmediateModeTessellator tessellator;
3201  tessellator.tessellate(poly.data(), poly.count(), path().fillRule() == Qt::WindingFill);
3202  return tessellator.trapezoids;
3203 }
int count(const T &t) const
Returns the number of occurrences of value in the vector.
Definition: qvector.h:742
Qt::FillRule fillRule() const
Returns the painter path&#39;s currently set fill rule.
void tessellate(const QPointF *points, int nPoints, bool winding)
T * data()
Returns a pointer to the data stored in the vector.
Definition: qvector.h:152
QPainterPath path() const

Properties

◆ poly

QPolygonF QGLPathMaskGenerator::poly
private

Definition at line 3061 of file qpaintengine_opengl.cpp.

Referenced by computeScreenRect(), and generateTrapezoids().


The documentation for this class was generated from the following file: