94 const uchar *srcPixels,
int sbpl,
int srch,
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(),
107 if (const_alpha == 256) {
109 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl, srch,
110 targetRect, sourceRect, clip, noAlpha);
113 qt_scale_image_16bit<quint16>(destPixels, dbpl, srcPixels, sbpl, srch,
114 targetRect, sourceRect, clip, constAlpha);
119 const uchar *srcPixels,
int sbpl,
int srch,
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(),
132 if (const_alpha == 256) {
134 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl, srch,
135 targetRect, sourceRect, clip, noAlpha);
138 qt_scale_image_16bit<quint32>(destPixels, dbpl, srcPixels, sbpl, srch,
139 targetRect, sourceRect, clip, constAlpha);
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);
153 if (const_alpha == 256) {
160 }
else if (const_alpha != 0) {
163 quint8 a = (255 * const_alpha) >> 8;
166 for (
int x=0;
x<
w; ++
x) {
177 const uchar *srcPixels,
int sbpl,
184 const_alpha = (const_alpha * 255) >> 8;
185 for (
int y=0;
y<
h; ++
y) {
186 for (
int i = 0;
i <
w; ++
i) {
200 const uchar *srcPixels,
int sbpl,
204 if (const_alpha != 256) {
212 for (
int y=0;
y<
h; ++
y) {
213 for (
int x=0;
x<
w; ++
x) {
220 }
else if (
alpha != 0) {
225 quint32 sr = (spix >> 8) & 0xf800;
226 quint32 sg = (spix >> 5) & 0x07e0;
227 quint32 sb = (spix >> 3) & 0x001f;
229 quint32 dr = (dpix & 0x0000f800);
230 quint32 dg = (dpix & 0x000007e0);
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);
241 dst[
x] = (rr & 0xf800)
253 const uchar *srcPixels,
int sbpl,
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);
262 if (const_alpha != 256) {
268 int srcExtraStride = (sbpl >> 2) -
w;
270 int dstJPL = dbpl / 2;
275 int dstExtraStride = dstJPL -
w;
277 while (
dst < dstEnd) {
279 while (
src < srcEnd) {
284 dst += dstExtraStride;
285 src += srcExtraStride;
296 const uchar *srcPixels,
int sbpl,
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);
308 if (const_alpha == 256) {
309 for (
int y=0;
y<
h; ++
y) {
310 for (
int x=0;
x<
w; ++
x) {
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) {
335 const uchar *srcPixels,
int sbpl,
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);
346 if (const_alpha == 256) {
347 const int len =
w * 4;
348 for (
int y = 0;
y <
h; ++
y) {
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)
414 const uchar *srcPixels,
int sbpl,
int srch,
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(),
427 if (const_alpha == 256) {
430 targetRect, sourceRect, clip, noAlpha);
434 targetRect, sourceRect, clip, constAlpha);
439 const uchar *srcPixels,
int sbpl,
int srch,
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(),
452 if (const_alpha == 256) {
455 targetRect, sourceRect, clip, sourceAlpha);
459 targetRect, sourceRect, clip, constAlpha);
464 const uchar *srcPixels,
int sbpl,
471 if (const_alpha == 256) {
474 reinterpret_cast<const quint16 *
>(srcPixels), sbpl,
475 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
479 reinterpret_cast<const quint16 *
>(srcPixels), sbpl,
480 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
485 const uchar *srcPixels,
int sbpl,
492 if (const_alpha == 256) {
495 reinterpret_cast<const quint32 *
>(srcPixels), sbpl,
496 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
500 reinterpret_cast<const quint32 *
>(srcPixels), sbpl,
501 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
507 const uchar *srcPixels,
int sbpl,
514 if (const_alpha == 256) {
517 reinterpret_cast<const quint32 *
>(srcPixels), sbpl,
518 targetRect, sourceRect, clip, targetRectTransform, noAlpha);
522 reinterpret_cast<const quint32 *
>(srcPixels), sbpl,
523 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
528 const uchar *srcPixels,
int sbpl,
535 if (const_alpha == 256) {
538 reinterpret_cast<const quint32 *
>(srcPixels), sbpl,
539 targetRect, sourceRect, clip, targetRectTransform, sourceAlpha);
543 reinterpret_cast<const quint32 *
>(srcPixels), sbpl,
544 targetRect, sourceRect, clip, targetRectTransform, constAlpha);
560#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
574#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
587#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
@ Format_RGBA8888_Premultiplied
@ Format_ARGB32_Premultiplied
\inmodule QtCore\reentrant
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.
\inmodule QtCore\reentrant
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
GLfloat GLfloat GLfloat GLfloat h
GLfloat GLfloat GLfloat alpha
constexpr int qAlpha(QRgb rgb)
void write(quint32 *dst, quint32 src)
Blend_ARGB32_on_ARGB32_SourceAndConstAlpha(quint32 alpha)
void write(quint32 *dst, quint32 src)
void write(quint16 *dst, quint32 src)
Blend_ARGB32_on_RGB16_SourceAndConstAlpha(quint32 alpha)
void write(quint16 *dst, quint32 src)
void write(quint16 *dst, quint16 src)
Blend_RGB16_on_RGB16_ConstAlpha(quint32 alpha)
void write(quint16 *dst, quint16 src)
Blend_RGB32_on_RGB32_ConstAlpha(quint32 alpha)
void write(quint32 *dst, quint32 src)
void write(quint32 *dst, quint32 src)
quint16 bytemul(quint16 x) const
uchar alpha(uchar src) const
SourceAndConstAlpha(int a)
quint16 bytemul(quint16 spix) const
uchar alpha(uchar src) const