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//
24
25template <typename SRC, typename T>
26void qt_scale_image_16bit(uchar *destPixels, int dbpl,
27 const uchar *srcPixels, int sbpl, int srch,
28 const QRectF &targetRect,
29 const QRectF &srcRect,
30 const QRect &clip,
31 T blender)
32{
33 qreal sx = srcRect.width() / (qreal) targetRect.width();
34 qreal sy = srcRect.height() / (qreal) targetRect.height();
35
36 const int ix = 0x00010000 * sx;
37 const int iy = 0x00010000 * sy;
38
39// qDebug() << "scale:" << Qt::endl
40// << " - target" << targetRect << Qt::endl
41// << " - source" << srcRect << Qt::endl
42// << " - clip" << clip << Qt::endl
43// << " - sx=" << sx << " sy=" << sy << " ix=" << ix << " iy=" << iy;
44
45 QRect tr = targetRect.normalized().toRect();
46 tr = tr.intersected(clip);
47 if (tr.isEmpty())
48 return;
49 const int tx1 = tr.left();
50 const int ty1 = tr.top();
51 int h = tr.height();
52 int w = tr.width();
53
54 quint32 basex;
55 quint32 srcy;
56
57 if (sx < 0) {
58 int dstx = qFloor((tx1 + qreal(0.5) - targetRect.right()) * sx * 65536) + 1;
59 basex = quint32(srcRect.right() * 65536) + dstx;
60 } else {
61 int dstx = qCeil((tx1 + qreal(0.5) - targetRect.left()) * sx * 65536) - 1;
62 basex = quint32(srcRect.left() * 65536) + dstx;
63 }
64 if (sy < 0) {
65 int dsty = qFloor((ty1 + qreal(0.5) - targetRect.bottom()) * sy * 65536) + 1;
66 srcy = quint32(srcRect.bottom() * 65536) + dsty;
67 } else {
68 int dsty = qCeil((ty1 + qreal(0.5) - targetRect.top()) * sy * 65536) - 1;
69 srcy = quint32(srcRect.top() * 65536) + dsty;
70 }
71
72 quint16 *dst = ((quint16 *) (destPixels + ty1 * dbpl)) + tx1;
73
74 // this bounds check here is required as floating point rounding above might in some cases lead to
75 // w/h values that are one pixel too large, falling outside of the valid image area.
76 const int ystart = srcy >> 16;
77 if (ystart >= srch && iy < 0) {
78 srcy += iy;
79 --h;
80 }
81 const int xstart = basex >> 16;
82 if (xstart >= (int)(sbpl/sizeof(SRC)) && ix < 0) {
83 basex += ix;
84 --w;
85 }
86 int yend = (srcy + iy * (h - 1)) >> 16;
87 if (yend < 0 || yend >= srch)
88 --h;
89 int xend = (basex + ix * (w - 1)) >> 16;
90 if (xend < 0 || xend >= (int)(sbpl/sizeof(SRC)))
91 --w;
92
93 while (--h >= 0) {
94 const SRC *src = (const SRC *) (srcPixels + (srcy >> 16) * sbpl);
95 quint32 srcx = basex;
96 int x = 0;
97 for (; x<w-7; x+=8) {
98 blender.write(&dst[x], src[srcx >> 16]); srcx += ix;
99 blender.write(&dst[x+1], src[srcx >> 16]); srcx += ix;
100 blender.write(&dst[x+2], src[srcx >> 16]); srcx += ix;
101 blender.write(&dst[x+3], src[srcx >> 16]); srcx += ix;
102 blender.write(&dst[x+4], src[srcx >> 16]); srcx += ix;
103 blender.write(&dst[x+5], src[srcx >> 16]); srcx += ix;
104 blender.write(&dst[x+6], src[srcx >> 16]); srcx += ix;
105 blender.write(&dst[x+7], src[srcx >> 16]); srcx += ix;
106 }
107 for (; x<w; ++x) {
108 blender.write(&dst[x], src[srcx >> 16]);
109 srcx += ix;
110 }
111 blender.flush(&dst[x]);
112 dst = (quint16 *)(((uchar *) dst) + dbpl);
113 srcy += iy;
114 }
115}
116
117template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl,
118 const uchar *srcPixels, int sbpl, int srch,
119 const QRectF &targetRect,
120 const QRectF &srcRect,
121 const QRect &clip,
122 T blender)
123{
124 qreal sx = srcRect.width() / (qreal) targetRect.width();
125 qreal sy = srcRect.height() / (qreal) targetRect.height();
126
127 const int ix = 0x00010000 * sx;
128 const int iy = 0x00010000 * sy;
129
130// qDebug() << "scale:" << Qt::endl
131// << " - target" << targetRect << Qt::endl
132// << " - source" << srcRect << Qt::endl
133// << " - clip" << clip << Qt::endl
134// << " - sx=" << sx << " sy=" << sy << " ix=" << ix << " iy=" << iy;
135
136 QRect tr = targetRect.normalized().toRect();
137 tr = tr.intersected(clip);
138 if (tr.isEmpty())
139 return;
140 const int tx1 = tr.left();
141 const int ty1 = tr.top();
142 int h = tr.height();
143 int w = tr.width();
144
145 quint32 basex;
146 quint32 srcy;
147
148 if (sx < 0) {
149 int dstx = qFloor((tx1 + qreal(0.5) - targetRect.right()) * sx * 65536) + 1;
150 basex = quint32(srcRect.right() * 65536) + dstx;
151 } else {
152 int dstx = qCeil((tx1 + qreal(0.5) - targetRect.left()) * sx * 65536) - 1;
153 basex = quint32(srcRect.left() * 65536) + dstx;
154 }
155 if (sy < 0) {
156 int dsty = qFloor((ty1 + qreal(0.5) - targetRect.bottom()) * sy * 65536) + 1;
157 srcy = quint32(srcRect.bottom() * 65536) + dsty;
158 } else {
159 int dsty = qCeil((ty1 + qreal(0.5) - targetRect.top()) * sy * 65536) - 1;
160 srcy = quint32(srcRect.top() * 65536) + dsty;
161 }
162
163 quint32 *dst = ((quint32 *) (destPixels + ty1 * dbpl)) + tx1;
164
165 // this bounds check here is required as floating point rounding above might in some cases lead to
166 // w/h values that are one pixel too large, falling outside of the valid image area.
167 const int ystart = srcy >> 16;
168 if (ystart >= srch && iy < 0) {
169 srcy += iy;
170 --h;
171 }
172 const int xstart = basex >> 16;
173 if (xstart >= (int)(sbpl/sizeof(quint32)) && ix < 0) {
174 basex += ix;
175 --w;
176 }
177 int yend = (srcy + iy * (h - 1)) >> 16;
178 if (yend < 0 || yend >= srch)
179 --h;
180 int xend = (basex + ix * (w - 1)) >> 16;
181 if (xend < 0 || xend >= (int)(sbpl/sizeof(quint32)))
182 --w;
183
184 while (--h >= 0) {
185 const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl);
186 quint32 srcx = basex;
187 int x = 0;
188 for (; x<w; ++x) {
189 blender.write(&dst[x], src[srcx >> 16]);
190 srcx += ix;
191 }
192 blender.flush(&dst[x]);
193 dst = (quint32 *)(((uchar *) dst) + dbpl);
194 srcy += iy;
195 }
196}
197
199{
200 qreal x, y, u, v; // destination coordinates (x, y) and source coordinates (u, v)
201};
202
203template <class SrcT, class DestT, class Blender>
204void qt_transform_image_rasterize(DestT *destPixels, int dbpl,
205 const SrcT *srcPixels, int sbpl,
206 const QTransformImageVertex &topLeft, const QTransformImageVertex &bottomLeft,
207 const QTransformImageVertex &topRight, const QTransformImageVertex &bottomRight,
208 const QRect &sourceRect,
209 const QRect &clip,
210 qreal topY, qreal bottomY,
211 int dudx, int dvdx, int dudy, int dvdy, int u0, int v0,
212 Blender blender)
213{
214 qint64 fromY = qMax(qRound(topY), clip.top());
215 qint64 toY = qMin(qRound(bottomY), clip.top() + clip.height());
216 if (fromY >= toY)
217 return;
218
219 qreal leftSlope = (bottomLeft.x - topLeft.x) / (bottomLeft.y - topLeft.y);
220 qreal rightSlope = (bottomRight.x - topRight.x) / (bottomRight.y - topRight.y);
221 qint64 dx_l = qint64(leftSlope * 0x10000);
222 qint64 dx_r = qint64(rightSlope * 0x10000);
223 qint64 x_l = qint64((topLeft.x + (qreal(0.5) + fromY - topLeft.y) * leftSlope + qreal(0.5)) * 0x10000);
224 qint64 x_r = qint64((topRight.x + (qreal(0.5) + fromY - topRight.y) * rightSlope + qreal(0.5)) * 0x10000);
225
226 qint64 sourceRectTop = qint64(sourceRect.top());
227 qint64 sourceRectLeft = qint64(sourceRect.left());
228 qint64 sourceRectWidth = qint64(sourceRect.width());
229 qint64 sourceRectHeight = qint64(sourceRect.height());
230 qint64 clipLeft = qint64(clip.left());
231 qint64 clipWidth = qint64(clip.width());
232
233 qint64 fromX, toX, x1, x2, u, v, i, ii;
234 DestT *line;
235 for (qint64 y = fromY; y < toY; ++y) {
236 line = reinterpret_cast<DestT *>(reinterpret_cast<uchar *>(destPixels) + y * dbpl);
237
238 fromX = qMax(x_l >> 16, clipLeft);
239 toX = qMin(x_r >> 16, clipLeft + clipWidth);
240 if (fromX < toX) {
241 // Because of rounding, we can get source coordinates outside the source image.
242 // Clamp these coordinates to the source rect to avoid segmentation fault and
243 // garbage on the screen.
244
245 // Find the first pixel on the current scan line where the source coordinates are within the source rect.
246 x1 = fromX;
247 u = x1 * dudx + y * dudy + u0;
248 v = x1 * dvdx + y * dvdy + v0;
249 for (; x1 < toX; ++x1) {
250 qint64 uu = u >> 16;
251 qint64 vv = v >> 16;
252 if (uu >= sourceRectLeft && uu < sourceRectLeft + sourceRectWidth
253 && vv >= sourceRectTop && vv < sourceRectTop + sourceRectHeight) {
254 break;
255 }
256 u += dudx;
257 v += dvdx;
258 }
259
260 // Find the last pixel on the current scan line where the source coordinates are within the source rect.
261 x2 = toX;
262 u = (x2 - 1) * dudx + y * dudy + u0;
263 v = (x2 - 1) * dvdx + y * dvdy + v0;
264 for (; x2 > x1; --x2) {
265 qint64 uu = u >> 16;
266 qint64 vv = v >> 16;
267 if (uu >= sourceRectLeft && uu < sourceRectLeft + sourceRectWidth
268 && vv >= sourceRectTop && vv < sourceRectTop + sourceRectHeight) {
269 break;
270 }
271 u -= dudx;
272 v -= dvdx;
273 }
274
275 // Set up values at the beginning of the scan line.
276 u = fromX * dudx + y * dudy + u0;
277 v = fromX * dvdx + y * dvdy + v0;
278 line += fromX;
279
280 // Beginning of the scan line, with per-pixel checks.
281 i = x1 - fromX;
282 while (i) {
283 qint64 uu = qBound(sourceRectLeft, u >> 16, sourceRectLeft + sourceRectWidth - 1);
284 qint64 vv = qBound(sourceRectTop, v >> 16, sourceRectTop + sourceRectHeight - 1);
285 blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + vv * sbpl)[uu]);
286 u += dudx;
287 v += dvdx;
288 ++line;
289 --i;
290 }
291
292 // Middle of the scan line, without checks.
293 // Manual loop unrolling.
294 i = x2 - x1;
295 ii = i >> 3;
296 while (ii) {
297 blender.write(&line[0], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
298 blender.write(&line[1], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
299 blender.write(&line[2], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
300 blender.write(&line[3], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
301 blender.write(&line[4], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
302 blender.write(&line[5], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
303 blender.write(&line[6], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
304 blender.write(&line[7], reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx;
305
306 line += 8;
307
308 --ii;
309 }
310 switch (i & 7) {
311 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();
312 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();
313 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();
314 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();
315 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();
316 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();
317 case 1: blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + (v >> 16) * sbpl)[u >> 16]); u += dudx; v += dvdx; ++line;
318 }
319
320 // End of the scan line, with per-pixel checks.
321 i = toX - x2;
322 while (i) {
323 qint64 uu = qBound(sourceRectLeft, u >> 16, sourceRectLeft + sourceRectWidth - 1);
324 qint64 vv = qBound(sourceRectTop, v >> 16, sourceRectTop + sourceRectHeight - 1);
325 blender.write(line, reinterpret_cast<const SrcT *>(reinterpret_cast<const uchar *>(srcPixels) + vv * sbpl)[uu]);
326 u += dudx;
327 v += dvdx;
328 ++line;
329 --i;
330 }
331
332 blender.flush(line);
333 }
334 x_l += dx_l;
335 x_r += dx_r;
336 }
337}
338
339template <class SrcT, class DestT, class Blender>
340void qt_transform_image(DestT *destPixels, int dbpl,
341 const SrcT *srcPixels, int sbpl,
342 const QRectF &targetRect,
343 const QRectF &sourceRect,
344 const QRect &clip,
345 const QTransform &targetRectTransform,
346 Blender blender)
347{
348 enum Corner
349 {
350 TopLeft,
351 TopRight,
352 BottomRight,
353 BottomLeft
354 };
355
356 // map source rectangle to destination.
358 v[TopLeft].u = v[BottomLeft].u = sourceRect.left();
359 v[TopLeft].v = v[TopRight].v = sourceRect.top();
360 v[TopRight].u = v[BottomRight].u = sourceRect.right();
361 v[BottomLeft].v = v[BottomRight].v = sourceRect.bottom();
362 targetRectTransform.map(targetRect.left(), targetRect.top(), &v[TopLeft].x, &v[TopLeft].y);
363 targetRectTransform.map(targetRect.right(), targetRect.top(), &v[TopRight].x, &v[TopRight].y);
364 targetRectTransform.map(targetRect.left(), targetRect.bottom(), &v[BottomLeft].x, &v[BottomLeft].y);
365 targetRectTransform.map(targetRect.right(), targetRect.bottom(), &v[BottomRight].x, &v[BottomRight].y);
366
367 // find topmost vertex.
368 int topmost = 0;
369 for (int i = 1; i < 4; ++i) {
370 if (v[i].y < v[topmost].y)
371 topmost = i;
372 }
373 // rearrange array such that topmost vertex is at index 0.
374 switch (topmost) {
375 case 1:
376 {
377 QTransformImageVertex t = v[0];
378 for (int i = 0; i < 3; ++i)
379 v[i] = v[i+1];
380 v[3] = t;
381 }
382 break;
383 case 2:
384 qSwap(v[0], v[2]);
385 qSwap(v[1], v[3]);
386 break;
387 case 3:
388 {
389 QTransformImageVertex t = v[3];
390 for (int i = 3; i > 0; --i)
391 v[i] = v[i-1];
392 v[0] = t;
393 }
394 break;
395 }
396
397 // if necessary, swap vertex 1 and 3 such that 1 is to the left of 3.
398 qreal dx1 = v[1].x - v[0].x;
399 qreal dy1 = v[1].y - v[0].y;
400 qreal dx2 = v[3].x - v[0].x;
401 qreal dy2 = v[3].y - v[0].y;
402 if (dx1 * dy2 - dx2 * dy1 > 0)
403 qSwap(v[1], v[3]);
404
405 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};
406 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};
407
408 qreal det = u.x * w.y - u.y * w.x;
409 if (det == 0)
410 return;
411
412 qreal invDet = 1.0 / det;
413 qreal m11, m12, m21, m22, mdx, mdy;
414
415 m11 = (u.u * w.y - u.y * w.u) * invDet;
416 m12 = (u.x * w.u - u.u * w.x) * invDet;
417 m21 = (u.v * w.y - u.y * w.v) * invDet;
418 m22 = (u.x * w.v - u.v * w.x) * invDet;
419 mdx = v[0].u - m11 * v[0].x - m12 * v[0].y;
420 mdy = v[0].v - m21 * v[0].x - m22 * v[0].y;
421
422 int dudx = int(m11 * 0x10000);
423 int dvdx = int(m21 * 0x10000);
424 int dudy = int(m12 * 0x10000);
425 int dvdy = int(m22 * 0x10000);
426 int u0 = qCeil((qreal(0.5) * m11 + qreal(0.5) * m12 + mdx) * 0x10000) - 1;
427 int v0 = qCeil((qreal(0.5) * m21 + qreal(0.5) * m22 + mdy) * 0x10000) - 1;
428
429 int x1 = qFloor(sourceRect.left());
430 int y1 = qFloor(sourceRect.top());
431 int x2 = qCeil(sourceRect.right());
432 int y2 = qCeil(sourceRect.bottom());
433 QRect sourceRectI(x1, y1, x2 - x1, y2 - y1);
434
435 // rasterize trapezoids.
436 if (v[1].y < v[3].y) {
437 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);
438 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);
439 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);
440 } else {
441 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);
442 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);
443 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);
444 }
445}
446
447QT_END_NAMESPACE
448
449#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)
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, int dudx, int dvdx, int dudy, int dvdy, int u0, int v0, Blender blender)
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_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(* 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(* 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 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