![]() |
Qt 6.x
The Qt SDK
|
#include <qglobal.h>
#include <QDebug>
#include "qpainter.h"
#include "qpixmap.h"
#include "qpixmapfilter_p.h"
#include "qvarlengtharray.h"
#include "private/qguiapplication_p.h"
#include "private/qpaintengineex_p.h"
#include "private/qpaintengine_raster_p.h"
#include "qmath.h"
#include "private/qmath_p.h"
#include "private/qmemrotate_p.h"
#include "private/qdrawhelper_p.h"
#include <memory>
#include "moc_qpixmapfilter_p.cpp"
Go to the source code of this file.
Classes | |
class | QPixmapFilterPrivate |
class | QPixmapConvolutionFilterPrivate |
class | QPixmapBlurFilterPrivate |
class | QPixmapColorizeFilterPrivate |
class | QPixmapDropShadowFilterPrivate |
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 | |
static void | convolute (QImage *destImage, const QPointF &pos, const QImage &srcImage, const QRectF &srcRect, QPainter::CompositionMode mode, qreal *kernel, int kernelWidth, int kernelHeight) |
template<int shift> | |
int | qt_static_shift (int value) |
template<int aprec, int zprec> | |
void | qt_blurinner (uchar *bptr, int &zR, int &zG, int &zB, int &zA, int alpha) |
template<int aprec, int zprec> | |
void | qt_blurinner_alphaOnly (uchar *bptr, int &z, int alpha) |
template<int aprec, int zprec, bool alphaOnly> | |
void | qt_blurrow (QImage &im, int line, int alpha) |
template<int aprec, int zprec, bool alphaOnly> | |
void | expblur (QImage &img, qreal radius, bool improvedQuality=false, int transposed=0) |
Q_WIDGETS_EXPORT QImage | qt_halfScaled (const QImage &source) |
Q_WIDGETS_EXPORT void | qt_blurImage (QPainter *p, QImage &blurImage, qreal radius, bool quality, bool alphaOnly, int transposed=0) |
Q_WIDGETS_EXPORT void | qt_blurImage (QImage &blurImage, qreal radius, bool quality, int transposed=0) |
Q_GUI_EXPORT bool | qt_scaleForTransform (const QTransform &transform, qreal *scale) |
static void | grayscale (const QImage &image, QImage &dest, const QRect &rect=QRect()) |
Variables | |
const qreal | radiusScale = qreal(2.5) |
const int | alphaIndex = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3) |
Definition at line 735 of file qpixmapfilter.cpp.
Definition at line 736 of file qpixmapfilter.cpp.
#define Z_MASK (0xff << zprec) |
#define ZA_MASK (0xff << (zprec + aprec)) |
|
static |
Definition at line 275 of file qpixmapfilter.cpp.
References QRectF::adjusted(), QRect::bottom(), QImage::bytesPerLine(), cb, QPainter::CompositionMode_Source, QImage::convertToFormat(), QImage::format(), QImage::Format_ARGB32_Premultiplied, QImage::height(), i, QRectF::isNull(), kernel, QRect::left(), QRectF::moveTo(), output, pix, pos, qBound(), QImage::rect(), rect, QRect::right(), QImage::scanLine(), QRectF::toAlignedRect(), QRect::top(), QRect::topLeft(), QImage::width(), QPoint::x(), and QPoint::y().
Referenced by QPixmapConvolutionFilter::draw().
void expblur | ( | QImage & | img, |
qreal | radius, | ||
bool | improvedQuality = false , |
||
int | transposed = 0 |
||
) |
Definition at line 660 of file qpixmapfilter.cpp.
References QImage::bits(), QImage::bytesPerLine(), e, QImage::Format_ARGB32_Premultiplied, QImage::Format_Grayscale8, QImage::Format_Indexed8, QImage::Format_RGB32, QImage::height(), i, Q_ASSERT, qPow(), qRound(), QImage::setDevicePixelRatio(), and QImage::width().
Definition at line 910 of file qpixmapfilter.cpp.
References QImage::bits(), QRect::bottom(), QImage::height(), i, QRect::left(), QRect::moveTo(), qAlpha(), qGray(), qRgba(), QImage::rect(), rect, QRect::right(), QImage::scanLine(), QImage::size(), QRect::top(), and QImage::width().
Referenced by QPixmapColorizeFilter::draw().
Q_WIDGETS_EXPORT void qt_blurImage | ( | QImage & | blurImage, |
qreal | radius, | ||
bool | quality, | ||
int | transposed = 0 |
||
) |
Definition at line 856 of file qpixmapfilter.cpp.
References QImage::format(), QImage::Format_Grayscale8, and QImage::Format_Indexed8.
Q_WIDGETS_EXPORT void qt_blurImage | ( | QPainter * | p, |
QImage & | blurImage, | ||
qreal | radius, | ||
bool | quality, | ||
bool | alphaOnly, | ||
int | transposed = 0 |
||
) |
Definition at line 829 of file qpixmapfilter.cpp.
References QImage::convertToFormat(), QImage::deviceIndependentSize(), QImage::format(), QImage::Format_ARGB32_Premultiplied, QImage::Format_RGB32, QImage::height(), qt_halfScaled(), QPainter::SmoothPixmapTransform, QSizeF::toSize(), and QImage::width().
Referenced by QPixmapDropShadowFilter::draw(), and QPixmapBlurFilter::draw().
|
inline |
Definition at line 570 of file qpixmapfilter.cpp.
References QRgb, qt_static_shift(), Z_MASK, and ZA_MASK.
|
inline |
Definition at line 603 of file qpixmapfilter.cpp.
|
inline |
Definition at line 612 of file qpixmapfilter.cpp.
References alphaIndex, QImage::depth(), QImage::format(), QImage::Format_Indexed8, line, QImage::scanLine(), and QImage::width().
Definition at line 738 of file qpixmapfilter.cpp.
References AVG, AVG16, QImage::bits(), QImage::bytesPerLine(), QImage::convertToFormat(), QImage::format(), 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().
Q_GUI_EXPORT bool qt_scaleForTransform | ( | const QTransform & | transform, |
qreal * | scale | ||
) |
Definition at line 2301 of file qtransform.cpp.
Referenced by cubicTo_clipped().
|
inline |
Definition at line 559 of file qpixmapfilter.cpp.
References shift().
Referenced by qt_blurinner().
const int alphaIndex = (QSysInfo::ByteOrder == QSysInfo::BigEndian ? 0 : 3) |
Definition at line 600 of file qpixmapfilter.cpp.
Referenced by qt_blurrow().
Definition at line 546 of file qpixmapfilter.cpp.
Referenced by QPixmapBlurFilter::boundingRectFor(), QPixmapBlurFilter::draw(), QPhysXCharacterController::init(), and QPhysXCharacterController::sync().