Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qblendfunctions_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QBLENDFUNCTIONS_P_H
6#define QBLENDFUNCTIONS_P_H
7
8#include <QtGui/private/qtguiglobal_p.h>
9#include <qmath.h>
10#include "qdrawhelper_p.h"
11
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the Qt API. It exists purely as an
19// implementation detail. This header file may change from version to
20// version without notice, or even be removed.
21//
22// We mean it.
23//
24template <typename T> int64_t qFloor64(T v)
25{
26 using std::floor;
27 return QtPrivate::qCheckedFPConversionToInteger<int64_t>(floor(v));
28}
29
30template <typename T> int64_t qCeil64(T v)
31{
32 using std::ceil;
33 return QtPrivate::qCheckedFPConversionToInteger<int64_t>(ceil(v));
34}
35
36template <typename SRC, typename T>
37void qt_scale_image_16bit(uchar *destPixels, int dbpl,
38 const uchar *srcPixels, int sbpl, int srch,
39 const QRectF &targetRect,
40 const QRectF &srcRect,
41 const QRect &clip,
42 T blender)
43{
44 if (targetRect.width() == 0 || targetRect.height() == 0)
45 return;
46
47 const qreal sx = srcRect.width() / (qreal) targetRect.width();
48 const qreal sy = srcRect.height() / (qreal) targetRect.height();
49
50 // Qt gui coordinates and dimensions are int32_t, so if we add 16bit of fixed point precision
51 // to them - we need at least 48bits.
52 const int64_t ix = 0x00010000 * sx;
53 const int64_t iy = 0x00010000 * sy;
54
55// qDebug() << "scale:" << Qt::endl
56// << " - target" << targetRect << Qt::endl
57// << " - source" << srcRect << Qt::endl
58// << " - clip" << clip << Qt::endl
59// << " - sx=" << sx << " sy=" << sy << " ix=" << ix << " iy=" << iy;
60
61 QRect tr = targetRect.normalized().toRect();
62 tr = tr.intersected(clip);
63 if (tr.isEmpty())
64 return;
65 const int tx1 = tr.left();
66 const int ty1 = tr.top();
67 int h = tr.height();
68 int w = tr.width();
69
70 quint64 basex;
71 quint64 srcy;
72
73 if (sx < 0) {
74 int64_t dstx = qFloor64((tx1 + qreal(0.5) - targetRect.right()) * sx * 65536) + 1;
75 basex = quint64(srcRect.right() * 65536) + dstx;
76 } else {
77 int64_t dstx = qCeil64((tx1 + qreal(0.5) - targetRect.left()) * sx * 65536) - 1;
78 basex = quint64(srcRect.left() * 65536) + dstx;
79 }
80 if (sy < 0) {
81 int64_t dsty = qFloor64((ty1 + qreal(0.5) - targetRect.bottom()) * sy * 65536) + 1;
82 srcy = quint64(srcRect.bottom() * 65536) + dsty;
83 } else {
84 int64_t dsty = qCeil64((ty1 + qreal(0.5) - targetRect.top()) * sy * 65536) - 1;
85 srcy = quint64(srcRect.top() * 65536) + dsty;
86 }
87
88 quint16 *dst = ((quint16 *) (destPixels + qsizetype(ty1) * dbpl)) + tx1;
89
90 // this bounds check here is required as floating point rounding above might in some cases lead to
91 // w/h values that are one pixel too large, falling outside of the valid image area.
92 const int ystart = static_cast<int>(srcy >> 16);
93 if (ystart >= srch && iy < 0) {
94 srcy += iy;
95 --h;
96 }
97 const int xstart = static_cast<int>(basex >> 16);
98 if (xstart >= (int)(sbpl/sizeof(SRC)) && ix < 0) {
99 basex += ix;
100 --w;
101 }
102 int yend = static_cast<int>((srcy + iy * (h - 1)) >> 16);
103 if (yend < 0 || yend >= srch)
104 --h;
105 int xend = static_cast<int>((basex + ix * (w - 1)) >> 16);
106 if (xend < 0 || xend >= (int)(sbpl/sizeof(SRC)))
107 --w;
108
109 while (--h >= 0) {
110 const SRC *src = (const SRC *) (srcPixels + (srcy >> 16) * sbpl);
111 quint64 srcx = basex;
112 int x = 0;
113 for (; x<w-7; x+=8) {
114 blender.write(&dst[x], src[srcx >> 16]); srcx += ix;
115 blender.write(&dst[x+1], src[srcx >> 16]); srcx += ix;
116 blender.write(&dst[x+2], src[srcx >> 16]); srcx += ix;
117 blender.write(&dst[x+3], src[srcx >> 16]); srcx += ix;
118 blender.write(&dst[x+4], src[srcx >> 16]); srcx += ix;
119 blender.write(&dst[x+5], src[srcx >> 16]); srcx += ix;
120 blender.write(&dst[x+6], src[srcx >> 16]); srcx += ix;
121 blender.write(&dst[x+7], src[srcx >> 16]); srcx += ix;
122 }
123 for (; x<w; ++x) {
124 blender.write(&dst[x], src[srcx >> 16]);
125 srcx += ix;
126 }
127 blender.flush(&dst[x]);
128 dst = (quint16 *)(((uchar *) dst) + dbpl);
129 srcy += iy;
130 }
131}
132
133template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl,
134 const uchar *srcPixels, int sbpl, int srch,
135 const QRectF &targetRect,
136 const QRectF &srcRect,
137 const QRect &clip,
138 T blender)
139{
140 if (targetRect.width() == 0 || targetRect.height() == 0)
141 return;
142
143 const qreal sx = srcRect.width() / (qreal) targetRect.width();
144 const qreal sy = srcRect.height() / (qreal) targetRect.height();
145
146 // Qt gui coordinates and dimensions are int32_t, so if we add 16bit of fixed point precision
147 // to them - we need at least 48bits.
148 const int64_t ix = 0x00010000 * sx;
149 const int64_t iy = 0x00010000 * sy;
150
151// qDebug() << "scale:" << Qt::endl
152// << " - target" << targetRect << Qt::endl
153// << " - source" << srcRect << Qt::endl
154// << " - clip" << clip << Qt::endl
155// << " - sx=" << sx << " sy=" << sy << " ix=" << ix << " iy=" << iy;
156
157 QRect tr = targetRect.normalized().toRect();
158 tr = tr.intersected(clip);
159 if (tr.isEmpty())
160 return;
161 const int tx1 = tr.left();
162 const int ty1 = tr.top();
163 int h = tr.height();
164 int w = tr.width();
165
166 uint64_t basex;
167 uint64_t srcy;
168
169 if (sx < 0) {
170 int64_t dstx = qFloor64((tx1 + qreal(0.5) - targetRect.right()) * sx * 65536) + 1;
171 basex = quint64(srcRect.right() * 65536) + dstx;
172 } else {
173 int64_t dstx = qCeil64((tx1 + qreal(0.5) - targetRect.left()) * sx * 65536) - 1;
174 basex = quint64(srcRect.left() * 65536) + dstx;
175 }
176 if (sy < 0) {
177 int64_t dsty = qFloor64((ty1 + qreal(0.5) - targetRect.bottom()) * sy * 65536) + 1;
178 srcy = quint64(srcRect.bottom() * 65536) + dsty;
179 } else {
180 int64_t dsty = qCeil64((ty1 + qreal(0.5) - targetRect.top()) * sy * 65536) - 1;
181 srcy = quint64(srcRect.top() * 65536) + dsty;
182 }
183
184 quint32 *dst = ((quint32 *) (destPixels + qsizetype(ty1) * dbpl)) + tx1;
185
186 // this bounds check here is required as floating point rounding above might in some cases lead to
187 // w/h values that are one pixel too large, falling outside of the valid image area.
188 const int ystart = static_cast<int>(srcy >> 16);
189 if (ystart >= srch && iy < 0) {
190 srcy += iy;
191 --h;
192 }
193 const int xstart = static_cast<int>(basex >> 16);
194 if (xstart >= (int)(sbpl/sizeof(quint32)) && ix < 0) {
195 basex += ix;
196 --w;
197 }
198 int yend = static_cast<int>((srcy + iy * (h - 1)) >> 16);
199 if (yend < 0 || yend >= srch)
200 --h;
201 int xend = static_cast<int>((basex + ix * (w - 1)) >> 16);
202 if (xend < 0 || xend >= (int)(sbpl/sizeof(quint32)))
203 --w;
204
205 while (--h >= 0) {
206 const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl);
207 quint64 srcx = basex;
208 int64_t x = 0;
209 for (; x<w; ++x) {
210 blender.write(&dst[x], src[srcx >> 16]);
211 srcx += ix;
212 }
213 blender.flush(&dst[x]);
214 dst = (quint32 *)(((uchar *) dst) + dbpl);
215 srcy += iy;
216 }
217}
218
220{
221 qreal x, y, u, v; // destination coordinates (x, y) and source coordinates (u, v)
222};
223
224template <class SrcT, class DestT, class Blender>
225void qt_transform_image_rasterize(DestT *destPixels, int dbpl,
226 const SrcT *srcPixels, int sbpl,
227 const QTransformImageVertex &topLeft, const QTransformImageVertex &bottomLeft,
228 const QTransformImageVertex &topRight, const QTransformImageVertex &bottomRight,
229 const QRect &sourceRect,
230 const QRect &clip,
231 qreal topY, qreal bottomY,
232 int64_t dudx, int64_t dvdx, int64_t dudy, int64_t dvdy, int64_t u0, int64_t v0,
233 Blender blender)
234{
235 qint64 fromY = qMax(qRound(topY), clip.top());
236 qint64 toY = qMin(qRound(bottomY), clip.top() + clip.height());
237 if (fromY >= toY)
238 return;
239
240 qreal leftSlope = (bottomLeft.x - topLeft.x) / (bottomLeft.y - topLeft.y);
241 qreal rightSlope = (bottomRight.x - topRight.x) / (bottomRight.y - topRight.y);
242 qint64 dx_l = qint64(leftSlope * 0x10000);
243 qint64 dx_r = qint64(rightSlope * 0x10000);
244 qint64 x_l = qint64((topLeft.x + (qreal(0.5) + fromY - topLeft.y) * leftSlope + qreal(0.5)) * 0x10000);
245 qint64 x_r = qint64((topRight.x + (qreal(0.5) + fromY - topRight.y) * rightSlope + qreal(0.5)) * 0x10000);
246
247 qint64 sourceRectTop = qint64(sourceRect.top());
248 qint64 sourceRectLeft = qint64(sourceRect.left());
249 qint64 sourceRectWidth = qint64(sourceRect.width());
250 qint64 sourceRectHeight = qint64(sourceRect.height());
251 qint64 clipLeft = qint64(clip.left());
252 qint64 clipWidth = qint64(clip.width());
253
254 qint64 fromX, toX, x1, x2, u, v, i, ii;
255 DestT *line;
256 for (qint64 y = fromY; y < toY; ++y) {
257 line = reinterpret_cast<DestT *>(reinterpret_cast<uchar *>(destPixels) + y * dbpl);
258
259 fromX = qMax(x_l >> 16, clipLeft);
260 toX = qMin(x_r >> 16, clipLeft + clipWidth);
261 if (fromX < toX) {
262 // Because of rounding, we can get source coordinates outside the source image.
263 // Clamp these coordinates to the source rect to avoid segmentation fault and
264 // garbage on the screen.
265
266 // Find the first pixel on the current scan line where the source coordinates are within the source rect.
267 x1 = fromX;
268 u = x1 * dudx + y * dudy + u0;
269 v = x1 * dvdx + y * dvdy + v0;
270 for (; x1 < toX; ++x1) {
271 qint64 uu = u >> 16;
272 qint64 vv = v >> 16;
273 if (uu >= sourceRectLeft && uu < sourceRectLeft + sourceRectWidth
274 && vv >= sourceRectTop && vv < sourceRectTop + sourceRectHeight) {
275 break;
276 }
277 u += dudx;
278 v += dvdx;
279 }
280
281 // Find the last pixel on the current scan line where the source coordinates are within the source rect.
282 x2 = toX;
283 u = (x2 - 1) * dudx + y * dudy + u0;
284 v = (x2 - 1) * dvdx + y * dvdy + v0;
285 for (; x2 > x1; --x2) {
286 qint64 uu = u >> 16;
287 qint64 vv = v >> 16;
288 if (uu >= sourceRectLeft && uu < sourceRectLeft + sourceRectWidth
289 && vv >= sourceRectTop && vv < sourceRectTop + sourceRectHeight) {
290 break;
291 }
292 u -= dudx;
293 v -= dvdx;
294 }
295
296 // Set up values at the beginning of the scan line.
297 u = fromX * dudx + y * dudy + u0;
298 v = fromX * dvdx + y * dvdy + v0;
299 line += fromX;
300
301 // Beginning of the scan line, with per-pixel checks.
302 i = x1 - fromX;
303 while (i) {
304 qint64 uu = qBound(sourceRectLeft, u >> 16, sourceRectLeft + sourceRectWidth - 1);
305 qint64 vv = qBound(sourceRectTop, v >> 16, sourceRectTop + sourceRectHeight - 1);
306 blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + vv * sbpl)[uu]);
307 u += dudx;
308 v += dvdx;
309 ++line;
310 --i;
311 }
312
313 // Middle of the scan line, without checks.
314 // Manual loop unrolling.
315 i = x2 - x1;
316 ii = i >> 3;
317 while (ii) {
318 blender.write(&line[0], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
319 blender.write(&line[1], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
320 blender.write(&line[2], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
321 blender.write(&line[3], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
322 blender.write(&line[4], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
323 blender.write(&line[5], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
324 blender.write(&line[6], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
325 blender.write(&line[7], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
326
327 line += 8;
328
329 --ii;
330 }
331 switch (i & 7) {
332 case 7: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
333 case 6: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
334 case 5: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
335 case 4: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
336 case 3: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
337 case 2: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line; Q_FALLTHROUGH();
338 case 1: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
339 }
340
341 // End of the scan line, with per-pixel checks.
342 i = toX - x2;
343 while (i) {
344 qint64 uu = qBound(sourceRectLeft, u >> 16, sourceRectLeft + sourceRectWidth - 1);
345 qint64 vv = qBound(sourceRectTop, v >> 16, sourceRectTop + sourceRectHeight - 1);
346 blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + vv * sbpl)[uu]);
347 u += dudx;
348 v += dvdx;
349 ++line;
350 --i;
351 }
352
353 blender.flush(line);
354 }
355 x_l += dx_l;
356 x_r += dx_r;
357 }
358}
359
360template <class SrcT, class DestT, class Blender>
361void qt_transform_image(DestT *destPixels, int dbpl,
362 const SrcT *srcPixels, int sbpl,
363 const QRectF &targetRect,
364 const QRectF &sourceRect,
365 const QRect &clip,
366 const QTransform &targetRectTransform,
367 Blender blender)
368{
369 enum Corner
370 {
371 TopLeft,
372 TopRight,
373 BottomRight,
374 BottomLeft
375 };
376
377 // map source rectangle to destination.
379 v[TopLeft].u = v[BottomLeft].u = sourceRect.left();
380 v[TopLeft].v = v[TopRight].v = sourceRect.top();
381 v[TopRight].u = v[BottomRight].u = sourceRect.right();
382 v[BottomLeft].v = v[BottomRight].v = sourceRect.bottom();
383 targetRectTransform.map(targetRect.left(), targetRect.top(), &v[TopLeft].x, &v[TopLeft].y);
384 targetRectTransform.map(targetRect.right(), targetRect.top(), &v[TopRight].x, &v[TopRight].y);
385 targetRectTransform.map(targetRect.left(), targetRect.bottom(), &v[BottomLeft].x, &v[BottomLeft].y);
386 targetRectTransform.map(targetRect.right(), targetRect.bottom(), &v[BottomRight].x, &v[BottomRight].y);
387
388 // find topmost vertex.
389 int topmost = 0;
390 for (int i = 1; i < 4; ++i) {
391 if (v[i].y < v[topmost].y)
392 topmost = i;
393 }
394 // rearrange array such that topmost vertex is at index 0.
395 switch (topmost) {
396 case 1:
397 {
398 QTransformImageVertex t = v[0];
399 for (int i = 0; i < 3; ++i)
400 v[i] = v[i+1];
401 v[3] = t;
402 }
403 break;
404 case 2:
405 qSwap(v[0], v[2]);
406 qSwap(v[1], v[3]);
407 break;
408 case 3:
409 {
410 QTransformImageVertex t = v[3];
411 for (int i = 3; i > 0; --i)
412 v[i] = v[i-1];
413 v[0] = t;
414 }
415 break;
416 }
417
418 // if necessary, swap vertex 1 and 3 such that 1 is to the left of 3.
419 qreal dx1 = v[1].x - v[0].x;
420 qreal dy1 = v[1].y - v[0].y;
421 qreal dx2 = v[3].x - v[0].x;
422 qreal dy2 = v[3].y - v[0].y;
423 if (dx1 * dy2 - dx2 * dy1 > 0)
424 qSwap(v[1], v[3]);
425
426 QTransformImageVertex u = {v[1].x - v[0].x, v[1].y - v[0].y, v[1].u - v[0].u, v[1].v - v[0].v};
427 QTransformImageVertex w = {v[2].x - v[0].x, v[2].y - v[0].y, v[2].u - v[0].u, v[2].v - v[0].v};
428
429 qreal det = u.x * w.y - u.y * w.x;
430 if (det == 0)
431 return;
432
433 qreal invDet = 1.0 / det;
434 qreal m11, m12, m21, m22, mdx, mdy;
435
436 m11 = (u.u * w.y - u.y * w.u) * invDet;
437 m12 = (u.x * w.u - u.u * w.x) * invDet;
438 m21 = (u.v * w.y - u.y * w.v) * invDet;
439 m22 = (u.x * w.v - u.v * w.x) * invDet;
440 mdx = v[0].u - m11 * v[0].x - m12 * v[0].y;
441 mdy = v[0].v - m21 * v[0].x - m22 * v[0].y;
442
443 int64_t dudx = int64_t(m11 * 0x10000);
444 int64_t dvdx = int64_t(m21 * 0x10000);
445 int64_t dudy = int64_t(m12 * 0x10000);
446 int64_t dvdy = int64_t(m22 * 0x10000);
447 int64_t u0 = qCeil64((qreal(0.5) * m11 + qreal(0.5) * m12 + mdx) * 0x10000) - 1;
448 int64_t v0 = qCeil64((qreal(0.5) * m21 + qreal(0.5) * m22 + mdy) * 0x10000) - 1;
449
450 int x1 = qFloor(sourceRect.left());
451 int y1 = qFloor(sourceRect.top());
452 int x2 = qCeil(sourceRect.right());
453 int y2 = qCeil(sourceRect.bottom());
454 QRect sourceRectI(x1, y1, x2 - x1, y2 - y1);
455
456 // rasterize trapezoids.
457 if (v[1].y < v[3].y) {
458 qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[0], v[1], v[0], v[3], sourceRectI, clip, v[0].y, v[1].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
459 qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[1], v[2], v[0], v[3], sourceRectI, clip, v[1].y, v[3].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
460 qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[1], v[2], v[3], v[2], sourceRectI, clip, v[3].y, v[2].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
461 } else {
462 qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[0], v[1], v[0], v[3], sourceRectI, clip, v[0].y, v[3].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
463 qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[0], v[1], v[3], v[2], sourceRectI, clip, v[3].y, v[1].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
464 qt_transform_image_rasterize(destPixels, dbpl, srcPixels, sbpl, v[1], v[2], v[3], v[2], sourceRectI, clip, v[1].y, v[2].y, dudx, dvdx, dudy, dvdy, u0, v0, blender);
465 }
466}
467
468QT_END_NAMESPACE
469
470#endif // QBLENDFUNCTIONS_P_H
Combined button and popup list for selecting options.
SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats]
void qt_scale_image_argb32_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int srch, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clip, int const_alpha)
static void qt_blend_argb32_on_argb32(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, int const_alpha)
void qInitBlendFunctions()
void qt_blend_argb32_on_rgb16_const_alpha(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, int const_alpha)
static void qt_blend_rgb32_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, int const_alpha)
SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats]
void qt_transform_image_rgb32_on_rgb32(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clip, const QTransform &targetRectTransform, int const_alpha)
void qt_scale_image_argb32_on_argb32(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int srch, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clip, int const_alpha)
void qt_transform_image_argb32_on_argb32(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clip, const QTransform &targetRectTransform, int const_alpha)
void qt_transform_image_rgb16_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clip, const QTransform &targetRectTransform, int const_alpha)
void qt_transform_image_argb32_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clip, const QTransform &targetRectTransform, int const_alpha)
void qt_blend_rgb32_on_rgb32(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, int const_alpha)
void qt_scale_image_rgb16_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int srch, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clip, int const_alpha)
void qt_scale_image_rgb32_on_rgb32(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int srch, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clip, int const_alpha)
SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats]
void qt_blend_rgb16_on_rgb16(uchar *dst, int dbpl, const uchar *src, int sbpl, int w, int h, int const_alpha)
static void qt_blend_argb32_on_rgb16(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int w, int h, int const_alpha)
int64_t qCeil64(T v)
void qt_transform_image(DestT *destPixels, int dbpl, const SrcT *srcPixels, int sbpl, const QRectF &targetRect, const QRectF &sourceRect, const QRect &clip, const QTransform &targetRectTransform, Blender blender)
void qt_transform_image_rasterize(DestT *destPixels, int dbpl, const SrcT *srcPixels, int sbpl, const QTransformImageVertex &topLeft, const QTransformImageVertex &bottomLeft, const QTransformImageVertex &topRight, const QTransformImageVertex &bottomRight, const QRect &sourceRect, const QRect &clip, qreal topY, qreal bottomY, int64_t dudx, int64_t dvdx, int64_t dudy, int64_t dvdy, int64_t u0, int64_t v0, Blender blender)
void qt_scale_image_16bit(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int srch, const QRectF &targetRect, const QRectF &srcRect, const QRect &clip, T blender)
void qt_scale_image_32bit(uchar *destPixels, int dbpl, const uchar *srcPixels, int sbpl, int srch, const QRectF &targetRect, const QRectF &srcRect, const QRect &clip, T blender)
void(*) SrcOverBlendFunc(uchar *destPixels, int dbpl, const uchar *src, int spbl, int w, int h, int const_alpha)
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)
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 write(quint32 *dst, quint32 src)
void write(quint32 *dst, quint32 src)
void write(quint16 *dst, quint32 src)
void write(quint16 *dst, quint32 src)
void write(quint16 *dst, quint16 src)
void write(quint16 *dst, quint16 src)
void write(quint32 *dst, quint32 src)
void write(quint32 *dst, quint32 src)
quint16 bytemul(quint16 x) const
uchar alpha(uchar src) const
quint16 bytemul(quint16 spix) const
uchar alpha(uchar src) const