Qt 4.8
Public Functions | Public Variables | List of all members
QPaintEngineExPrivate Class Reference

#include <qpaintengineex_p.h>

Inheritance diagram for QPaintEngineExPrivate:
QPaintEnginePrivate QGL2PaintEngineExPrivate QOpenGLPaintEnginePrivate QPaintBufferEnginePrivate QRasterPaintEnginePrivate QVGPaintEnginePrivate QBlitterPaintEnginePrivate QDirectFBPaintEnginePrivate QVolatileImagePaintEnginePrivate

Public Functions

bool hasClipOperations () const
 
 QPaintEngineExPrivate ()
 
void replayClipOperations ()
 
 ~QPaintEngineExPrivate ()
 
- Public Functions inherited from QPaintEnginePrivate
void drawBoxTextItem (const QPointF &p, const QTextItemInt &ti)
 
 QPaintEnginePrivate ()
 
void setSystemTransform (const QTransform &xform)
 
void setSystemViewport (const QRegion &region)
 
virtual void systemStateChanged ()
 
void transformSystemClip ()
 
virtual ~QPaintEnginePrivate ()
 

Public Variables

QStrokerOpsactiveStroker
 
QDashStroker dasher
 
QRect exDeviceRect
 
StrokeHandlerstrokeHandler
 
QStroker stroker
 
QPen strokerPen
 
- Public Variables inherited from QPaintEnginePrivate
QWidgetcurrentClipWidget
 
uint hasSystemTransform: 1
 
uint hasSystemViewport: 1
 
QPaintDevicepdev
 
QPaintEngineq_ptr
 
QRegion systemClip
 
QRect systemRect
 
QTransform systemTransform
 
QRegion systemViewport
 

Detailed Description

Definition at line 238 of file qpaintengineex_p.h.

Constructors and Destructors

◆ QPaintEngineExPrivate()

QPaintEngineExPrivate::QPaintEngineExPrivate ( )

Definition at line 160 of file qpaintengineex.cpp.

161  : dasher(&stroker),
162  strokeHandler(0),
163  activeStroker(0),
165 {
166 }
QStrokerOps * activeStroker
StrokeHandler * strokeHandler

◆ ~QPaintEngineExPrivate()

QPaintEngineExPrivate::~QPaintEngineExPrivate ( )

Definition at line 169 of file qpaintengineex.cpp.

170 {
171  delete strokeHandler;
172 }
StrokeHandler * strokeHandler

Functions

◆ hasClipOperations()

bool QPaintEngineExPrivate::hasClipOperations ( ) const

Definition at line 226 of file qpaintengineex.cpp.

227 {
228  Q_Q(const QPaintEngineEx);
229 
230  QPainter *p = q->painter();
231  if (!p || !p->d_ptr)
232  return false;
233 
235 
236  return !clipInfo.isEmpty();
237 }
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:86
QPainterState * state
Definition: qpainter_p.h:204
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
#define Q_Q(Class)
Definition: qglobal.h:2483
QList< QPainterClipInfo > clipInfo
Definition: qpainter_p.h:159
QScopedPointer< QPainterPrivate > d_ptr
Definition: qpainter.h:546

◆ replayClipOperations()

void QPaintEngineExPrivate::replayClipOperations ( )

Definition at line 175 of file qpaintengineex.cpp.

176 {
178 
179  QPainter *p = q->painter();
180  if (!p || !p->d_ptr)
181  return;
182 
184 
185  QTransform transform = q->state()->matrix;
186 
187  for (int i = 0; i < clipInfo.size(); ++i) {
188  const QPainterClipInfo &info = clipInfo.at(i);
189 
190  if (info.matrix != q->state()->matrix) {
191  q->state()->matrix = info.matrix;
192  q->transformChanged();
193  }
194 
195  switch (info.clipType) {
197  q->clip(info.region, info.operation);
198  break;
200  q->clip(info.path, info.operation);
201  break;
203  q->clip(info.rect, info.operation);
204  break;
206  qreal right = info.rectf.x() + info.rectf.width();
207  qreal bottom = info.rectf.y() + info.rectf.height();
208  qreal pts[] = { info.rectf.x(), info.rectf.y(),
209  right, info.rectf.y(),
210  right, bottom,
211  info.rectf.x(), bottom };
213  q->clip(vp, info.operation);
214  break;
215  }
216  }
217  }
218 
219  if (transform != q->state()->matrix) {
220  q->state()->matrix = transform;
221  q->transformChanged();
222  }
223 }
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:86
qreal y() const
Returns the y-coordinate of the rectangle&#39;s top edge.
Definition: qrect.h:667
double qreal
Definition: qglobal.h:1193
static mach_timebase_info_data_t info
Qt::ClipOperation operation
Definition: qpainter_p.h:119
QPainterState * state
Definition: qpainter_p.h:204
ClipType clipType
Definition: qpainter_p.h:117
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
#define Q_Q(Class)
Definition: qglobal.h:2483
QPainterPath path
Definition: qpainter_p.h:120
qreal height() const
Returns the height of the rectangle.
Definition: qrect.h:710
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
qreal width() const
Returns the width of the rectangle.
Definition: qrect.h:707
QList< QPainterClipInfo > clipInfo
Definition: qpainter_p.h:159
qreal x() const
Returns the x-coordinate of the rectangle&#39;s left edge.
Definition: qrect.h:664
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
QTransform matrix
Definition: qpainter_p.h:118
The QTransform class specifies 2D transformations of a coordinate system.
Definition: qtransform.h:65
QScopedPointer< QPainterPrivate > d_ptr
Definition: qpainter.h:546

Properties

◆ activeStroker

QStrokerOps* QPaintEngineExPrivate::activeStroker

Definition at line 251 of file qpaintengineex_p.h.

◆ dasher

QDashStroker QPaintEngineExPrivate::dasher

Definition at line 249 of file qpaintengineex_p.h.

◆ exDeviceRect

QRect QPaintEngineExPrivate::exDeviceRect

Definition at line 254 of file qpaintengineex_p.h.

◆ strokeHandler

StrokeHandler* QPaintEngineExPrivate::strokeHandler

Definition at line 250 of file qpaintengineex_p.h.

Referenced by ~QPaintEngineExPrivate().

◆ stroker

QStroker QPaintEngineExPrivate::stroker

Definition at line 248 of file qpaintengineex_p.h.

◆ strokerPen

QPen QPaintEngineExPrivate::strokerPen

Definition at line 252 of file qpaintengineex_p.h.


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