Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qblendfunctions.cpp
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
4#include <qmath.h>
5#include "qblendfunctions_p.h"
6
8
10{
11 inline uchar alpha(uchar src) const { return src; }
12 inline quint16 bytemul(quint16 spix) const { return spix; }
13};
14
15
17{
19 m_alpha255 = (m_alpha256 * 255) >> 8;
20 };
21 inline uchar alpha(uchar src) const { return (src * m_alpha256) >> 8; }
22 inline quint16 bytemul(quint16 x) const {
23 uint t = (((x & 0x07e0)*m_alpha255) >> 8) & 0x07e0;
24 t |= (((x & 0xf81f)*(m_alpha255>>2)) >> 6) & 0xf81f;
25 return t;
26 }
29};
30
31
32/************************************************************************
33 RGB16 (565) format target format
34 ************************************************************************/
35
37 inline void write(quint16 *dst, quint16 src) { *dst = src; }
38
39 inline void flush(void *) {}
40};
41
44 m_alpha = (alpha * 255) >> 8;
45 m_ialpha = 255 - m_alpha;
46 }
47
51
52 inline void flush(void *) {}
53
56};
57
59 inline void write(quint16 *dst, quint32 src) {
60 const quint8 alpha = qAlpha(src);
61 if (alpha) {
63 if (alpha < 255)
64 s += BYTE_MUL_RGB16(*dst, 255 - alpha);
65 *dst = s;
66 }
67 }
68
69 inline void flush(void *) {}
70};
71
76
77 inline void write(quint16 *dst, quint32 src) {
79 const quint8 alpha = qAlpha(src);
80 if (alpha) {
82 if (alpha < 255)
83 s += BYTE_MUL_RGB16(*dst, 255 - alpha);
84 *dst = s;
85 }
86 }
87
88 inline void flush(void *) {}
89
91};
92
93void qt_scale_image_rgb16_on_rgb16(uchar *destPixels, int dbpl,
94 const uchar *srcPixels, int sbpl, int srch,
95 const QRectF &targetRect,
96 const QRectF &sourceRect,
97 const QRect &clip,
98 int const_alpha)
99{
100#ifdef QT_DEBUG_DRAW
101 printf("qt_scale_rgb16_on_rgb16: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n",
102 destPixels, dbpl, srcPixels, sbpl,
103 targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(),
104 sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(),
105 const_alpha);
106#endif
107 if (const_alpha == 256) {
109 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl, srch,
110 targetRect, sourceRect, clip, noAlpha);
111 } else {
112 Blend_RGB16_on_RGB16_ConstAlpha constAlpha(const_alpha);
113 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl, srch,
114 targetRect, sourceRect, clip, constAlpha);
115 }
116}
117
118void qt_scale_image_argb32_on_rgb16(uchar *destPixels, int dbpl,
119 const uchar *srcPixels, int sbpl, int srch,
120 const QRectF &targetRect,
121 const QRectF &sourceRect,
122 const QRect &clip,
123 int const_alpha)
124{
125#ifdef QT_DEBUG_DRAW
126 printf("qt_scale_argb32_on_rgb16: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n",
127 destPixels, dbpl, srcPixels, sbpl,
128 targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(),
129 sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(),
130 const_alpha);
131#endif
132 if (const_alpha == 256) {
134 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl, srch,
135 targetRect, sourceRect, clip, noAlpha);
136 } else {
137 Blend_ARGB32_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha);
138 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl, srch,
139 targetRect, sourceRect, clip, constAlpha);
140 }
141}
142
144 const uchar *src, int sbpl,
145 int w, int h,
146 int const_alpha)
147{
148#ifdef QT_DEBUG_DRAW
149 printf("qt_blend_rgb16_on_rgb16: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
150 dst, dbpl, src, sbpl, w, h, const_alpha);
151#endif
152
153 if (const_alpha == 256) {
154 int length = w << 1;
155 while (--h >= 0) {
156 memcpy(dst, src, length);
157 dst += dbpl;
158 src += sbpl;
159 }
160 } else if (const_alpha != 0) {
161 quint16 *d = (quint16 *) dst;
162 const quint16 *s = (const quint16 *) src;
163 quint8 a = (255 * const_alpha) >> 8;
164 quint8 ia = 255 - a;
165 while (--h >= 0) {
166 for (int x=0; x<w; ++x) {
167 d[x] = BYTE_MUL_RGB16(s[x], a) + BYTE_MUL_RGB16(d[x], ia);
168 }
169 d = (quint16 *)(((uchar *) d) + dbpl);
170 s = (const quint16 *)(((const uchar *) s) + sbpl);
171 }
172 }
173}
174
175
177 const uchar *srcPixels, int sbpl,
178 int w, int h,
179 int const_alpha)
180{
181 quint16 *dst = (quint16 *) destPixels;
182 const quint32 *src = (const quint32 *) srcPixels;
183
184 const_alpha = (const_alpha * 255) >> 8;
185 for (int y=0; y<h; ++y) {
186 for (int i = 0; i < w; ++i) {
187 uint s = src[i];
188 s = BYTE_MUL(s, const_alpha);
189 int alpha = qAlpha(s);
191 s += BYTE_MUL_RGB16(dst[i], 255 - alpha);
192 dst[i] = s;
193 }
194 dst = (quint16 *)(((uchar *) dst) + dbpl);
195 src = (const quint32 *)(((const uchar *) src) + sbpl);
196 }
197}
198
199static void qt_blend_argb32_on_rgb16(uchar *destPixels, int dbpl,
200 const uchar *srcPixels, int sbpl,
201 int w, int h,
202 int const_alpha)
203{
204 if (const_alpha != 256) {
205 qt_blend_argb32_on_rgb16_const_alpha(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
206 return;
207 }
208
209 quint16 *dst = (quint16 *) destPixels;
210 const quint32 *src = (const quint32 *) srcPixels;
211
212 for (int y=0; y<h; ++y) {
213 for (int x=0; x<w; ++x) {
214
215 quint32 spix = src[x];
216 quint32 alpha = spix >> 24;
217
218 if (alpha == 255) {
219 dst[x] = qConvertRgb32To16(spix);
220 } else if (alpha != 0) {
221 quint32 dpix = dst[x];
222
223 quint32 sia = 255 - alpha;
224
225 quint32 sr = (spix >> 8) & 0xf800;
226 quint32 sg = (spix >> 5) & 0x07e0;
227 quint32 sb = (spix >> 3) & 0x001f;
228
229 quint32 dr = (dpix & 0x0000f800);
230 quint32 dg = (dpix & 0x000007e0);
231 quint32 db = (dpix & 0x0000001f);
232
233 quint32 siar = dr * sia;
234 quint32 siag = dg * sia;
235 quint32 siab = db * sia;
236
237 quint32 rr = sr + ((siar + (siar>>8) + (0x80 << 8)) >> 8);
238 quint32 rg = sg + ((siag + (siag>>8) + (0x80 << 3)) >> 8);
239 quint32 rb = sb + ((siab + (siab>>8) + (0x80 >> 3)) >> 8);
240
241 dst[x] = (rr & 0xf800)
242 | (rg & 0x07e0)
243 | (rb);
244 }
245 }
246 dst = (quint16 *) (((uchar *) dst) + dbpl);
247 src = (const quint32 *) (((const uchar *) src) + sbpl);
248 }
249}
250
251
252static void qt_blend_rgb32_on_rgb16(uchar *destPixels, int dbpl,
253 const uchar *srcPixels, int sbpl,
254 int w, int h,
255 int const_alpha)
256{
257#ifdef QT_DEBUG_DRAW
258 printf("qt_blend_rgb32_on_rgb16: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
259 destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
260#endif
261
262 if (const_alpha != 256) {
263 qt_blend_argb32_on_rgb16(destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
264 return;
265 }
266
267 const quint32 *src = (const quint32 *) srcPixels;
268 int srcExtraStride = (sbpl >> 2) - w;
269
270 int dstJPL = dbpl / 2;
271
272 quint16 *dst = (quint16 *) destPixels;
273 quint16 *dstEnd = dst + dstJPL * h;
274
275 int dstExtraStride = dstJPL - w;
276
277 while (dst < dstEnd) {
278 const quint32 *srcEnd = src + w;
279 while (src < srcEnd) {
281 ++dst;
282 ++src;
283 }
284 dst += dstExtraStride;
285 src += srcExtraStride;
286 }
287}
288
289
290
291/************************************************************************
292 RGB32 (-888) format target format
293 ************************************************************************/
294
295static void qt_blend_argb32_on_argb32(uchar *destPixels, int dbpl,
296 const uchar *srcPixels, int sbpl,
297 int w, int h,
298 int const_alpha)
299{
300#ifdef QT_DEBUG_DRAW
301 fprintf(stdout, "qt_blend_argb32_on_argb32: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
302 destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
303 fflush(stdout);
304#endif
305
306 const uint *src = (const uint *) srcPixels;
307 uint *dst = (uint *) destPixels;
308 if (const_alpha == 256) {
309 for (int y=0; y<h; ++y) {
310 for (int x=0; x<w; ++x) {
311 uint s = src[x];
312 if (s >= 0xff000000)
313 dst[x] = s;
314 else if (s != 0)
315 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
316 }
317 dst = (quint32 *)(((uchar *) dst) + dbpl);
318 src = (const quint32 *)(((const uchar *) src) + sbpl);
319 }
320 } else if (const_alpha != 0) {
321 const_alpha = (const_alpha * 255) >> 8;
322 for (int y=0; y<h; ++y) {
323 for (int x=0; x<w; ++x) {
324 uint s = BYTE_MUL(src[x], const_alpha);
325 dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s));
326 }
327 dst = (quint32 *)(((uchar *) dst) + dbpl);
328 src = (const quint32 *)(((const uchar *) src) + sbpl);
329 }
330 }
331}
332
333
334void qt_blend_rgb32_on_rgb32(uchar *destPixels, int dbpl,
335 const uchar *srcPixels, int sbpl,
336 int w, int h,
337 int const_alpha)
338{
339#ifdef QT_DEBUG_DRAW
340 fprintf(stdout, "qt_blend_rgb32_on_rgb32: dst=(%p, %d), src=(%p, %d), dim=(%d, %d) alpha=%d\n",
341 destPixels, dbpl, srcPixels, sbpl, w, h, const_alpha);
342 fflush(stdout);
343#endif
344 const uint *src = (const uint *) srcPixels;
345 uint *dst = (uint *) destPixels;
346 if (const_alpha == 256) {
347 const int len = w * 4;
348 for (int y = 0; y < h; ++y) {
349 memcpy(dst, src, len);
350 dst = (quint32 *)(((uchar *) dst) + dbpl);
351 src = (const quint32 *)(((const uchar *) src) + sbpl);
352 }
353 return;
354 } else if (const_alpha != 0) {
355 const_alpha = (const_alpha * 255) >> 8;
356 int ialpha = 255 - const_alpha;
357 for (int y=0; y<h; ++y) {
358 for (int x=0; x<w; ++x)
359 dst[x] = INTERPOLATE_PIXEL_255(dst[x], ialpha, src[x], const_alpha);
360 dst = (quint32 *)(((uchar *) dst) + dbpl);
361 src = (const quint32 *)(((const uchar *) src) + sbpl);
362 }
363 }
364}
365
367 inline void write(quint32 *dst, quint32 src) { *dst = src; }
368
369 inline void flush(void *) {}
370};
371
374 m_alpha = (alpha * 255) >> 8;
375 m_ialpha = 255 - m_alpha;
376 }
377
381
382 inline void flush(void *) {}
383
386};
387
389 inline void write(quint32 *dst, quint32 src)
390 {
392 }
393
394 inline void flush(void *) {}
395};
396
402
403 inline void write(quint32 *dst, quint32 src)
404 {
406 }
407
408 inline void flush(void *) {}
409
411};
412
413void qt_scale_image_rgb32_on_rgb32(uchar *destPixels, int dbpl,
414 const uchar *srcPixels, int sbpl, int srch,
415 const QRectF &targetRect,
416 const QRectF &sourceRect,
417 const QRect &clip,
418 int const_alpha)
419{
420#ifdef QT_DEBUG_DRAW
421 printf("qt_scale_rgb32_on_rgb32: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n",
422 destPixels, dbpl, srcPixels, sbpl,
423 targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(),
424 sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(),
425 const_alpha);
426#endif
427 if (const_alpha == 256) {
429 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl, srch,
430 targetRect, sourceRect, clip, noAlpha);
431 } else {
432 Blend_RGB32_on_RGB32_ConstAlpha constAlpha(const_alpha);
433 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl, srch,
434 targetRect, sourceRect, clip, constAlpha);
435 }
436}
437
438void qt_scale_image_argb32_on_argb32(uchar *destPixels, int dbpl,
439 const uchar *srcPixels, int sbpl, int srch,
440 const QRectF &targetRect,
441 const QRectF &sourceRect,
442 const QRect &clip,
443 int const_alpha)
444{
445#ifdef QT_DEBUG_DRAW
446 printf("qt_scale_argb32_on_argb32: dst=(%p, %d), src=(%p, %d), target=(%d, %d), [%d x %d], src=(%d, %d) [%d x %d] alpha=%d\n",
447 destPixels, dbpl, srcPixels, sbpl,
448 targetRect.x(), targetRect.y(), targetRect.width(), targetRect.height(),
449 sourceRect.x(), sourceRect.y(), sourceRect.width(), sourceRect.height(),
450 const_alpha);
451#endif
452 if (const_alpha == 256) {
454 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl, srch,
455 targetRect, sourceRect, clip, sourceAlpha);
456 } else {
457 Blend_ARGB32_on_ARGB32_SourceAndConstAlpha constAlpha(const_alpha);
458 qt_scale_image_32bit(destPixels, dbpl, srcPixels, sbpl, srch,
459 targetRect, sourceRect, clip, constAlpha);
460 }
461}
462
463void qt_transform_image_rgb16_on_rgb16(uchar *destPixels, int dbpl,
464 const uchar *srcPixels, int sbpl,
465 const QRectF &targetRect,
466 const QRectF &sourceRect,
467 const QRect &clip,
468 const QTransform &targetRectTransform,
469 int const_alpha)
470{
471 if (const_alpha == 256) {
473 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
474 reinterpret_cast<const quint16 *>(srcPixels), sbpl,
475 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
476 } else {
477 Blend_RGB16_on_RGB16_ConstAlpha constAlpha(const_alpha);
478 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
479 reinterpret_cast<const quint16 *>(srcPixels), sbpl,
480 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
481 }
482}
483
484void qt_transform_image_argb32_on_rgb16(uchar *destPixels, int dbpl,
485 const uchar *srcPixels, int sbpl,
486 const QRectF &targetRect,
487 const QRectF &sourceRect,
488 const QRect &clip,
489 const QTransform &targetRectTransform,
490 int const_alpha)
491{
492 if (const_alpha == 256) {
494 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
495 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
496 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
497 } else {
498 Blend_ARGB32_on_RGB16_SourceAndConstAlpha constAlpha(const_alpha);
499 qt_transform_image(reinterpret_cast<quint16 *>(destPixels), dbpl,
500 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
501 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
502 }
503}
504
505
506void qt_transform_image_rgb32_on_rgb32(uchar *destPixels, int dbpl,
507 const uchar *srcPixels, int sbpl,
508 const QRectF &targetRect,
509 const QRectF &sourceRect,
510 const QRect &clip,
511 const QTransform &targetRectTransform,
512 int const_alpha)
513{
514 if (const_alpha == 256) {
516 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
517 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
518 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
519 } else {
520 Blend_RGB32_on_RGB32_ConstAlpha constAlpha(const_alpha);
521 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
522 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
523 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
524 }
525}
526
528 const uchar *srcPixels, int sbpl,
529 const QRectF &targetRect,
530 const QRectF &sourceRect,
531 const QRect &clip,
532 const QTransform &targetRectTransform,
533 int const_alpha)
534{
535 if (const_alpha == 256) {
537 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
538 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
539 targetRect, sourceRect, clip, targetRectTransform, sourceAlpha);
540 } else {
541 Blend_ARGB32_on_ARGB32_SourceAndConstAlpha constAlpha(const_alpha);
542 qt_transform_image(reinterpret_cast<quint32 *>(destPixels), dbpl,
543 reinterpret_cast<const quint32 *>(srcPixels), sbpl,
544 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
545 }
546}
547
551
553{
560#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
565#endif
566
574#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
579#endif
580
587#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
592#endif
593}
594
@ Format_RGB32
Definition qimage.h:46
@ Format_RGBA8888_Premultiplied
Definition qimage.h:60
@ NImageFormats
Definition qimage.h:80
@ Format_ARGB32_Premultiplied
Definition qimage.h:48
@ Format_RGB16
Definition qimage.h:49
@ Format_RGBX8888
Definition qimage.h:58
\inmodule QtCore\reentrant
Definition qrect.h:484
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
Definition qrect.h:672
constexpr qreal height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:732
constexpr qreal width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:729
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
Definition qrect.h:669
\inmodule QtCore\reentrant
Definition qrect.h:30
The QTransform class specifies 2D transformations of a coordinate system.
Definition qtransform.h:20
Combined button and popup list for selecting options.
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)
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)
SrcOverTransformFunc qTransformFunctions[QImage::NImageFormats][QImage::NImageFormats]
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)
SrcOverBlendFunc qBlendFunctions[QImage::NImageFormats][QImage::NImageFormats]
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)
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)
SrcOverScaleFunc qScaleFunctions[QImage::NImageFormats][QImage::NImageFormats]
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)
ushort qConvertRgb32To16(uint c)
static void blend_pixel(quint32 &dst, const quint32 src)
static uint INTERPOLATE_PIXEL_255(uint x, uint a, uint y, uint b)
static uint BYTE_MUL(uint x, uint a)
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)
static uint BYTE_MUL_RGB16(uint x, uint a)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLenum GLsizei length
GLenum src
GLenum GLenum dst
GLint y
GLfloat GLfloat GLfloat GLfloat h
GLdouble s
[6]
Definition qopenglext.h:235
GLdouble GLdouble t
Definition qopenglext.h:243
GLenum GLsizei len
GLfloat GLfloat GLfloat alpha
Definition qopenglext.h:418
constexpr int qAlpha(QRgb rgb)
Definition qrgb.h:27
unsigned int quint32
Definition qtypes.h:50
unsigned char uchar
Definition qtypes.h:32
unsigned short quint16
Definition qtypes.h:48
unsigned int uint
Definition qtypes.h:34
unsigned char quint8
Definition qtypes.h:46
QMimeDatabase db
[0]
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