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
qimageeffects.cpp File Reference

(48124977865b76212ef719b19ff37d6bd82ad82d)

#include "qmath.h"
#include "qdrawhelper_p.h"
#include "qmemrotate_p.h"
#include "qpainter.h"
#include <memory>
+ Include dependency graph for qimageeffects.cpp:

Go to the source code of this file.

Namespaces

namespace  QT_BEGIN_NAMESPACE
 Combined button and popup list for selecting options.
 

Macros

#define Z_MASK   (0xff << zprec)
 
#define ZA_MASK   (0xff << (zprec + aprec))
 
#define AVG(a, b)   ( ((((a)^(b)) & 0xfefefefeUL) >> 1) + ((a)&(b)) )
 
#define AVG16(a, b)   ( ((((a)^(b)) & 0xf7deUL) >> 1) + ((a)&(b)) )
 

Functions

template<int shift>
int QT_BEGIN_NAMESPACE::qt_static_shift (int value)
 
template<int aprec, int zprec>
void QT_BEGIN_NAMESPACE::qt_blurinner (uchar *bptr, int &zR, int &zG, int &zB, int &zA, int alpha)
 
template<int aprec, int zprec>
void QT_BEGIN_NAMESPACE::qt_blurinner_alphaOnly (uchar *bptr, int &z, int alpha)
 
template<int aprec, int zprec, bool alphaOnly>
void QT_BEGIN_NAMESPACE::qt_blurrow (QImage &im, int line, int alpha)
 
template<int aprec, int zprec, bool alphaOnly>
void QT_BEGIN_NAMESPACE::expblur (QImage &img, qreal radius, bool improvedQuality=false, int transposed=0)
 
QImage qt_halfScaled (const QImage &source)
 
Q_GUI_EXPORT void qt_blurImage (QPainter *p, QImage &blurImage, qreal radius, bool quality, bool alphaOnly, int transposed=0)
 
Q_GUI_EXPORT void qt_blurImage (QImage &blurImage, qreal radius, bool quality, int transposed=0)
 

Variables

const int QT_BEGIN_NAMESPACE::alphaIndex = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3)
 

Macro Definition Documentation

◆ AVG

#define AVG ( a,
b )   ( ((((a)^(b)) & 0xfefefefeUL) >> 1) + ((a)&(b)) )

Definition at line 195 of file qimageeffects.cpp.

Referenced by qt_halfScaled().

◆ AVG16

#define AVG16 ( a,
b )   ( ((((a)^(b)) & 0xf7deUL) >> 1) + ((a)&(b)) )

Definition at line 196 of file qimageeffects.cpp.

Referenced by qt_halfScaled().

◆ Z_MASK

#define Z_MASK   (0xff << zprec)

◆ ZA_MASK

#define ZA_MASK   (0xff << (zprec + aprec))

Function Documentation

◆ qt_blurImage() [1/2]

Q_GUI_EXPORT void qt_blurImage ( QImage & blurImage,
qreal radius,
bool quality,
int transposed = 0 )

Definition at line 319 of file qimageeffects.cpp.

References QImage::Format_Grayscale8, and QImage::Format_Indexed8.

◆ qt_blurImage() [2/2]

Q_GUI_EXPORT void qt_blurImage ( QPainter * p,
QImage & blurImage,
qreal radius,
bool quality,
bool alphaOnly,
int transposed = 0 )

Definition at line 292 of file qimageeffects.cpp.

References QImage::Format_ARGB32_Premultiplied, QImage::Format_RGB32, qt_halfScaled(), and QPainter::SmoothPixmapTransform.

Referenced by QPixmapDropShadowFilter::draw(), and QPixmapBlurFilter::draw().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_halfScaled()

QImage qt_halfScaled ( const QImage & source)

Definition at line 198 of file qimageeffects.cpp.

References AVG, AVG16, QImage::bits(), QImage::bytesPerLine(), QImage::convertToFormat(), QImage::Format_ARGB32_Premultiplied, QImage::Format_ARGB8565_Premultiplied, QImage::Format_Grayscale8, QImage::Format_Indexed8, QImage::Format_RGB32, QImage::height(), p1, p2, QImage::setDevicePixelRatio(), and QImage::width().

Referenced by qt_blurImage().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: