#include "qpainterpath_p.h"
#include "qfontengine_p.h"
#include "qstatictext_p.h"
-
#include "qvarlengtharray.h"
#include "qdebug.h"
+#include "qcorecommon_p.h"
QT_BEGIN_NAMESPACE
QVector<QRect> rects = region.rects();
if (rects.size() <= 32) {
- qreal pts[2*32*4];
+ QSTACKARRAY(qreal, pts, 2 * 32 * 4);
int pos = 0;
for (QVector<QRect>::const_iterator i = rects.constBegin(); i != rects.constEnd(); ++i) {
qreal x1 = i->x();
QVectorPath vp(pts, rects.size() * 4, qpaintengineex_rect4_types_32);
clip(vp, op);
} else {
- QVarLengthArray<qreal> pts(rects.size() * 2 * 4);
- QVarLengthArray<QPainterPath::ElementType> types(rects.size() * 4);
+ QSTACKARRAY(qreal, pts, rects.size() * 2 * 4);
+ QSTACKARRAY(QPainterPath::ElementType, types, rects.size() * 4);
int ppos = 0;
int tpos = 0;
types[tpos++] = QPainterPath::LineToElement;
}
- QVectorPath vp(pts.data(), rects.size() * 4, types.data());
+ QVectorPath vp(pts, rects.size() * 4, types);
clip(vp, op);
}
while (elementCount > 0) {
const int count = qMin(elementCount, 32);
- qreal pts[64];
+ QSTACKARRAY(qreal, pts, 64);
const int count2 = count<<1;
for (int i=0; i<count2; ++i)
pts[i] = ((int *) lines)[i];
void QPaintEngineEx::drawEllipse(const QRectF &r)
{
- qreal pts[26]; // QPointF[13] without constructors...
+ QSTACKARRAY(qreal, pts, 26); // QPointF[13] without constructors...
union {
qreal *ptr;
QPointF *points;
if (pen.brush().isOpaque()) {
while (pointCount > 0) {
int count = qMin(pointCount, 16);
- qreal pts[64];
+ QSTACKARRAY(qreal, pts, 64);
int oset = -1;
for (int i=0; i<count; ++i) {
pts[++oset] = points[i].x();
if (pen.brush().isOpaque()) {
while (pointCount > 0) {
int count = qMin(pointCount, 16);
- qreal pts[64];
+ QSTACKARRAY(qreal, pts, 64);
int oset = -1;
for (int i=0; i<count; ++i) {
pts[++oset] = points[i].x();