#include <qpainterpath.h>
Inheritance diagram for QPainterPathPrivate:


Definition at line 156 of file qpainterpath.h.
Private Attributes | |
| QAtomic | ref |
| QVector< QPainterPath::Element > | elements |
Friends | |
| class | QPainterPath |
| class | QPainterPathData |
| class | QPainterPathStroker |
| class | QPainterPathStrokerPrivate |
| class | QMatrix |
| Q_GUI_EXPORT QDataStream & | operator<< (QDataStream &, const QPainterPath &) |
| Q_GUI_EXPORT QDataStream & | operator>> (QDataStream &, QPainterPath &) |
friend class QPainterPath [friend] |
Definition at line 158 of file qpainterpath.h.
friend class QPainterPathData [friend] |
Definition at line 159 of file qpainterpath.h.
friend class QPainterPathStroker [friend] |
Definition at line 160 of file qpainterpath.h.
friend class QPainterPathStrokerPrivate [friend] |
Definition at line 161 of file qpainterpath.h.
friend class QMatrix [friend] |
Definition at line 162 of file qpainterpath.h.
| Q_GUI_EXPORT QDataStream& operator<< | ( | QDataStream & | , | |
| const QPainterPath & | ||||
| ) | [friend] |
Definition at line 2199 of file qpainterpath.cpp.
02200 { 02201 if (p.isEmpty()) { 02202 s << 0; 02203 return s; 02204 } 02205 02206 s << p.elementCount(); 02207 for (int i=0; i < p.d_func()->elements.size(); ++i) { 02208 const QPainterPath::Element &e = p.d_func()->elements.at(i); 02209 s << int(e.type); 02210 s << double(e.x) << double(e.y); 02211 } 02212 s << p.d_func()->cStart; 02213 s << int(p.d_func()->fillRule); 02214 return s; 02215 }
| Q_GUI_EXPORT QDataStream& operator>> | ( | QDataStream & | , | |
| QPainterPath & | ||||
| ) | [friend] |
Definition at line 2226 of file qpainterpath.cpp.
02227 { 02228 int size; 02229 s >> size; 02230 02231 if (size == 0) 02232 return s; 02233 02234 p.ensureData(); // in case if p.d_func() == 0 02235 if (p.d_func()->elements.size() == 1) { 02236 Q_ASSERT(p.d_func()->elements.at(0).type == QPainterPath::MoveToElement); 02237 p.d_func()->elements.clear(); 02238 } 02239 p.d_func()->elements.reserve(p.d_func()->elements.size() + size); 02240 for (int i=0; i<size; ++i) { 02241 int type; 02242 double x, y; 02243 s >> type; 02244 s >> x; 02245 s >> y; 02246 Q_ASSERT(type >= 0 && type <= 3); 02247 #ifndef QT_NO_DEBUG 02248 if (qIsNan(x) || qIsNan(y)) 02249 qWarning("QDataStream::operator>>: Adding a NaN element to path, results are undefined"); 02250 #endif 02251 QPainterPath::Element elm = { x, y, QPainterPath::ElementType(type) }; 02252 p.d_func()->elements.append(elm); 02253 } 02254 s >> p.d_func()->cStart; 02255 int fillRule; 02256 s >> fillRule; 02257 Q_ASSERT(fillRule == Qt::OddEvenFill || Qt::WindingFill); 02258 p.d_func()->fillRule = Qt::FillRule(fillRule); 02259 return s; 02260 }
QAtomic QPainterPathPrivate::ref [private] |
Definition at line 168 of file qpainterpath.h.
Referenced by QPainterPathData::close(), QPainterPath::detach(), and QPainterPathData::QPainterPathData().
Definition at line 169 of file qpainterpath.h.
Referenced by QPainterPathData::close(), QPainterPath::elementAt(), QPainterPath::elementCount(), QPainterPathData::isClosed(), QPainterPath::isEmpty(), QPainterPathData::maybeMoveTo(), QPainterPathData::QPainterPathData(), and QPainterPath::setElementPositionAt().
1.5.1