4#include <QtCore/qglobal.h>
5#include <QtCore/qmutex.h>
7#define QT_FT_BEGIN_HEADER
8#define QT_FT_END_HEADER
10#include <private/qrasterdefs_p.h>
11#include <private/qgrayraster_p.h>
21#include <private/qtextengine_p.h>
22#include <private/qfontengine_p.h>
23#include <private/qpixmap_raster_p.h>
25#include <private/qimage_p.h>
26#include <private/qstatictext_p.h>
27#include <private/qcosmeticstroker_p.h>
28#include <private/qdrawhelper_p.h>
29#include <private/qmemrotate_p.h>
30#include <private/qpixellayout_p.h>
31#include <private/qrgba64_p.h>
42# include <private/qfontengine_p.h>
101#define qt_swap_int(x, y) { int tmp = (x); (x) = (y); (y) = tmp; }
102#define qt_swap_qreal(x, y) { qreal tmp = (x); (x) = (y); (y) = tmp; }
115#define int_dim(pos, dim) (int(pos+dim) - int(pos))
119static inline bool winClearTypeFontsEnabled()
122#if !defined(SPI_GETFONTSMOOTHINGTYPE)
123# define SPI_GETFONTSMOOTHINGTYPE 0x200A
124# define FE_FONTSMOOTHINGCLEARTYPE 0x002
126 SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &
result, 0);
127 return result == FE_FONTSMOOTHINGCLEARTYPE;
133bool QRasterPaintEngine::clearTypeFontsEnabled()
135 static const bool result = winClearTypeFontsEnabled();
177 qreal minx, maxx, miny, maxy;
178 minx = maxx =
e->x();
179 miny = maxy =
e->y();
183 else if (
e->x() > maxx)
187 else if (
e->y() > maxy)
215#if !defined(QT_NO_DEBUG) && 0
218 const char *
names[] = {
225 fprintf(stderr,
"\nQPainterPath: elementCount=%d\n",
path.elementCount());
226 for (
int i=0;
i<
path.elementCount(); ++
i) {
229 fprintf(stderr,
" - %3d:: %s, (%.2f, %.2f)\n",
i,
names[
e.type],
e.x,
e.y);
288 d_func()->device =
device;
298 d_func()->device =
device;
302void QRasterPaintEngine::init()
321 d->outlinemapper_xform_dirty =
true;
327 d->baseClip.reset(
new QClipData(
d->device->height()));
328 d->baseClip->setClipRect(
QRect(0, 0,
d->device->width(),
d->device->height()));
330 d->image_filler.init(
d->rasterBuffer.data(),
this);
333 d->image_filler_xform.init(
d->rasterBuffer.data(),
this);
336 d->solid_color_filler.init(
d->rasterBuffer.data(),
this);
339 d->deviceDepth =
d->device->depth();
341 d->mono_surface =
false;
346 switch (
d->device->devType()) {
348 qWarning(
"QRasterPaintEngine: unsupported for pixmaps...");
351 format =
d->rasterBuffer->prepare(
static_cast<QImage *
>(
d->device));
354 qWarning(
"QRasterPaintEngine: unsupported target device %d\n",
d->device->devType());
362 d->mono_surface =
true;
404 d->systemStateChanged();
407 ensureOutlineMapper();
408 d->outlineMapper->setClipRect(
d->deviceRect);
409 d->rasterizer->setClipRect(
d->deviceRect);
411 s->penData.init(
d->rasterBuffer.data(),
this);
412 s->penData.setup(
s->pen.brush(),
s->intOpacity,
s->composition_mode,
s->flags.cosmetic_brush);
413 s->stroker = &
d->basicStroker;
414 d->basicStroker.setClipRect(
d->deviceRect);
416 s->brushData.init(
d->rasterBuffer.data(),
this);
417 s->brushData.setup(
s->brush,
s->intOpacity,
s->composition_mode,
s->flags.cosmetic_brush);
424 qDebug() <<
"QRasterPaintEngine::begin(" << (
void *)
device
425 <<
") devType:" <<
device->devType()
426 <<
"devRect:" <<
d->deviceRect;
428 dumpClip(
d->rasterBuffer->width(),
d->rasterBuffer->height(), &*
d->baseClip);
435 else if (clearTypeFontsEnabled())
459 qDebug() <<
"QRasterPaintEngine::end devRect:" <<
d->deviceRect;
461 dumpClip(
d->rasterBuffer->width(),
d->rasterBuffer->height(), &*
d->baseClip);
478 ensureOutlineMapper();
485 if (
flags.has_clip_ownership)
503 flags.fast_pen =
true;
504 flags.non_complex_pen =
false;
505 flags.antialiased =
false;
506 flags.bilinear =
false;
507 flags.fast_text =
true;
508 flags.tx_noshear =
true;
509 flags.fast_images =
true;
510 flags.cosmetic_brush =
true;
513 flags.has_clip_ownership =
false;
523 , strokeFlags(
s.strokeFlags)
524 , lastBrush(
s.lastBrush)
525 , brushData(
s.brushData)
526 , fillFlags(
s.fillFlags)
527 , pixmapFlags(
s.pixmapFlags)
528 , intOpacity(
s.intOpacity)
532 , flag_bits(
s.flag_bits)
536 flags.has_clip_ownership =
false;
561 if (
t->clip &&
t->clip->enabled !=
t->clipEnabled) {
563 t->clip->enabled =
t->clipEnabled;
565 d->rasterBuffer->compositionMode =
s->composition_mode;
600 qDebug() <<
"QRasterPaintEngine::updatePen():" <<
s->pen;
608 s->penData.clip =
d->clip();
610 s->composition_mode,
s->flags.cosmetic_brush);
614 d->updateMatrixData(&
s->penData, pen.
brush(),
s->matrix);
631 d->basicStroker.setStrokeWidth(1);
633 d->basicStroker.setStrokeWidth(penWidth);
636 s->stroker = &
d->basicStroker;
641 d->dashStroker->setClipRect(
d->deviceRect);
644 QRectF clipRect =
s->matrix.inverted().mapRect(
QRectF(
d->deviceRect));
645 d->dashStroker->setClipRect(clipRect);
649 s->stroker =
d->dashStroker.data();
651 s->stroker =
nullptr;
658 && ((cosmetic && penWidth <= 1)
659 || (!cosmetic && (
s->flags.tx_noshear || !
s->flags.antialiased) && penWidth *
s->txscale <= 1));
675 qDebug() <<
"QRasterPaintEngine::brushOriginChanged()" <<
s->brushOrigin;
689 qDebug() <<
"QRasterPaintEngine::brushChanged():" <<
s->brush;
703 qDebug() <<
"QRasterPaintEngine::updateBrush()" <<
brush;
708 s->brushData.clip =
d->clip();
709 s->brushData.setup(
brush,
s->intOpacity,
s->composition_mode,
s->flags.cosmetic_brush);
712 d_func()->updateMatrixData(&
s->brushData,
brush,
d->brushMatrix());
717void QRasterPaintEngine::updateOutlineMapper()
723void QRasterPaintEngine::updateRasterState()
733 &&
s->intOpacity == 256
737 s->penData.solidColor.alphaF() >= 1.0f)));
752 qDebug() <<
"QRasterPaintEngine::opacityChanged()" <<
s->opacity;
759 s->intOpacity = (int) (
s->opacity * 256);
771 qDebug() <<
"QRasterPaintEngine::compositionModeChanged()" <<
s->composition_mode;
778 d->rasterBuffer->compositionMode =
s->composition_mode;
780 d->recalculateFastImages();
791 qDebug() <<
"QRasterPaintEngine::renderHintsChanged()" <<
Qt::hex <<
s->renderHints;
794 bool was_aa =
s->flags.antialiased;
795 bool was_bilinear =
s->flags.bilinear;
796 bool was_cosmetic_brush =
s->flags.cosmetic_brush;
802 if (was_aa !=
s->flags.antialiased)
805 if (was_bilinear !=
s->flags.bilinear || was_cosmetic_brush !=
s->flags.cosmetic_brush) {
811 d->recalculateFastImages();
813 if (was_aa !=
s->flags.antialiased)
825 qDebug() <<
"QRasterPaintEngine::transformChanged()" <<
s->matrix;
834 d->recalculateFastImages();
845 qDebug() <<
"QRasterPaintEngine::clipEnabledChanged()" <<
s->clipEnabled;
849 s->clip->enabled =
s->clipEnabled;
874 int srcSize =
img.depth() >> 3;
875 int iw =
img.width();
876 int ih =
img.height();
882 srcBits += ((sr.
y() * srcBPL) + sr.
x() * srcSize);
891 srcBits += srcSize *
d;
896 int d =
x + iw - cx2;
908 srcBits += srcBPL *
d;
913 int d =
y + ih - cy2;
944 int srcSize =
img.depth() >> 3;
945 int iw =
img.width();
946 int ih =
img.height();
952 srcBits += ((sr.
y() * srcBPL) + sr.
x() * srcSize);
961 srcBits += srcSize *
d;
966 int d =
x + iw - cx2;
978 srcBits += srcBPL *
d;
983 int d =
y + ih - cy2;
996 for (
int y = 0;
y < ih; ++
y) {
1038 bool bilinear =
q->state()->flags.bilinear;
1053 spanData->
dx = -
m.dx();
1054 spanData->
dy = -
m.dy();
1055 spanData->
txop =
m.type();
1067#ifdef QT_CLIPPING_RATIOS
1074 if (
d->clip()->hasRectClip)
1076 if (
d->clip()->hasRegionClip)
1080 if ((totalClips % 5000) == 0) {
1081 printf(
"Clipping ratio: rectangular=%f%%, region=%f%%, complex=%f%%\n",
1082 rectClips * 100.0 / (
qreal) totalClips,
1083 regionClips * 100.0 / (
qreal) totalClips,
1084 (totalClips - rectClips - regionClips) * 100.0 / (
qreal) totalClips);
1095 if (
s->flags.has_clip_ownership)
1098 s->flags.has_clip_ownership =
false;
1107 d->solid_color_filler.clip =
d->clip();
1108 d->solid_color_filler.adjustSpanMethods();
1111 dumpClip(
d->rasterBuffer->width(),
d->rasterBuffer->height(), &*
d->clip());
1123 qDebug() <<
"QRasterPaintEngine::clip(): " <<
path << op;
1125 if (
path.elements()) {
1126 for (
int i=0;
i<
path.elementCount(); ++
i) {
1128 <<
'(' <<
path.points()[
i*2] <<
", " <<
path.points()[
i*2+1] <<
')';
1131 for (
int i=0;
i<
path.elementCount(); ++
i) {
1133 <<
'(' <<
path.points()[
i*2] <<
", " <<
path.points()[
i*2+1] <<
')';
1146 qDebug(
" --- optimizing vector clip to rect clip...");
1169 if (
base ==
nullptr)
1175 ensureOutlineMapper();
1180 if (
s->flags.has_clip_ownership)
1184 s->flags.has_clip_ownership =
true;
1197 qDebug() <<
"QRasterPaintEngine::clip(): " <<
rect << op;
1219 QRect clipRect =
r &
d->deviceRect;
1230 clip->setClipRect(clipRect);
1232 clip->setClipRegion(clipRegion & clipRect);
1234 if (
s->flags.has_clip_ownership)
1238 s->clip->enabled =
true;
1239 s->flags.has_clip_ownership =
true;
1245 if (
base->hasRectClip ||
base->hasRegionClip) {
1246 if (!
s->flags.has_clip_ownership) {
1247 s->clip =
new QClipData(
d->rasterBuffer->height());
1248 s->flags.has_clip_ownership =
true;
1250 if (
base->hasRectClip)
1251 s->clip->setClipRect(
base->clipRect & clipRect);
1253 s->clip->setClipRegion(
base->clipRegion & clipRect);
1254 s->clip->enabled =
true;
1273 qDebug() <<
"QRasterPaintEngine::clip(): " << region << op;
1285 const QClipData *baseClip =
d->baseClip.data();
1302 if (
s->flags.has_clip_ownership) {
1306 newClip =
new QClipData(
d->rasterBuffer->height());
1308 s->flags.has_clip_ownership =
true;
1334 qDebug() <<
" --- fillPath, bounds=" <<
path.boundingRect();
1337 if (!fillData->
blend)
1342 const QRectF controlPointRect =
path.controlPointRect();
1352 if (!
s->flags.antialiased && !do_clip) {
1353 d->initializeRasterizer(fillData);
1354 d->rasterizer->rasterize(
path *
s->matrix,
path.fillRule());
1358 ensureOutlineMapper();
1359 d->rasterize(
d->outlineMapper->convertPath(
path), blend, fillData,
d->rasterBuffer.data());
1367 bool rectClipped =
true;
1374 rectClipped =
data->clip->hasRectClip;
1383 x2 =
qMin(
r.x() +
r.width(),
data->rasterBuffer->width());
1385 y2 =
qMin(
r.y() +
r.height(),
data->rasterBuffer->height());
1394 bool isUnclipped = rectClipped
1397 if (pe && isUnclipped) {
1403 data->solidColor.alphaF() >= 1.0f))))
1412 const int nspans = 512;
1428 blend(
n, spans,
data);
1439 qDebug(
" - QRasterPaintEngine::drawRect(), rectCount=%d", rectCount);
1442 ensureRasterState();
1447 if (
s->brushData.blend) {
1450 const QRect *lastRect = rects + rectCount;
1452 int offset_x = int(
s->matrix.dx());
1453 int offset_y = int(
s->matrix.dy());
1454 while (
r < lastRect) {
1456 QRect rr =
rect.translated(offset_x, offset_y);
1462 for (
int i=0;
i<rectCount; ++
i) {
1470 if (
s->penData.blend) {
1472 if (
s->flags.fast_pen) {
1474 for (
int i = 0;
i < rectCount; ++
i) {
1479 for (
int i = 0;
i < rectCount; ++
i) {
1493 qDebug(
" - QRasterPaintEngine::drawRect(QRectF*), rectCount=%d", rectCount);
1497 ensureRasterState();
1501 if (
s->flags.tx_noshear) {
1503 if (
s->brushData.blend) {
1504 d->initializeRasterizer(&
s->brushData);
1505 for (
int i = 0;
i < rectCount; ++
i) {
1511 d->rasterizer->rasterizeLine(
a,
b,
rect.height() /
rect.width());
1516 if (
s->penData.blend) {
1518 if (
s->flags.fast_pen) {
1520 for (
int i = 0;
i < rectCount; ++
i) {
1525 for (
int i = 0;
i < rectCount; ++
i) {
1548 if (!
s->penData.blend)
1551 if (
s->flags.fast_pen) {
1559 qreal dashOffset =
s->lastPen.dashOffset();
1561 qreal patternLength = 0;
1566 if (patternLength > 0) {
1567 dashOffset = std::fmod(dashOffset, patternLength);
1569 dashOffset += patternLength;
1570 while (dashOffset >=
pattern.at(dashIndex)) {
1571 dashOffset -=
pattern.at(dashIndex);
1572 if (++dashIndex >=
pattern.size())
1579 d->initializeRasterizer(&
s->penData);
1580 int lineCount =
path.elementCount() / 2;
1583 for (
int i = 0;
i < lineCount; ++
i) {
1590 d->rasterizer->rasterizeLine(mappedline.
p1(), mappedline.
p2(),
1597 d->rasterizer->rasterizeLine(
line.p1(),
line.p2(),
1602 int dIndex = dashIndex;
1603 qreal dOffset = dashOffset;
1605 d->rasterizeLine_dashed(
line,
width, &dIndex, &dOffset, &inD);
1637 qDebug() <<
"QRasterPaintEngine::fill(): "
1638 <<
"size=" <<
path.elementCount()
1647 if (!
s->brushData.blend)
1658 ensureRasterState();
1659 if (
s->flags.tx_noshear) {
1660 d->initializeRasterizer(&
s->brushData);
1665 const QPointF a =
s->matrix.map((
r.topLeft() +
r.bottomLeft()) * 0.5f);
1666 const QPointF b =
s->matrix.map((
r.topRight() +
r.bottomRight()) * 0.5f);
1667 d->rasterizer->rasterizeLine(
a,
b,
r.height() /
r.width());
1675 const QRectF pathDeviceRect =
s->matrix.mapRect(cpRect);
1680 ProcessSpans blend =
d->getBrushFunc(pathDeviceRect, &
s->brushData);
1695 ensureOutlineMapper();
1696 d->rasterize(
d->outlineMapper->convertPath(
path), blend, &
s->brushData,
d->rasterBuffer.data());
1704 if (!
s->flags.antialiased) {
1705 uint txop =
s->matrix.type();
1710 const QRect rr = toNormalizedFillRect(
r.translated(
s->matrix.dx(),
s->matrix.dy()));
1714 const QRect rr = toNormalizedFillRect(
s->matrix.mapRect(
r));
1719 ensureRasterState();
1720 if (
s->flags.tx_noshear) {
1721 d->initializeRasterizer(
data);
1733 ensureOutlineMapper();
1743 qDebug() <<
"QRasterPaintEngine::fillRecct(): " <<
r <<
brush;
1748 if (!
s->brushData.blend)
1760 c.getRgbF(&
r, &
g, &
b, &
a);
1761 a =
a *
alpha * (1.f / 256.f);
1773 qDebug() <<
"QRasterPaintEngine::fillRect(): " <<
r <<
color;
1780 if (
d->solid_color_filler.solidColor.alphaF() <= 0.0f
1784 d->solid_color_filler.clip =
d->clip();
1785 d->solid_color_filler.adjustSpanMethods();
1791 return a->y() <
b->y();
1804 upper->
reserve(pointCount * 3 / 4);
1805 lower->
reserve(pointCount * 3 / 4);
1807 for (
int i = 0;
i < pointCount; ++
i)
1820 int side =
p->y() < splitY;
1821 int lastSide = last->
y() < splitY;
1823 if (side != lastSide) {
1825 bin[!side]->append(*
p);
1827 bin[side]->append(*last);
1830 QPointF intersection(
p->x() + delta.
x() * (splitY -
p->y()) / delta.
y(), splitY);
1832 bin[0]->append(intersection);
1833 bin[1]->append(intersection);
1837 bin[side]->append(*
p);
1843 return upper->
size() < pointCount && lower->
size() < pointCount;
1854 const int maxPoints = 0xffff;
1857 if (pointCount > maxPoints) {
1864 qWarning(
"Polygon too complex for filling.");
1871 ensureOutlineMapper();
1875 ProcessSpans brushBlend =
d->getBrushFunc(
d->outlineMapper->controlPointRect,
1877 d->rasterize(outline, brushBlend, &
s->brushData,
d->rasterBuffer.data());
1889 qDebug(
" - QRasterPaintEngine::drawPolygon(F), pointCount=%d", pointCount);
1890 for (
int i=0;
i<pointCount; ++
i)
1905 if (
s->brushData.blend)
1910 if (
s->penData.blend) {
1912 if (
s->flags.fast_pen) {
1930 qDebug(
" - QRasterPaintEngine::drawPolygon(I), pointCount=%d", pointCount);
1931 for (
int i=0;
i<pointCount; ++
i)
1949 if (
s->brushData.blend) {
1951 ensureOutlineMapper();
1953 d->outlineMapper->moveTo(*
points);
1957 d->outlineMapper->lineTo(*(++
p));
1959 d->outlineMapper->endOutline();
1962 ProcessSpans brushBlend =
d->getBrushFunc(
d->outlineMapper->controlPointRect,
1964 d->rasterize(
d->outlineMapper->outline(), brushBlend, &
s->brushData,
d->rasterBuffer.data());
1969 if (
s->penData.blend) {
1970 int count = pointCount * 2;
1973 fpoints[
i] = ((
const int *)
points)[
i];
1976 if (
s->flags.fast_pen) {
1991 qDebug() <<
" - QRasterPaintEngine::drawPixmap(), pos=" <<
pos <<
" pixmap=" <<
pixmap.size() <<
"depth=" <<
pixmap.depth();
1997 if (
image.depth() == 1) {
2011 if (
pixmap.depth() == 1) {
2032 qDebug() <<
" - QRasterPaintEngine::drawPixmap(), r=" <<
r <<
" sr=" << sr <<
" pixmap=" <<
pixmap.size() <<
"depth=" <<
pixmap.depth();
2038 if (
image.depth() == 1) {
2042 &&
r.size() == sr.
size()
2043 &&
r.size() ==
pixmap.size()) {
2045 drawBitmap(
r.topLeft() +
QPointF(
s->matrix.dx(),
s->matrix.dy()),
image, &
s->penData);
2057 if (
image.depth() == 1) {
2061 &&
r.size() == sr.
size()
2062 &&
r.size() ==
pixmap.size()) {
2064 drawBitmap(
r.topLeft() +
QPointF(
s->matrix.dx(),
s->matrix.dy()),
image, &
s->penData);
2067 drawImage(
r,
d->rasterBuffer->colorizeBitmap(
image,
s->pen.color()), translatedSource);
2077 const int iv = int(
v);
2086 const int xmin = int(
rect.x());
2088 const int ymin = int(
rect.y());
2090 return QRect(xmin, ymin, xmax - xmin, ymax - ymin);
2099 qDebug() <<
" - QRasterPaintEngine::drawImage(), p=" <<
p <<
" image=" <<
img.size() <<
"depth=" <<
img.depth();
2113 QPointF pt(
p.x() +
s->matrix.dx(),
p.y() +
s->matrix.dy());
2115 if (
d->canUseImageBlitting(
d->rasterBuffer->compositionMode,
img, pt,
img.rect())) {
2117 d->blitImage(pt,
img,
d->deviceRect);
2119 }
else if (
clip->hasRectClip) {
2120 d->blitImage(pt,
img,
clip->clipRect);
2123 }
else if (
d->canUseFastImageBlending(
d->rasterBuffer->compositionMode,
img)) {
2127 d->drawImage(pt,
img,
func,
d->deviceRect,
s->intOpacity);
2129 }
else if (
clip->hasRectClip) {
2138 d->image_filler.clip =
clip;
2140 if (!
d->image_filler.blend)
2142 d->image_filler.dx = -pt.
x();
2143 d->image_filler.dy = -pt.
y();
2153 return QRectF(
r.topLeft() *
t,
r.bottomRight() *
t);
2186 inline bool isPixelAligned(
const QPointF &pt)
2190 inline bool isPixelAligned(
const QRectF &
rect)
2200 Qt::ImageConversionFlags)
2203 qDebug() <<
" - QRasterPaintEngine::drawImage(), r=" <<
r <<
" sr=" << sr <<
" image=" <<
img.
size() <<
"depth=" <<
img.depth();
2217 if (
s->matrix.type() <=
QTransform::TxScale && !
s->flags.antialiased && sr_l == sr_r && sr_t == sr_b) {
2224 switch (
img.format()) {
2244 d->solid_color_filler.clip =
d->clip();
2245 d->solid_color_filler.adjustSpanMethods();
2252 bool stretch_sr =
r.width() != sr.
width() ||
r.height() != sr.
height();
2259 &&
s->intOpacity == 256
2263 RotationType rotationType = qRotationType(
s->matrix);
2268 QRectF transformedTargetRect =
s->matrix.mapRect(
r);
2270 if (
d->canUseImageBlitting(
d->rasterBuffer->compositionMode,
img, transformedTargetRect.
topRight(), sr)) {
2272 if (clippedTransformedTargetRect.
isNull())
2275 QRectF clippedTargetRect =
s->matrix.inverted().mapRect(
QRectF(clippedTransformedTargetRect));
2277 QRect clippedSourceRect
2278 =
QRectF(sr.
x() + clippedTargetRect.
x() -
r.x(), sr.
y() + clippedTargetRect.
y() -
r.y(),
2283 const qsizetype dbpl =
d->rasterBuffer->bytesPerLine();
2289 const uchar *srcBase =
img.bits() + clippedSourceRect.
y() * sbpl + clippedSourceRect.
x() * bpp;
2290 uchar *dstBase =
dst + clippedTransformedTargetRect.
y() * dbpl + clippedTransformedTargetRect.
x() * bpp;
2304 QRectF targetBounds =
s->matrix.mapRect(
r);
2305 bool exceedsPrecision =
r.
width() > 0x7fff
2306 ||
r.height() > 0x7fff
2307 || targetBounds.
left() < -0x7fff
2308 || targetBounds.
top() < -0x7fff
2309 || targetBounds.
right() > 0x7fff
2310 || targetBounds.
bottom() > 0x7fff
2311 || targetBounds.
width() > 0x7fff
2312 || targetBounds.
height() > 0x7fff
2313 ||
s->matrix.m11() >= 512
2314 ||
s->matrix.m22() >= 512;
2315 if (!exceedsPrecision &&
d->canUseFastImageBlending(
d->rasterBuffer->compositionMode,
img)) {
2320 if (
func && (!
clip ||
clip->hasRectClip) && !
s->flags.antialiased && targetBounds.
width() >= 16 && targetBounds.
height() >= 16) {
2321 func(
d->rasterBuffer->buffer(),
d->rasterBuffer->bytesPerLine(),
img.bits(),
2322 img.bytesPerLine(),
r, sr, !
clip ?
d->deviceRect :
clip->clipRect,
2323 s->matrix,
s->intOpacity);
2328 bool sourceRect2x =
r.width() * 2 == sr.
width() &&
r.height() * 2 == sr.
height();
2329 bool scale2x = (
s->matrix.m11() ==
qreal(2)) && (
s->matrix.m22() ==
qreal(2));
2333 QPointF pt(
r.x() * 2 +
s->matrix.dx(),
r.y() * 2 +
s->matrix.dy());
2337 }
else if (
clip->hasRectClip) {
2345 func(
d->rasterBuffer->buffer(),
d->rasterBuffer->bytesPerLine(),
2346 img.bits(),
img.bytesPerLine(),
img.height(),
2356 copy.translate(
r.x(),
r.y());
2359 copy.translate(-sr.
x(), -sr.
y());
2361 d->image_filler_xform.clip =
clip;
2363 if (!
d->image_filler_xform.blend)
2365 d->image_filler_xform.setupMatrix(
copy,
s->flags.bilinear);
2380 ensureRasterState();
2382 d->initializeRasterizer(&
d->image_filler_xform);
2383 d->rasterizer->setAntialiased(
s->flags.antialiased);
2389 if (
s->flags.tx_noshear)
2390 d->rasterizer->rasterizeLine(
a,
b,
rect.height() /
rect.width());
2392 d->rasterizer->rasterizeLine(
a,
b,
qAbs((
s->matrix.m22() *
rect.height()) / (
s->matrix.m11() *
rect.width())));
2400 m.m21(),
m.m22(),
m.m23(),
2401 m.m31(),
m.m32(),
m.m33());
2405 QPointF pt(
r.x() +
s->matrix.dx(),
r.y() +
s->matrix.dy());
2406 if (
d->canUseImageBlitting(
d->rasterBuffer->compositionMode,
img, pt, sr)) {
2408 d->blitImage(pt,
img,
d->deviceRect, sr.
toRect());
2410 }
else if (
clip->hasRectClip) {
2414 }
else if (
d->canUseFastImageBlending(
d->rasterBuffer->compositionMode,
img)) {
2420 }
else if (
clip->hasRectClip) {
2427 d->image_filler.clip =
clip;
2429 if (!
d->image_filler.blend)
2431 d->image_filler.dx = -(
r.x() +
s->matrix.dx()) + sr.
x();
2432 d->image_filler.dy = -(
r.y() +
s->matrix.dy()) + sr.
y();
2452 qDebug() <<
" - QRasterPaintEngine::drawTiledPixmap(), r=" <<
r <<
"pixmap=" <<
pixmap.size();
2467 if (
image.depth() == 1)
2468 image =
d->rasterBuffer->colorizeBitmap(
image,
s->pen.color());
2470 const qreal pixmapDevicePixelRatio =
pixmap.devicePixelRatio();
2473 copy.translate(
r.x(),
r.y());
2474 copy.translate(-sr.
x(), -sr.
y());
2475 const qreal inverseDpr =
qreal(1.0) / pixmapDevicePixelRatio;
2476 copy.scale(inverseDpr, inverseDpr);
2477 d->image_filler_xform.clip =
d->clip();
2479 if (!
d->image_filler_xform.blend)
2481 d->image_filler_xform.setupMatrix(
copy,
s->flags.bilinear);
2484 ensureRasterState();
2486 d->initializeRasterizer(&
d->image_filler_xform);
2487 d->rasterizer->setAntialiased(
s->flags.antialiased);
2492 if (
s->flags.tx_noshear)
2493 d->rasterizer->rasterizeLine(
a,
b,
rect.height() /
rect.width());
2495 d->rasterizer->rasterizeLine(
a,
b,
qAbs((
s->matrix.m22() *
rect.height()) / (
s->matrix.m11() *
rect.width())));
2503 d->image_filler.clip =
d->clip();
2506 if (!
d->image_filler.blend)
2508 d->image_filler.dx = -(
r.x() +
s->matrix.dx()) + sr.
x();
2509 d->image_filler.dy = -(
r.y() +
s->matrix.dy()) + sr.
y();
2521 return (
s[
x>>3] << (
x&7)) & 0x80;
2530 return d->rasterBuffer.data();
2541 if (!
s->penData.blend)
2546 useGammaCorrection =
false;
2550 bool unclipped =
false;
2556 if (
clip->hasRectClip) {
2557 unclipped =
rx >
clip->xmin
2579 ProcessSpans blend = unclipped ?
s->penData.unclipped_blend :
s->penData.blend;
2582 if (
s->flags.fast_text) {
2585 if (
s->penData.bitmapBlit) {
2586 s->penData.bitmapBlit(rb,
rx,
ry,
s->penData.solidColor.rgba64(),
2587 scanline,
w,
h, bpl);
2590 }
else if (
depth == 8) {
2591 if (
s->penData.alphamapBlit) {
2592 s->penData.alphamapBlit(rb,
rx,
ry,
s->penData.solidColor.rgba64(),
2593 scanline,
w,
h, bpl,
nullptr, useGammaCorrection);
2596 }
else if (
depth == 32) {
2598 if (
s->penData.alphaRGBBlit) {
2599 s->penData.alphaRGBBlit(rb,
rx,
ry,
s->penData.solidColor.rgba64(),
2600 (
const uint *) scanline,
w,
h, bpl / 4,
nullptr, useGammaCorrection);
2604 }
else if ((
depth == 8 &&
s->penData.alphamapBlit) || (
depth == 32 &&
s->penData.alphaRGBBlit)) {
2611 int xdiff =
nx -
rx;
2612 int ydiff =
ny -
ry;
2613 scanline += ydiff * bpl;
2614 scanline += xdiff * (
depth == 32 ? 4 : 1);
2619 if (
nx +
w >
d->rasterBuffer->width())
2620 w =
d->rasterBuffer->width() -
nx;
2621 if (
ny +
h >
d->rasterBuffer->height())
2622 h =
d->rasterBuffer->height() -
ny;
2628 s->penData.alphamapBlit(rb,
rx,
ry,
s->penData.solidColor.rgba64(),
2629 scanline,
w,
h, bpl,
clip, useGammaCorrection);
2630 else if (
depth == 32)
2631 s->penData.alphaRGBBlit(rb,
rx,
ry,
s->penData.solidColor.rgba64(),
2632 (
const uint *) scanline,
w,
h, bpl / 4,
clip, useGammaCorrection);
2646 scanline += bpl *
y0;
2653 if (
w <= 0 ||
h <= 0)
2656 const int NSPANS = 512;
2660 const int x1 =
x0 +
w;
2661 const int y1 =
y0 +
h;
2664 for (
int y =
y0;
y <
y1; ++
y) {
2665 for (
int x =
x0;
x <
x1; ) {
2671 if (current == NSPANS) {
2672 blend(current, spans, &
s->penData);
2675 spans[current].
x =
x +
rx;
2676 spans[current].
y =
y +
ry;
2685 spans[current].
len =
len;
2690 }
else if (
depth == 8) {
2691 for (
int y =
y0;
y <
y1; ++
y) {
2692 for (
int x =
x0;
x <
x1; ) {
2694 if (scanline[
x] == 0) {
2699 if (current == NSPANS) {
2700 blend(current, spans, &
s->penData);
2703 int coverage = scanline[
x];
2704 spans[current].
x =
x +
rx;
2705 spans[current].
y =
y +
ry;
2706 spans[current].
coverage = coverage;
2711 while (
x <
x1 && scanline[
x] == coverage) {
2715 spans[current].
len =
len;
2721 const uint *sl = (
const uint *) scanline;
2722 for (
int y =
y0;
y <
y1; ++
y) {
2723 for (
int x =
x0;
x <
x1; ) {
2725 if ((sl[
x] & 0x00ffffff) == 0) {
2730 if (current == NSPANS) {
2731 blend(current, spans, &
s->penData);
2734 uint rgbCoverage = sl[
x];
2735 int coverage =
qGreen(rgbCoverage);
2736 spans[current].
x =
x +
rx;
2737 spans[current].
y =
y +
ry;
2738 spans[current].
coverage = coverage;
2743 while (
x <
x1 && sl[
x] == rgbCoverage) {
2747 spans[current].
len =
len;
2750 sl += bpl /
sizeof(
uint);
2757 blend(current, spans, &
s->penData);
2778 if (d_func()->mono_surface)
2783 if (!verticalSubPixelPositions)
2792 switch (alphaMap->
format) {
2795 bytesPerLine = ((alphaMap->
width + 31) & ~31) >> 3;
2799 bytesPerLine = (alphaMap->
width + 3) & ~3;
2803 bytesPerLine = alphaMap->
width * 4;
2809 QFixed y = verticalSubPixelPositions
2831 cache->fillInPendingGlyphs();
2841 else if (
depth == 1)
2844 int margin = fontEngine->
glyphMargin(glyphFormat);
2848 if (!verticalSubPixelPositions)
2849 subPixelPosition.
y = 0;
2857 int y = (verticalSubPixelPositions
2860 y -=
c.baseLineY + margin;
2870 const uchar *glyphBits =
bits + ((
c.x << leftShift) >> rightShift) +
c.y * bpl;
2879 s->matrix = originalTransform;
2914 return qt_region_strictContains(cl->
clipRegion,
r);
2937 if (
s->flags.antialiased)
2941 r.
setX(
r.x() - penWidth);
2942 r.setY(
r.y() - penWidth);
2943 r.setWidth(
r.width() + 2 * penWidth);
2944 r.setHeight(
r.height() + 2 * penWidth);
2953 return qt_region_strictContains(cl->
clipRegion,
r);
2961 if (norm.
left() <= INT_MIN || norm.
top() <= INT_MIN
2962 || norm.
right() > INT_MAX || norm.
bottom() > INT_MAX
2963 || norm.
width() > INT_MAX || norm.
height() > INT_MAX)
2991 const int penWidth =
s->flags.fast_pen ? 1 :
qCeil(
s->lastPen.widthF());
3016 if (left < clipRight && right > clipLeft && top < clipBottom && bottom > clipTop)
3021 while (last >
first) {
3027 if (left < clipRight && right > clipLeft && top < clipBottom && bottom > clipTop)
3031 return {
first, last + 1};
3043 ensureRasterState();
3079 fprintf(stderr,
" - QRasterPaintEngine::drawTextItem(), (%.2f,%.2f), string=%s ct=%d\n",
3081 d->glyphCacheFormat);
3087 ensureRasterState();
3120 staticTextItem.
color =
s->pen.color();
3121 staticTextItem.
font =
s->font;
3141 if (!
s->penData.blend)
3144 if (!
s->flags.fast_pen) {
3160 if (!
s->penData.blend)
3163 if (!
s->flags.fast_pen) {
3178 qDebug() <<
" - QRasterPaintEngine::drawLines(QLine*)" << lineCount;
3184 if (!
s->penData.blend)
3187 if (
s->flags.fast_pen) {
3189 for (
int i=0;
i<lineCount; ++
i) {
3190 const QLine &l = lines[
i];
3207 const QPen &pen =
s->lastPen;
3211 qreal patternLength = 0;
3215 if (patternLength <= 0)
3232 *dashOffset += dash /
width;
3236 *inDash = !(*inDash);
3237 if (++*dashIndex >=
pattern.size())
3255 qDebug() <<
" - QRasterPaintEngine::drawLines(QLineF *)" << lineCount;
3261 if (!
s->penData.blend)
3263 if (
s->flags.fast_pen) {
3265 for (
int i=0;
i<lineCount; ++
i) {
3286 && !
s->flags.antialiased
3300 &
s->penData, &
s->brushData);
3312void QRasterPaintEngine::setDC(HDC hdc) {
3320HDC QRasterPaintEngine::getDC()
const
3329void QRasterPaintEngine::releaseDC(HDC)
const
3386 const int spanCount = 512;
3401 for (
int y = ymin;
y < ymax; ++
y) {
3404 for (
int x = 0;
x < xmax - xmin; ++
x) {
3405 int src_x =
x + x_offset;
3411 if (pixel & (0x1 << (src_x & 7))) {
3412 spans[
n].
x = xmin +
x;
3416 while (src_x+1 <
w &&
src[(src_x+1) >> 3] & (0x1 << ((src_x+1) & 7))) {
3420 spans[
n].
len = ((
len + spans[
n].
x) > xmax) ? (xmax - spans[
n].
x) :
len;
3423 if (
n == spanCount) {
3430 for (
int x = 0;
x < xmax - xmin; ++
x) {
3431 int src_x =
x + x_offset;
3437 if (pixel & (0x80 >> (
x & 7))) {
3438 spans[
n].
x = xmin +
x;
3442 while (src_x+1 <
w &&
src[(src_x+1) >> 3] & (0x80 >> ((src_x+1) & 7))) {
3446 spans[
n].
len = ((
len + spans[
n].
x) > xmax) ? (xmax - spans[
n].
x) :
len;
3449 if (
n == spanCount) {
3497 return d->deviceRect;
3499 if (
clip->hasRectClip)
3500 return clip->clipRect;
3519 QSize(
c->xmax -
c->xmin,
c->ymax -
c->ymin));
3521 blend =
data->blend;
3523 blend =
data->unclipped_blend;
3534 if (!callback || !outline)
3540 if (!
s->flags.antialiased) {
3567 if (!callback || !outline)
3573 if (!
s->flags.antialiased) {
3593 uchar *rasterPoolOnHeap =
nullptr;
3597 void *
data = userData;
3605 rasterParams.
target =
nullptr;
3606 rasterParams.
source = outline;
3611 rasterParams.
bit_set =
nullptr;
3618 int rendered_spans = 0;
3629 rasterPoolSize *= 2;
3630 if (rasterPoolSize > 1024 * 1024) {
3631 qWarning(
"QPainter: Rasterization of primitive failed");
3637 free(rasterPoolOnHeap);
3638 rasterPoolOnHeap = (
uchar *)malloc(rasterPoolSize + 0xf);
3652 free(rasterPoolOnHeap);
3660 if (!
s->clipEnabled)
3681 return s->flags.fast_images
3684 && !
image.hasAlphaChannel()));
3693 && !
image.hasAlphaChannel())))
3699 if (
s->intOpacity != 256
3700 ||
image.depth() < 8
3702 && (!isPixelAligned(pt) || !isPixelAligned(sr))))
3716 return (dFormat == sFormat);
3759 bytes_per_pixel =
image->depth()/8;
3760 bytes_per_line =
image->bytesPerLine();
3764 if (
image->depth() == 1 &&
image->colorTable().size() == 2) {
3812 const int maxSpans = (
ymax -
ymin) * numRects;
3818 int firstInBand = 0;
3819 while (firstInBand < numRects) {
3820 const int currMinY = rects[firstInBand].y();
3821 const int currMaxY = currMinY + rects[firstInBand].height();
3823 while (
y < currMinY) {
3829 int lastInBand = firstInBand;
3830 while (lastInBand + 1 < numRects && rects[lastInBand+1].
top() ==
y)
3833 while (
y < currMaxY) {
3838 for (
int r = firstInBand;
r <= lastInBand; ++
r) {
3839 const QRect &currRect = rects[
r];
3841 span->x = currRect.
x();
3844 span->coverage = 255;
3850 firstInBand = lastInBand + 1;
3881 span->coverage = 255;
3922 const int firstLeft =
m_spans[0].
x;
3930 if (
span.y !=
y + 1 &&
y != -1)
3938 const int spanLeft =
span.x;
3939 const int spanRight = spanLeft +
span.len;
3941 if (spanLeft <
xmin)
3944 if (spanRight >
xmax)
3947 if (spanLeft != firstLeft || spanRight != firstRight)
4027 while (available && spans <
end ) {
4028 if (clipSpans >= clipEnd) {
4032 if (clipSpans->
y > spans->
y) {
4036 if (spans->
y != clipSpans->
y) {
4046 int sx2 = sx1 + spans->
len;
4047 int cx1 = clipSpans->
x;
4048 int cx2 = cx1 + clipSpans->
len;
4050 if (cx1 < sx1 && cx2 < sx1) {
4053 }
else if (sx1 < cx1 && sx2 < cx1) {
4057 int x =
qMax(sx1, cx1);
4075 *currentClip = clipSpans - clip->
m_spans;
4086 const int NSPANS = 512;
4088 int currentClip = 0;
4090 while (spans <
end) {
4096 if (clipped - cspans)
4109 const int minx = clip.
left();
4110 const int miny = clip.
top();
4111 const int maxx = clip.
right();
4112 const int maxy = clip.
bottom();
4115 while (spans <
end) {
4116 if (spans->
y >= miny)
4125 if (
s->x > maxx ||
s->x +
s->len <= minx) {
4131 s->len =
qMin(
s->len - (minx -
s->x), maxx - minx + 1);
4134 s->len =
qMin(
s->len, (maxx -
s->x + 1));
4176 int currentClip = 0;
4178 while (spans <
end) {
4219 for (
int i = 0;
i < stops.
size() &&
i <= 2;
i++)
4220 hash_val += stops[
i].second.rgba64();
4229 const auto &cache_info =
it.value();
4230 if (cache_info->stops == stops && cache_info->opacity == opacity && cache_info->interpolationMode == gradient.
interpolationMode())
4244 int size,
int opacity)
const;
4253 cache_entry->buffer32[
i] = cache_entry->buffer64[
i].toArgb32();
4254 return cache.
insert(hash_val, std::move(cache_entry)).value();
4264 int stopCount = stops.
size();
4269 if (stopCount == 2) {
4276 if (second_stop < first_stop) {
4278 first_color = second_color;
4280 qSwap(first_stop, second_stop);
4283 if (colorInterpolation) {
4303 if (colorInterpolation)
4304 colorTable[
i] = first_color;
4309 if (
i < second_index) {
4310 qreal reciprocal =
qreal(1) / (second_index - first_index);
4312 int red_delta =
qRound((
qreal(red_second) - red_first) * reciprocal);
4313 int green_delta =
qRound((
qreal(green_second) - green_first) * reciprocal);
4314 int blue_delta =
qRound((
qreal(blue_second) - blue_first) * reciprocal);
4315 int alpha_delta =
qRound((
qreal(alpha_second) - alpha_first) * reciprocal);
4318 red_first += 1 << 15;
4319 green_first += 1 << 15;
4320 blue_first += 1 << 15;
4321 alpha_first += 1 << 15;
4324 red_first += red_delta;
4325 green_first += green_delta;
4326 blue_first += blue_delta;
4327 alpha_first += alpha_delta;
4329 const QRgba64 color =
qRgba64(red_first >> 16, green_first >> 16, blue_first >> 16, alpha_first >> 16);
4331 if (colorInterpolation)
4339 if (colorInterpolation)
4340 colorTable[
i] = second_color;
4349 if (stopCount == 1) {
4351 for (
int i = 0;
i <
size; ++
i)
4352 colorTable[
i] = current_color;
4364 qreal dpos = 1.5 * incr;
4368 while (dpos <= begin_pos) {
4369 colorTable[
pos] = colorTable[
pos - 1];
4374 int current_stop = 0;
4379 if (dpos < end_pos) {
4381 while (dpos > stops[current_stop+1].
first)
4384 if (current_stop != 0)
4385 current_color =
combineAlpha256(stops[current_stop].second.rgba64(), opacity);
4386 next_color =
combineAlpha256(stops[current_stop+1].second.rgba64(), opacity);
4388 if (colorInterpolation) {
4395 t = (dpos - stops[current_stop].
first) *
c;
4399 Q_ASSERT(current_stop < stopCount);
4402 int idist = 256 -
dist;
4404 if (colorInterpolation)
4412 if (dpos >= end_pos)
4418 while (dpos > stops[current_stop+skip+1].
first)
4422 current_stop += skip;
4424 current_color = next_color;
4426 current_color =
combineAlpha256(stops[current_stop].second.rgba64(), opacity);
4427 next_color =
combineAlpha256(stops[current_stop+1].second.rgba64(), opacity);
4429 if (colorInterpolation) {
4437 t = (dpos - stops[current_stop].
first) *
c;
4446 colorTable[
pos] = current_color;
4451 colorTable[
size - 1] = current_color;
4463 m11 = m22 = m33 = 1.;
4464 m12 = m13 = m21 = m23 = dx = dy = 0.0;
4465 clip = pe ? pe->d_func()->clip() :
nullptr;
4475 switch (brushStyle) {
4491 auto cacheInfo = qt_gradient_cache()->getBuffer(*
g,
alpha);
4493#if QT_CONFIG(raster_64bit) || QT_CONFIG(raster_fp)
4494 gradient.colorTable64 = cacheInfo->buffer64;
4502 linearData.
origin.
x =
g->start().x();
4503 linearData.
origin.
y =
g->start().y();
4504 linearData.
end.
x =
g->finalStop().x();
4505 linearData.
end.
y =
g->finalStop().y();
4515 auto cacheInfo = qt_gradient_cache()->getBuffer(*
g,
alpha);
4517#if QT_CONFIG(raster_64bit) || QT_CONFIG(raster_fp)
4518 gradient.colorTable64 = cacheInfo->buffer64;
4527 radialData.
center.
x = center.x();
4528 radialData.
center.
y = center.y();
4531 radialData.
focal.
x = focal.
x();
4532 radialData.
focal.
y = focal.
y();
4543 auto cacheInfo = qt_gradient_cache()->getBuffer(*
g,
alpha);
4545#if QT_CONFIG(raster_64bit) || QT_CONFIG(raster_fp)
4546 gradient.colorTable64 = cacheInfo->buffer64;
4555 conicalData.
center.
x = center.x();
4556 conicalData.
center.
y = center.y();
4649 delta.
translate(1.0 / 65536, 1.0 / 65536);
4664 const bool affine = inv.
isAffine();
4670 && f1 > (1.0 / 65536)
4671 && f2 > (1.0 / 65536)
4681 if (!
d ||
d->height == 0) {
4698 if (sourceRect.
isNull()) {
4710 texture.bytesPerLine =
d->bytes_per_line;
4737 const int midx =
rect.x() + (
rect.width() + 1) / 2;
4738 const int midy =
rect.y() + (
rect.height() + 1) / 2;
4744 outline[0].
x = midx + (midx -
x) - (
length - 1) - (
rect.width() & 0x1);
4756 outline[2].
x = outline[0].
x;
4757 outline[2].
len = outline[0].
len;
4758 outline[2].
y = midy + (midy -
y) - (
rect.height() & 0x1);
4764 outline[3].
y = outline[2].
y;
4767 if (brush_func && outline[0].
x + outline[0].
len < outline[1].
x) {
4772 fill[0].x = outline[0].
x + outline[0].
len - 1;
4774 fill[0].y = outline[1].
y;
4775 fill[0].coverage = 255;
4778 fill[1].x = outline[2].
x + outline[2].
len - 1;
4780 fill[1].y = outline[3].
y;
4781 fill[1].coverage = 255;
4783 int n = (
fill[0].y >=
fill[1].y ? 1 : 2);
4786 brush_func(
n,
fill, brush_data);
4789 int n = (outline[1].
y >= outline[2].
y ? 2 : 4);
4792 pen_func(
n, outline, pen_data);
4809 int y = (
rect.height() + 1) / 2;
4813 while (
a*
a*(2*
y - 1) > 2*
b*
b*(
x + 1)) {
4818 d +=
b*
b*(2*
x + 3) +
a*
a*(-2*
y + 2);
4820 pen_func, brush_func, pen_data, brush_data);
4826 pen_func, brush_func, pen_data, brush_data);
4829 d =
b*
b*(
x + 0.5)*(
x + 0.5) +
a*
a*((
y - 1)*(
y - 1) -
b*
b);
4830 const int miny =
rect.height() & 0x1;
4833 d +=
b*
b*(2*
x + 2) +
a*
a*(-2*
y + 3);
4836 d +=
a*
a*(-2*
y + 3);
4840 pen_func, brush_func, pen_data, brush_data);
4855 clipImg.fill(0xffff0000);
4864 for (
int i = 0;
i < clip->
count; ++
i) {
4866 for (
int j = 0;
j <
span->len; ++
j)
4867 clipImg.setPixel(
span->x +
j,
span->y, 0xffffff00);
IOBluetoothDevice * device
QTransform transform() const
char * data()
\macro QT_NO_CAST_FROM_BYTEARRAY
void appendSpans(const QT_FT_Span *s, int num)
struct QClipData::ClipLine * m_clipLines
void setClipRegion(const QRegion ®ion)
void setClipRect(const QRect &rect)
TransferFunction transferFunction() const noexcept
Returns the predefined transfer function of the color space or TransferFunction::Custom if it doesn't...
The QColor class provides colors based on RGB, HSV or CMYK values.
float alphaF() const noexcept
Returns the alpha color component of this color.
static QColor fromRgbF(float r, float g, float b, float a=1.0)
Static convenience function that returns a QColor constructed from the RGB color values,...
void drawPath(const QVectorPath &path)
void drawPoints(const QPoint *points, int num)
void drawLine(const QPointF &p1, const QPointF &p2)
static int repetitionLimit()
void setGlyphCache(const void *key, QFontEngineGlyphCache *data)
virtual bool expectsGammaCorrectedBlending() const
virtual Glyph * glyphData(glyph_t glyph, const QFixedPoint &subPixelPosition, GlyphFormat neededFormat, const QTransform &t)
virtual int glyphMargin(GlyphFormat format)
virtual bool supportsVerticalSubPixelPositions() const
void getGlyphPositions(const QGlyphLayout &glyphs, const QTransform &matrix, QTextItem::RenderFlags flags, QVarLengthArray< glyph_t > &glyphs_out, QVarLengthArray< QFixedPoint > &positions)
virtual bool supportsTransformation(const QTransform &transform) const
virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs)
QFontEngineGlyphCache * glyphCache(const void *key, GlyphFormat format, const QTransform &transform, const QColor &color=QColor()) const
virtual bool hasInternalCaching() const
virtual QFixedPoint subPixelPositionFor(const QFixedPoint &position) const
void generateGradientColorTable(const QGradient &g, QRgba64 *colorTable, int size, int opacity) const
QGradientColorTableHash cache
std::shared_ptr< const CacheInfo > addCacheElement(quint64 hash_val, const QGradient &gradient, int opacity)
std::shared_ptr< const CacheInfo > getBuffer(const QGradient &gradient, int opacity)
InterpolationMode interpolationMode() const
QGradientStops stops() const
Returns the stop points for this gradient.
static QPixelFormat toPixelFormat(QImage::Format format) noexcept
Converts format into a QPixelFormat.
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
QSize size() const
Returns the size of the image, i.e.
int width() const
Returns the width of the image.
bool isNull() const
Returns true if it is a null image, otherwise returns false.
int height() const
Returns the height of the image.
Format
The following image formats are available in Qt.
@ Format_ARGB6666_Premultiplied
@ Format_ARGB8555_Premultiplied
@ Format_RGBA8888_Premultiplied
@ Format_ARGB8565_Premultiplied
@ Format_A2BGR30_Premultiplied
@ Format_ARGB32_Premultiplied
@ Format_A2RGB30_Premultiplied
@ Format_ARGB4444_Premultiplied
const uchar * constScanLine(int) const
Returns a pointer to the pixel data at the scanline with index i.
QRect rect() const
Returns the enclosing rectangle (0, 0, width(), height()) of the image.
constexpr QPointF p1() const
Returns the line's start point.
qreal length() const
Returns the length of the line.
constexpr QPointF p2() const
Returns the line's end point.
void setLength(qreal len)
Sets the length of the line to the given finite length.
constexpr QPoint p1() const
Returns the line's start point.
constexpr QPoint p2() const
Returns the line's end point.
qsizetype size() const noexcept
const_pointer constData() const noexcept
const_reference at(qsizetype i) const noexcept
void reserve(qsizetype size)
const_iterator constEnd() const noexcept
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the ...
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first item in the hash.
qsizetype size() const noexcept
friend class const_iterator
iterator erase(const_iterator it)
const_iterator constFind(const Key &key) const noexcept
virtual int devType() const
void replayClipOperations()
virtual void drawRects(const QRect *rects, int rectCount) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void stroke(const QVectorPath &path, const QPen &pen)
virtual void drawEllipse(const QRectF &r) override
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
virtual void drawLines(const QLine *lines, int lineCount) override
This is an overloaded member function, provided for convenience. It differs from the above function o...
virtual void clip(const QVectorPath &path, Qt::ClipOperation op)=0
virtual bool requiresPretransformedGlyphPositions(QFontEngine *fontEngine, const QTransform &m) const
virtual bool shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const
virtual void setState(QPainterState *s)
virtual void drawPoints(const QPointF *points, int pointCount) override
Draws the first pointCount points in the buffer points.
virtual void drawStaticTextItem(QStaticTextItem *)
QPaintEngine::DirtyFlags state() const
Returns a combination of flags identifying the set of properties that need to be updated when updatin...
void setActive(bool newState)
Sets the active state of the paint engine to state.
virtual void drawTextItem(const QPointF &p, const QTextItem &textItem)
This function draws the text item textItem at position p.
PolygonDrawMode
\value OddEvenMode The polygon should be drawn using OddEven fill rule.
QPainter * painter() const
Returns the paint engine's painter.
void setDirty(DirtyFlags df)
PaintEngineFeatures gccaps
QRegion systemClip() const
QPaintDevice * device() const
Returns the paint device on which this painter is currently painting, or \nullptr if the painter is n...
@ NonCosmeticBrushPatterns
@ VerticalSubpixelPositioning
CompositionMode
Defines the modes supported for digital image compositing.
@ CompositionMode_SourceOver
QList< qreal > dashPattern() const
Returns the dash pattern of this pen.
bool isCosmetic() const
Returns true if the pen is cosmetic; otherwise returns false.
Qt::PenCapStyle capStyle() const
Returns the pen's cap style.
qreal miterLimit() const
Returns the miter limit of the pen.
QBrush brush() const
Returns the brush used to fill strokes generated with this pen.
qreal dashOffset() const
Returns the dash offset for the pen.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
\inmodule QtCore\reentrant
static Q_DECL_CONST_FUNCTION QRandomGenerator * global()
\threadsafe
double bounded(double highest)
Generates one random double in the range between 0 (inclusive) and highest (exclusive).
bool monoDestinationWithClut
QImage::Format prepare(QImage *image)
QPainter::CompositionMode compositionMode
qsizetype bytesPerLine() const
QImage colorizeBitmap(const QImage &image, const QColor &color)
int bytesPerPixel() const
bool isUnclipped_normalized(const QRect &rect) const
Returns true if the rectangle is completely within the current clip state of the paint engine.
QScopedPointer< QT_FT_Raster > grayRaster
void recalculateFastImages()
void initializeRasterizer(QSpanData *data)
ProcessSpans getBrushFunc(const QRect &rect, const QSpanData *data) const
bool canUseImageBlitting(QPainter::CompositionMode mode, const QImage &image, const QPointF &pt, const QRectF &sr) const
bool canUseFastImageBlending(QPainter::CompositionMode mode, const QImage &image) const
void drawImage(const QPointF &pt, const QImage &img, SrcOverBlendFunc func, const QRect &clip, int alpha, const QRect &sr=QRect())
bool isUnclipped(const QRect &rect, int penWidth) const
QRasterPaintEnginePrivate()
void rasterizeLine_dashed(QLineF line, qreal width, int *dashIndex, qreal *dashOffset, bool *inDash)
QScopedPointer< QClipData > baseClip
void blitImage(const QPointF &pt, const QImage &img, const QRect &clip, const QRect &sr=QRect())
const QClipData * clip() const
void systemStateChanged() override
void updateMatrixData(QSpanData *spanData, const QBrush &brush, const QTransform &brushMatrix)
void rasterize(QT_FT_Outline *outline, ProcessSpans callback, QSpanData *spanData, QRasterBuffer *rasterBuffer)
QScopedPointer< QRasterBuffer > rasterBuffer
QRect deviceRectUnclipped
ProcessSpans getPenFunc(const QRectF &rect, const QSpanData *data) const
QScopedPointer< QRasterizer > rasterizer
~QRasterPaintEngineState()
QRasterPaintEngineState()
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded ...
void compositionModeChanged() override
QPainterState * createState(QPainterState *orig) const override
void drawStaticTextItem(QStaticTextItem *textItem) override
\reimp
void fill(const QVectorPath &path, const QBrush &brush) override
~QRasterPaintEngine()
Destroys this paint engine.
void transformChanged() override
void setState(QPainterState *s) override
void drawEllipse(const QRectF &rect) override
\reimp
virtual bool drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, const QFixedPoint *positions, QFontEngine *fontEngine)
ClipType clipType() const
void brushChanged() override
void updatePen(const QPen &pen)
void renderHintsChanged() override
void drawPoints(const QPointF *points, int pointCount) override
\reimp
QRasterPaintEngineState * state()
const QClipData * clipData() const
virtual void fillPath(const QPainterPath &path, QSpanData *fillData)
bool end() override
\reimp
void stroke(const QVectorPath &path, const QPen &pen) override
void drawTextItem(const QPointF &p, const QTextItem &textItem) override
\reimp
void updateMatrix(const QTransform &matrix)
void opacityChanged() override
void drawPixmap(const QPointF &p, const QPixmap &pm) override
void updateBrush(const QBrush &brush)
void drawImage(const QPointF &p, const QImage &img) override
bool begin(QPaintDevice *device) override
\reimp
bool requiresPretransformedGlyphPositions(QFontEngine *fontEngine, const QTransform &m) const override
QPoint coordinateOffset() const override
void alphaPenBlt(const void *src, int bpl, int depth, int rx, int ry, int w, int h, bool useGammaCorrection)
void clipEnabledChanged() override
QRasterBuffer * rasterBuffer()
void penChanged() override
void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override
\reimp
void drawLines(const QLine *line, int lineCount) override
\reimp
void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &sr) override
\reimp
bool shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const override
Returns whether glyph caching is supported by the font engine fontEngine with the given transform m a...
void fillRect(const QRectF &rect, const QBrush &brush) override
\reimp
void clip(const QVectorPath &path, Qt::ClipOperation op) override
virtual void fillPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
QRasterPaintEngine(QPaintDevice *device)
void brushOriginChanged() override
QRectF clipBoundingRect() const
void drawRects(const QRect *rects, int rectCount) override
\reimp
void setAntialiased(bool antialiased)
void initialize(ProcessSpans blend, void *data)
void rasterizeLine(const QPointF &a, const QPointF &b, qreal width, bool squareCap=false)
void setClipRect(const QRect &clipRect)
void rasterize(const QT_FT_Outline *outline, Qt::FillRule fillRule)
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr qreal bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
QRect toAlignedRect() const noexcept
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr QRectF translated(qreal dx, qreal dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
constexpr QPointF bottomLeft() const noexcept
Returns the position of the rectangle's bottom-left corner.
constexpr qreal left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
bool intersects(const QRectF &r) const noexcept
Returns true if this rectangle intersects with the given rectangle (i.e.
QRectF normalized() const noexcept
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height.
constexpr QPointF topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr QPointF bottomRight() const noexcept
Returns the position of the rectangle's bottom-right corner.
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
constexpr QRect toRect() const noexcept
Returns a QRect based on the values of this rectangle.
constexpr void translate(qreal dx, qreal dy) noexcept
Moves the rectangle dx along the x-axis and dy along the y-axis, relative to the current position.
constexpr qreal top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr bool isValid() const noexcept
Returns true if the rectangle is valid, otherwise returns false.
constexpr QPointF topRight() const noexcept
Returns the position of the rectangle's top-right corner.
constexpr qreal right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
void set(const QRectF &r)
QRectVectorPath(const QRect &r)
QRectVectorPath(const QRectF &r)
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr bool isNull() const noexcept
Returns true if the rectangle is a null rectangle, otherwise returns false.
QRect intersected(const QRect &other) const noexcept
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
constexpr QPoint topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr void setRect(int x, int y, int w, int h) noexcept
Sets the coordinates of the rectangle's top-left corner to ({x}, {y}), and its size to the given widt...
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr void setX(int x) noexcept
Sets the left edge of the rectangle to the given x coordinate.
constexpr int width() const noexcept
Returns the width of the rectangle.
constexpr QRect translated(int dx, int dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr int right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
The QRegion class specifies a clip region for a painter.
QRect boundingRect() const noexcept
Returns the bounding rectangle of this region.
int rectCount() const noexcept
bool isEmpty() const
Returns true if the region is empty; otherwise returns false.
const_iterator begin() const noexcept
constexpr quint16 red() const
constexpr quint16 alpha() const
constexpr quint16 green() const
constexpr quint16 blue() const
static constexpr QRgba64 fromArgb32(uint rgb)
QFontEngine * fontEngine() const
QFixedPoint * glyphPositions
void setFontEngine(QFontEngine *fe)
QByteArray toLatin1() const
Returns a Latin-1 representation of the string as a QByteArray.
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype length() const
Returns the number of characters in this string.
constexpr size_type size() const noexcept
const T * constData() const
static uint polygonFlags(QPaintEngine::PolygonDrawMode mode)
QCache< int, Employee > cache
[0]
QSet< QString >::iterator it
Combined button and popup list for selecting options.
QTextStream & hex(QTextStream &stream)
Calls QTextStream::setIntegerBase(16) on stream and returns stream.
static jboolean copy(JNIEnv *, jobject)
SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats]
SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats]
SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats]
Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert)
bool Q_GUI_EXPORT qHasPixmapTexture(const QBrush &brush)
static const QCssKnownValue positions[NumKnownPositionModes - 1]
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
DBusConnection const char DBusError * error
DrawHelper qDrawHelper[QImage::NImageFormats]
void(* SrcOverBlendFunc)(uchar *destPixels, int dbpl, const uchar *src, int spbl, int w, int h, int const_alpha)
static constexpr int qt_div_255(int x)
QT_FT_SpanFunc ProcessSpans
static QRgba64 interpolate256(QRgba64 x, uint alpha1, QRgba64 y, uint alpha2)
static QRgba64 multiplyAlpha256(QRgba64 rgba64, uint alpha256)
#define GRADIENT_STOPTABLE_SIZE
void qBlendGradient(int count, const QT_FT_Span *spans, void *userData)
void(* SrcOverScaleFunc)(uchar *destPixels, int dbpl, const uchar *src, int spbl, int srch, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clipRect, int const_alpha)
void qBlendTexture(int count, const QT_FT_Span *spans, void *userData)
void(* SrcOverTransformFunc)(uchar *destPixels, int dbpl, const uchar *src, int spbl, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clipRect, const QTransform &targetRectTransform, int const_alpha)
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
bool qFuzzyIsNull(qfloat16 f) noexcept
int qRound(qfloat16 d) noexcept
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
int q_gray_rendered_spans(TRaster *raster)
const QT_FT_Raster_Funcs qt_ft_grays_raster
#define MINIMUM_POOL_SIZE
int qt_depthForFormat(QImage::Format format)
QImage::Format qt_maybeAlphaVersionWithSameDepth(QImage::Format format)
constexpr float qDegreesToRadians(float degrees)
QRect qt_mapFillRect(const QRectF &rect, const QTransform &xf)
MemRotateFunc qMemRotateFunctions[QPixelLayout::BPPCount][3]
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
constexpr T qAbs(const T &t)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLint GLenum GLsizei GLsizei GLsizei depth
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLfloat GLfloat GLfloat x1
GLenum GLuint GLenum GLsizei length
GLdouble GLdouble GLdouble GLdouble top
GLenum GLenum GLsizei count
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum const void GLbitfield GLsizei numGlyphs
GLsizei GLenum const void GLuint GLsizei GLfloat * metrics
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
GLuint GLfloat GLfloat y0
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLsizei GLchar * source
GLuint GLenum GLenum transform
GLfixed GLfixed GLint GLint GLfixed points
GLfixed GLfixed GLfixed y2
GLuint GLuint64EXT address
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const void * bits
GLdouble GLdouble GLdouble GLdouble q
GLsizei const GLchar *const * path
GLenum GLenum GLsizei void GLsizei void void * span
GLfloat GLfloat GLfloat alpha
GLenum GLenum GLenum GLenum GLenum scale
static const QRectF boundingRect(const QPointF *points, int pointCount)
Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
QT_BEGIN_NAMESPACE constexpr int QT_RASTER_COORD_LIMIT
@ LineDrawIncludeLastPixel
static int fast_ceil_positive(const qreal &v)
static void qt_span_fill_clipRect(int count, const QT_FT_Span *spans, void *userData)
static void qt_ft_outline_line_to(qfixed x, qfixed y, void *data)
Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert)
Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale)
static void qrasterpaintengine_dirty_clip(QRasterPaintEnginePrivate *d, QRasterPaintEngineState *s)
int q_gray_rendered_spans(QT_FT_Raster raster)
static void drawEllipse_midpoint_i(const QRect &rect, const QRect &clip, ProcessSpans pen_func, ProcessSpans brush_func, QSpanData *pen_data, QSpanData *brush_data)
static void fillRect_normalized(const QRect &r, QSpanData *data, QRasterPaintEnginePrivate *pe)
static void qrasterpaintengine_state_setNoClip(QRasterPaintEngineState *s)
static const QT_FT_Span * qt_intersect_spans(const QClipData *clip, int *currentClip, const QT_FT_Span *spans, const QT_FT_Span *end, QT_FT_Span **outSpans, int available)
QRectF qt_mapRect_non_normalizing(const QRectF &r, const QTransform &t)
static void qt_span_clip(int count, const QT_FT_Span *spans, void *userData)
static void qt_ft_outline_move_to(qfixed x, qfixed y, void *data)
static VisibleGlyphRange visibleGlyphRange(const QRectF &clip, QFontEngine *fontEngine, glyph_t *glyphs, QFixedPoint *positions, int numGlyphs)
static bool monoVal(const uchar *s, int x)
static uchar * alignAddress(uchar *address, quintptr alignmentMask)
static bool splitPolygon(const QPointF *points, int pointCount, QList< QPointF > *upper, QList< QPointF > *lower)
static void drawEllipsePoints(int x, int y, int length, const QRect &rect, const QRect &clip, ProcessSpans pen_func, ProcessSpans brush_func, QSpanData *pen_data, QSpanData *brush_data)
static void qt_span_fill_clipped(int count, const QT_FT_Span *spans, void *userData)
static QColor qPremultiplyWithExtraAlpha(const QColor &c, int alpha)
static void qt_ft_outline_cubic_to(qfixed c1x, qfixed c1y, qfixed c2x, qfixed c2y, qfixed ex, qfixed ey, void *data)
#define int_dim(pos, dim)
static const QRect toAlignedRect_positive(const QRectF &rect)
static bool isAbove(const QPointF *a, const QPointF *b)
qreal qpen_widthf(const QPen &p)
Qt::BrushStyle qbrush_style(const QBrush &b)
Qt::PenStyle qpen_style(const QPen &p)
const QColor & qbrush_color(const QBrush &b)
const void * data_ptr(const QTransform &t)
Qt::PenCapStyle qpen_capStyle(const QPen &p)
Qt::PenJoinStyle qpen_joinStyle(const QPen &p)
QPixelLayout qPixelLayouts[QImage::NImageFormats]
#define QT_FT_RASTER_FLAG_CLIP
#define QT_FT_RASTER_FLAG_DIRECT
#define QT_FT_OUTLINE_NONE
#define QT_FT_RASTER_FLAG_AA
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
constexpr int qGreen(QRgb rgb)
constexpr QRgb qPremultiply(QRgb x)
constexpr QRgba64 qRgba64(quint16 r, quint16 g, quint16 b, quint16 a)
QT_BEGIN_NAMESPACE QRgba64 combineAlpha256(QRgba64 rgba64, uint alpha256)
static const struct TessellationWindingOrderTab cw[]
#define qt_fixed_to_real(fixed)
QT_BEGIN_NAMESPACE typedef qreal qfixed
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
unsigned long long quint64
QFuture< QSet< QChar > > set
[10]
Q_CHECK_PTR(a=new int[80])
std::uniform_real_distribution dist(1, 2.5)
[2]
QTextStream out(stdout)
[7]
Qt::ClipOperation operation
AlphaRGBBlitFunc alphaRGBBlit
AlphamapBlitFunc alphamapBlit
BitmapBlitFunc bitmapBlit
struct QConicalGradientData::@218 center
static constexpr QFixed fromReal(qreal r)
QRgb buffer32[GRADIENT_STOPTABLE_SIZE]
QRgba64 buffer64[GRADIENT_STOPTABLE_SIZE]
CacheInfo(QGradientStops s, int op, QGradient::InterpolationMode mode)
QGradient::InterpolationMode interpolationMode
QRadialGradientData radial
const QRgb * colorTable32
QLinearGradientData linear
QConicalGradientData conical
struct QLinearGradientData::@214 origin
struct QLinearGradientData::@215 end
struct QRadialGradientData::@217 focal
struct QRadialGradientData::@216 center
AlphaRGBBlitFunc alphaRGBBlit
QRasterBuffer * rasterBuffer
void initTexture(const QImage *image, int alpha, QTextureData::Type=QTextureData::Plain, const QRect &sourceRect=QRect())
void setup(const QBrush &brush, int alpha, QPainter::CompositionMode compositionMode, bool isCosmetic)
BitmapBlitFunc bitmapBlit
std::shared_ptr< const void > cachedGradient
ProcessSpans unclipped_blend
AlphamapBlitFunc alphamapBlit
void setupMatrix(const QTransform &matrix, int bilinear)
QT_FT_Raster_DoneFunc raster_done
QT_FT_Raster_ResetFunc raster_reset
QT_FT_Raster_RenderFunc raster_render
QT_FT_Raster_NewFunc raster_new
QT_FT_Raster_BitTest_Func bit_test
QT_FT_SpanFunc gray_spans
QT_FT_Raster_BitSet_Func bit_set
QT_FT_SpanFunc black_spans