#include <qpixmapdata_vg_p.h>
|
QImage * | buffer () |
|
void | copy (const QPixmapData *data, const QRect &rect) |
|
QPixmapData * | createCompatiblePixmapData () const |
|
virtual void | detachImageFromPool () |
|
virtual void | ensureReadback (bool readOnly) const |
|
void | fill (const QColor &color) |
|
bool | fromData (const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags) |
|
bool | fromFile (const QString &filename, const char *format, Qt::ImageConversionFlags flags) |
|
void | fromImage (const QImage &image, Qt::ImageConversionFlags flags) |
|
void | fromImageReader (QImageReader *imageReader, Qt::ImageConversionFlags flags) |
|
bool | hasAlphaChannel () const |
|
virtual void | hibernate () |
|
bool | isValid () const |
|
QPaintEngine * | paintEngine () const |
|
| QVGPixmapData (PixelType type) |
|
virtual void | reclaimImages () |
|
void | resize (int width, int height) |
|
void | setAlphaChannel (const QPixmap &alphaChannel) |
|
QSize | size () const |
|
QImage | toImage () const |
|
virtual VGImage | toVGImage () |
|
virtual VGImage | toVGImage (qreal opacity) |
|
| ~QVGPixmapData () |
|
virtual QPixmap | alphaChannel () const |
|
qint64 | cacheKey () const |
|
ClassId | classId () const |
|
int | colorCount () const |
|
int | depth () const |
|
int | height () const |
|
bool | isNull () const |
|
virtual QBitmap | mask () const |
|
QT_DEPRECATED int | numColors () const |
|
PixelType | pixelType () const |
|
| QPixmapData (PixelType pixelType, int classId) |
|
virtual QPixmapData * | runtimeData () const |
|
virtual bool | scroll (int dx, int dy, const QRect &rect) |
|
int | serialNumber () const |
|
virtual void | setMask (const QBitmap &mask) |
|
virtual QImage | toImage (const QRect &rect) const |
|
virtual QPixmap | transformed (const QTransform &matrix, Qt::TransformationMode mode) const |
|
int | width () const |
|
virtual | ~QPixmapData () |
|
|
enum | ClassId {
RasterClass,
X11Class,
MacClass,
DirectFBClass,
OpenGLClass,
OpenVGClass,
RuntimeClass,
BlitterClass,
CustomClass = 1024
} |
|
enum | PixelType { PixmapType,
BitmapType
} |
|
static QPixmapData * | create (int w, int h, PixelType type) |
|
Definition at line 81 of file qpixmapdata_vg_p.h.
◆ QVGPixmapData()
QVGPixmapData::QVGPixmapData |
( |
PixelType |
type | ) |
|
Definition at line 60 of file qpixmapdata_vg.cpp.
Referenced by createCompatiblePixmapData().
70 #if defined(Q_OS_SYMBIAN) 71 nativeImageHandleProvider = 0;
72 nativeImageHandle = 0;
74 #if !defined(QT_NO_EGL)
QPixmapData(PixelType pixelType, int classId)
friend void qt_vg_register_pixmap(QVGPixmapData *pd)
◆ ~QVGPixmapData()
QVGPixmapData::~QVGPixmapData |
( |
| ) |
|
Definition at line 81 of file qpixmapdata_vg.cpp.
84 #if !defined(QT_NO_EGL) void destroyImageAndContext()
friend void qt_vg_unregister_pixmap(QVGPixmapData *pd)
◆ buffer()
QImage * QVGPixmapData::buffer |
( |
| ) |
|
|
virtual |
◆ copy()
Reimplemented from QPixmapData.
Definition at line 305 of file qpixmapdata_vg.cpp.
bool isNull() const
Returns true if the rectangle is a null rectangle, otherwise returns false.
int width() const
Returns the width of the rectangle.
int height() const
Returns the height of the rectangle.
virtual QImage toImage() const =0
static const char * data(const QByteArray &arr)
QImage::Format format() const
bool contains(const QPoint &p, bool proper=false) const
Returns true if the given point is inside or on the edge of the rectangle, otherwise returns false...
void fromImage(const QImage &image, Qt::ImageConversionFlags flags)
The QRect class defines a rectangle in the plane using integer precision.
void resize(int width, int height)
void copyFrom(QVolatileImage *source, const QRect &rect)
◆ createCompatiblePixmapData()
QPixmapData * QVGPixmapData::createCompatiblePixmapData |
( |
| ) |
const |
|
virtual |
◆ createPixmapForImage()
void QVGPixmapData::createPixmapForImage |
( |
QImage & |
image, |
|
|
Qt::ImageConversionFlags |
flags, |
|
|
bool |
inPlace |
|
) |
| |
|
protected |
Definition at line 237 of file qpixmapdata_vg.cpp.
Referenced by fromData(), fromFile(), fromImage(), and fromImageReader().
251 if (convertedImage.
isNull())
252 qWarning(
"QVGPixmapData: Failed to convert image data (out of memory? try increasing heap size)");
Format
The following image formats are available in Qt.
bool isNull() const
Returns true if it is a null image, otherwise returns false.
QImage::Format idealFormat(QImage *image, Qt::ImageConversionFlags flags) const
void detach()
If multiple images share common data, this image makes a copy of the data and detaches itself from th...
Q_CORE_EXPORT void qWarning(const char *,...)
The QImage class provides a hardware-independent image representation that allows direct access to th...
int width() const
Returns the width of the image.
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
int height() const
Returns the height of the image.
void resize(int width, int height)
bool convertInPlace(QImage::Format newFormat, Qt::ImageConversionFlags)
◆ destroyImageAndContext()
void QVGPixmapData::destroyImageAndContext |
( |
| ) |
|
|
protected |
Definition at line 112 of file qpixmapdata_vg.cpp.
Referenced by hibernate(), and ~QVGPixmapData().
114 if (
vgImage != VG_INVALID_HANDLE) {
116 #if !defined(QT_NO_EGL) 133 #if defined(Q_OS_SYMBIAN) 134 releaseNativeImageHandle();
137 #if !defined(QT_NO_EGL) Q_OPENVG_EXPORT QEglContext * qt_vg_create_context(QPaintDevice *device, int devType)
Q_OPENVG_EXPORT void qt_vg_destroy_context(QEglContext *context, int devType)
Q_OPENVG_EXPORT EGLSurface qt_vg_shared_surface(void)
bool makeCurrent(EGLSurface surface)
◆ destroyImages()
void QVGPixmapData::destroyImages |
( |
| ) |
|
|
protected |
◆ detachImageFromPool()
void QVGPixmapData::detachImageFromPool |
( |
| ) |
|
|
virtual |
◆ ensureReadback()
void QVGPixmapData::ensureReadback |
( |
bool |
readOnly | ) |
const |
|
virtual |
Definition at line 516 of file qpixmapdata_vg.cpp.
Referenced by forceToImage(), hasAlphaChannel(), and toImage().
532 #if defined(Q_OS_SYMBIAN) 535 nativeImageHandleProvider = 0;
VGImageFormat qt_vg_image_to_vg_format(QImage::Format format)
void beginDataAccess() const
QImage::Format sourceFormat() const
void endDataAccess(bool readOnly=false) const
uchar * bits()
Access to pixel data via bits() or constBits() should be guarded by begin/endDataAccess().
QImage::Format format() const
◆ fill()
void QVGPixmapData::fill |
( |
const QColor & |
color | ) |
|
|
virtual |
Implements QPixmapData.
Definition at line 258 of file qpixmapdata_vg.cpp.
void forceToImage(bool allowReadback=true)
Q_DECL_CONSTEXPR T qAbs(const T &t)
void fill(uint pixelValue)
Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x)
Q_GUI_EXPORT_INLINE int qGray(int r, int g, int b)
QRgb rgba() const
Returns the RGB value of the color, including its alpha.
QImage & imageRef()
Returns a reference to the image that is potentially using some native buffer internally.
QRgb color(int i) const
Returns the color in the color table at index i.
◆ forceToImage()
void QVGPixmapData::forceToImage |
( |
bool |
allowReadback = true | ) |
|
|
protected |
◆ fromData()
bool QVGPixmapData::fromData |
( |
const uchar * |
buffer, |
|
|
uint |
len, |
|
|
const char * |
format, |
|
|
Qt::ImageConversionFlags |
flags |
|
) |
| |
|
virtual |
Reimplemented from QPixmapData.
Definition at line 209 of file qpixmapdata_vg.cpp.
void createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace)
bool isNull() const
Returns true if it is a null image, otherwise returns false.
The QByteArray class provides an array of bytes.
long ASN1_INTEGER_get ASN1_INTEGER * a
The QBuffer class provides a QIODevice interface for a QByteArray.
static QByteArray fromRawData(const char *, int size)
Constructs a QByteArray that uses the first size bytes of the data array.
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QImageReader class provides a format independent interface for reading images from files or other...
QImage read()
Reads an image from the device.
◆ fromFile()
bool QVGPixmapData::fromFile |
( |
const QString & |
filename, |
|
|
const char * |
format, |
|
|
Qt::ImageConversionFlags |
flags |
|
) |
| |
|
virtual |
Reimplemented from QPixmapData.
Definition at line 197 of file qpixmapdata_vg.cpp.
void createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace)
bool isNull() const
Returns true if it is a null image, otherwise returns false.
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QImageReader class provides a format independent interface for reading images from files or other...
QImage read()
Reads an image from the device.
◆ fromImage()
void QVGPixmapData::fromImage |
( |
const QImage & |
image, |
|
|
Qt::ImageConversionFlags |
flags |
|
) |
| |
|
virtual |
Implements QPixmapData.
Definition at line 178 of file qpixmapdata_vg.cpp.
Referenced by copy().
void createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace)
bool isNull() const
Returns true if it is a null image, otherwise returns false.
The QImage class provides a hardware-independent image representation that allows direct access to th...
◆ fromImageReader()
void QVGPixmapData::fromImageReader |
( |
QImageReader * |
imageReader, |
|
|
Qt::ImageConversionFlags |
flags |
|
) |
| |
|
virtual |
Reimplemented from QPixmapData.
Definition at line 187 of file qpixmapdata_vg.cpp.
void createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace)
bool isNull() const
Returns true if it is a null image, otherwise returns false.
The QImage class provides a hardware-independent image representation that allows direct access to th...
QImage read()
Reads an image from the device.
◆ hasAlphaChannel()
bool QVGPixmapData::hasAlphaChannel |
( |
| ) |
const |
|
virtual |
◆ hibernate()
void QVGPixmapData::hibernate |
( |
| ) |
|
|
virtual |
◆ idealFormat()
Definition at line 224 of file qpixmapdata_vg.cpp.
Referenced by createPixmapForImage().
228 if (d == 1 || d == 16 || d == 24 || (d == 32 && !image->
hasAlphaChannel()))
Format
The following image formats are available in Qt.
QImage::Format sourceFormat() const
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false...
The QImage class provides a hardware-independent image representation that allows direct access to th...
int depth() const
Returns the depth of the image.
bool checkForAlphaPixels() const
◆ isValid()
bool QVGPixmapData::isValid |
( |
| ) |
const |
◆ metric()
Implements QPixmapData.
Definition at line 473 of file qpixmapdata_vg.cpp.
495 qWarning(
"QVGPixmapData::metric(): Invalid metric");
Q_GUI_EXPORT int qt_defaultDpiY()
Q_GUI_EXPORT int qt_defaultDpiX()
Q_CORE_EXPORT void qWarning(const char *,...)
int metric(QPaintDevice::PaintDeviceMetric metric) const
Q_DECL_CONSTEXPR int qRound(qreal d)
◆ paintEngine()
Implements QPixmapData.
Definition at line 335 of file qpixmapdata_vg.cpp.
void forceToImage(bool allowReadback=true)
QPaintEngine * paintEngine()
To be called from the PixmapData's paintEngine().
◆ reclaimImages()
void QVGPixmapData::reclaimImages |
( |
| ) |
|
|
virtual |
◆ resize()
void QVGPixmapData::resize |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
virtual |
◆ setAlphaChannel()
void QVGPixmapData::setAlphaChannel |
( |
const QPixmap & |
alphaChannel | ) |
|
|
virtual |
Reimplemented from QPixmapData.
Definition at line 285 of file qpixmapdata_vg.cpp.
void forceToImage(bool allowReadback=true)
void setAlphaChannel(const QPixmap &alphaChannel)
◆ size()
QSize QVGPixmapData::size |
( |
| ) |
const |
|
inline |
◆ sourceFormat()
◆ toImage()
QImage QVGPixmapData::toImage |
( |
| ) |
const |
|
virtual |
Implements QPixmapData.
Definition at line 293 of file qpixmapdata_vg.cpp.
QImage toImage() const
This will always perform a copy of the pixel data.
virtual void ensureReadback(bool readOnly) const
QImage::Format sourceFormat() const
The QImage class provides a hardware-independent image representation that allows direct access to th...
◆ toVGImage() [1/2]
VGImage QVGPixmapData::toVGImage |
( |
| ) |
|
|
virtual |
Definition at line 344 of file qpixmapdata_vg.cpp.
Referenced by QVGPixmapConvolutionFilter::draw(), QVGPixmapColorizeFilter::draw(), QVGPixmapDropShadowFilter::draw(), QVGPixmapBlurFilter::draw(), QVGCompositionHelper::drawCursorPixmap(), QVGPaintEngine::drawPixmap(), QVGPaintEngine::drawPixmapFragments(), qPixmapToVGImage(), QVGPaintEnginePrivate::setBrush(), and toVGImage().
347 return VG_INVALID_HANDLE;
349 #if !defined(QT_NO_EGL) 360 #if defined(Q_OS_SYMBIAN) 361 if (
recreate && nativeImageHandleProvider && !nativeImageHandle) {
362 createFromNativeImageHandleProvider();
366 if (
vgImage == VG_INVALID_HANDLE) {
371 if (
vgImage == VG_INVALID_HANDLE) {
372 return VG_INVALID_HANDLE;
virtual void useImage(QVGPixmapData *data)
VGImageFormat qt_vg_image_to_vg_format(QImage::Format format)
void beginDataAccess() const
Q_OPENVG_EXPORT QEglContext * qt_vg_create_context(QPaintDevice *device, int devType)
void endDataAccess(bool readOnly=false) const
virtual VGImage createImageForPixmap(VGImageFormat format, VGint width, VGint height, VGbitfield allowedQuality, QVGPixmapData *data)
QImage::Format format() const
static QVGImagePool * instance()
bool paintingActive() const
The QSize class defines the size of a two-dimensional object using integer point precision.
const uchar * constBits() const
◆ toVGImage() [2/2]
VGImage QVGPixmapData::toVGImage |
( |
qreal |
opacity | ) |
|
|
virtual |
Definition at line 395 of file qpixmapdata_vg.cpp.
397 #if !defined(QT_SHIVAVG) 400 return VG_INVALID_HANDLE;
410 (VG_sARGB_8888_PRE,
w,
h, VG_IMAGE_QUALITY_FASTER,
this);
413 (VG_sARGB_8888_PRE,
w,
h, VG_IMAGE_QUALITY_FASTER);
418 return VG_INVALID_HANDLE;
420 VGfloat matrix[20] = {
421 1.0f, 0.0f, 0.0f, 0.0f,
422 0.0f, 1.0f, 0.0f, 0.0f,
423 0.0f, 0.0f, 1.0f, 0.0f,
424 0.0f, 0.0f, 0.0f, opacity,
425 0.0f, 0.0f, 0.0f, 0.0f
virtual VGImage createImageForPixmap(VGImageFormat format, VGint width, VGint height, VGbitfield allowedQuality, QVGPixmapData *data)
virtual VGImage toVGImage()
static QVGImagePool * instance()
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
◆ updateSerial()
void QVGPixmapData::updateSerial |
( |
| ) |
|
|
protected |
◆ qt_vg_hibernate_pixmaps
Definition at line 333 of file qwindowsurface_vgegl.cpp.
338 ++(shared->refCount);
354 shared->context->lazyDoneCurrent();
357 if (--(shared->refCount) <= 0)
EGLSurface qt_vg_shared_surface(void)
static void qt_vg_destroy_shared_context(QVGSharedContext *shared)
static QVGImagePool * instance()
◆ qt_vg_register_pixmap
◆ qt_vg_unregister_pixmap
◆ QVGImagePool
◆ QVGPaintEngine
◆ cachedOpacity
qreal QVGPixmapData::cachedOpacity |
|
protected |
◆ context
◆ inImagePool
bool QVGPixmapData::inImagePool |
|
protected |
◆ inLRU
bool QVGPixmapData::inLRU |
|
private |
◆ next
◆ nextLRU
◆ prev
◆ prevLRU
◆ prevSize
QSize QVGPixmapData::prevSize |
|
protected |
◆ recreate
bool QVGPixmapData::recreate |
|
mutableprotected |
◆ source
Definition at line 178 of file qpixmapdata_vg_p.h.
Referenced by copy(), createPixmapForImage(), QVGPaintEngine::drawPixmap(), ensureReadback(), fill(), forceToImage(), hasAlphaChannel(), hibernate(), paintEngine(), resize(), setAlphaChannel(), toImage(), and toVGImage().
◆ vgImage
VGImage QVGPixmapData::vgImage |
|
protected |
◆ vgImageOpacity
VGImage QVGPixmapData::vgImageOpacity |
|
protected |
The documentation for this class was generated from the following files: