Qt 4.8
Public Types | Public Functions | Static Public Functions | Protected Functions | Protected Variables | Properties | Friends | List of all members
QPixmapData Class Referenceabstract

#include <qpixmapdata_p.h>

Inheritance diagram for QPixmapData:
QBlittablePixmapData QDirectFBPixmapData QGLPixmapData QMacPixmapData QRasterPixmapData QRuntimePixmapData QVGPixmapData QX11PixmapData

Public Types

enum  ClassId {
  RasterClass, X11Class, MacClass, DirectFBClass,
  OpenGLClass, OpenVGClass, RuntimeClass, BlitterClass,
  CustomClass = 1024
}
 
enum  PixelType { PixmapType, BitmapType }
 

Public Functions

virtual QPixmap alphaChannel () const
 
virtual QImagebuffer ()
 
qint64 cacheKey () const
 
ClassId classId () const
 
int colorCount () const
 
virtual void copy (const QPixmapData *data, const QRect &rect)
 
virtual QPixmapDatacreateCompatiblePixmapData () const
 
int depth () const
 
virtual void fill (const QColor &color)=0
 
virtual bool fromData (const uchar *buffer, uint len, const char *format, Qt::ImageConversionFlags flags)
 
virtual bool fromFile (const QString &filename, const char *format, Qt::ImageConversionFlags flags)
 
virtual void fromImage (const QImage &image, Qt::ImageConversionFlags flags)=0
 
virtual void fromImageReader (QImageReader *imageReader, Qt::ImageConversionFlags flags)
 
virtual bool hasAlphaChannel () const =0
 
int height () const
 
bool isNull () const
 
virtual QBitmap mask () const
 
virtual int metric (QPaintDevice::PaintDeviceMetric metric) const =0
 
QT_DEPRECATED int numColors () const
 
virtual QPaintEnginepaintEngine () const =0
 
PixelType pixelType () const
 
 QPixmapData (PixelType pixelType, int classId)
 
virtual void resize (int width, int height)=0
 
virtual QPixmapDataruntimeData () const
 
virtual bool scroll (int dx, int dy, const QRect &rect)
 
int serialNumber () const
 
virtual void setAlphaChannel (const QPixmap &alphaChannel)
 
virtual void setMask (const QBitmap &mask)
 
virtual QImage toImage () const =0
 
virtual QImage toImage (const QRect &rect) const
 
virtual QPixmap transformed (const QTransform &matrix, Qt::TransformationMode mode) const
 
int width () const
 
virtual ~QPixmapData ()
 

Static Public Functions

static QPixmapDatacreate (int w, int h, PixelType type)
 

Protected Functions

void setSerialNumber (int serNo)
 

Protected Variables

int d
 
int h
 
bool is_null
 
int w
 

Properties

int detach_no
 
int id
 
uint is_cached
 
QAtomicInt ref
 
int ser_no
 
PixelType type
 

Friends

class QExplicitlySharedDataPointer< QPixmapData >
 
class QGLTextureCache
 
class QImagePixmapCleanupHooks
 
class QPixmap
 
class QSymbianRasterPixmapData
 
class QX11PixmapData
 

Detailed Description

Definition at line 67 of file qpixmapdata_p.h.

Enumerations

◆ ClassId

◆ PixelType

Enumerator
PixmapType 
BitmapType 

Definition at line 70 of file qpixmapdata_p.h.

70  {
71  // WARNING: Do not change the first two
72  // Must match QPixmap::Type
74  };

Constructors and Destructors

◆ QPixmapData()

QPixmapData::QPixmapData ( PixelType  pixelType,
int  classId 
)

Definition at line 68 of file qpixmapdata.cpp.

69  : w(0),
70  h(0),
71  d(0),
72  is_null(true),
73  ref(0),
74  detach_no(0),
75  type(pixelType),
76  id(objectId),
77  ser_no(0),
78  is_cached(false)
79 {
80 }
PixelType pixelType() const
PixelType type
QAtomicInt ref

◆ ~QPixmapData()

QPixmapData::~QPixmapData ( )
virtual

Definition at line 82 of file qpixmapdata.cpp.

83 {
84  // Sometimes the pixmap cleanup hooks will be called from derrived classes, which will
85  // then set is_cached to false. For example, on X11 QtOpenGL needs to delete the GLXPixmap
86  // or EGL Pixmap Surface for a given pixmap _before_ the native X11 pixmap is deleted,
87  // otherwise some drivers will leak the GL surface. In this case, QX11PixmapData will
88  // call the cleanup hooks itself before deleting the native pixmap and set is_cached to
89  // false.
90  if (is_cached) {
92  is_cached = false;
93  }
94 }
static void executePixmapDataDestructionHooks(QPixmapData *)

Functions

◆ alphaChannel()

QPixmap QPixmapData::alphaChannel ( ) const
virtual

Reimplemented in QRuntimePixmapData, QX11PixmapData, and QMacPixmapData.

Definition at line 255 of file qpixmapdata.cpp.

Referenced by QRuntimePixmapData::alphaChannel(), and QPixmap::alphaChannel().

256 {
258 }
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
Definition: qpixmap.cpp:2197
virtual QPixmap alphaChannel() const
virtual QImage toImage() const =0

◆ buffer()

QImage * QPixmapData::buffer ( )
virtual

◆ cacheKey()

qint64 QPixmapData::cacheKey ( ) const
inline

Definition at line 132 of file qpixmapdata_p.h.

Referenced by QPixmap::cacheKey(), QImagePixmapCleanupHooks::executePixmapDataDestructionHooks(), QImagePixmapCleanupHooks::executePixmapDataModificationHooks(), and QGLBlurTextureCache::pixmapDestroyed().

132  {
133  int classKey = id;
134  if (classKey >= 1024)
135  classKey = -(classKey >> 10);
136  return ((((qint64) classKey) << 56)
137  | (((qint64) ser_no) << 32)
138  | ((qint64) detach_no));
139  }
__int64 qint64
Definition: qglobal.h:942

◆ classId()

ClassId QPixmapData::classId ( ) const
inline

Definition at line 122 of file qpixmapdata_p.h.

Referenced by QDirectFBPaintEngine::begin(), QRasterPaintEngine::begin(), QGLContextPrivate::bindTextureFromNativePixmap(), CapabilitiesToStateMask::canBlitterDrawPixmap(), CapabilitiesToStateMask::canBlitterDrawPixmapOpacity(), QPixmap::clut(), QPixmap::colorCount(), QMeeGoRasterPixmapData::copy(), QDirectFBPixmapData::copy(), QVGPixmapData::copy(), QGLPixmapData::copy(), QMeeGoGraphicsSystem::createPixmapData(), QEgl::createSurface(), QPixmap::depth(), QGLContextPrivate::destroyGlSurfaceForPixmap(), QMeeGoLivePixmapData::destroySurfaceForPixmapData(), QPixmap::detach(), QVGPixmapConvolutionFilter::draw(), QVGPixmapColorizeFilter::draw(), QVGPixmapDropShadowFilter::draw(), QVGPixmapBlurFilter::draw(), QVGCompositionHelper::drawCursorPixmap(), QDirectFBPaintEngine::drawPixmap(), QVGPaintEngine::drawPixmap(), QRasterPaintEngine::drawPixmap(), QVGPaintEngine::drawPixmapFragments(), QDirectFBPaintEngine::drawTiledPixmap(), QRasterPaintEngine::drawTiledPixmap(), QGLContextPrivate::eglSurfaceForDevice(), QDirectFBPaintEngine::fillRect(), QGLPaintDevice::getDevice(), QMeeGoLivePixmapData::getSurfaceForBackingPixmap(), QPixmap::handle(), QPixmap::hasAlpha(), QPixmapCacheEntry::QPixmapCacheEntry(), qPixmapToVGImage(), qt_directfb_surface_for_pixmap(), qt_mac_cg_context(), qt_toRasterPixmap(), qt_toX11Pixmap(), QPixmap::qwsBits(), QPixmap::qwsBytesPerLine(), QX11GLWindowSurface::scroll(), QVGPaintEnginePrivate::setBrush(), QPixmap::toWinHBITMAP(), QGLContextPrivate::unbindPixmapFromTexture(), and QMeeGoGraphicsSystem::updateEGLSharedImagePixmap().

122 { return static_cast<ClassId>(id); }

◆ colorCount()

int QPixmapData::colorCount ( ) const
inline

Definition at line 129 of file qpixmapdata_p.h.

virtual int metric(QPaintDevice::PaintDeviceMetric metric) const =0

◆ copy()

void QPixmapData::copy ( const QPixmapData data,
const QRect rect 
)
virtual

◆ create()

QPixmapData * QPixmapData::create ( int  w,
int  h,
PixelType  type 
)
static

Definition at line 55 of file qpixmapdata.cpp.

Referenced by QPixmap::init(), QPixmap::load(), and QPixmap::loadFromData().

56 {
59  if (gs)
60  data = gs->createPixmapData(static_cast<QPixmapData::PixelType>(type));
61  else
62  data = QGraphicsSystem::createDefaultPixmapData(static_cast<QPixmapData::PixelType>(type));
63  data->resize(w, h);
64  return data;
65 }
virtual void resize(int width, int height)=0
static const char * data(const QByteArray &arr)
PixelType type
virtual QPixmapData * createPixmapData(QPixmapData::PixelType type) const =0
static QGraphicsSystem * graphicsSystem()
static QPixmapData * createDefaultPixmapData(QPixmapData::PixelType type)

◆ createCompatiblePixmapData()

QPixmapData * QPixmapData::createCompatiblePixmapData ( ) const
virtual

Reimplemented in QGLPixmapData, QVGPixmapData, QX11PixmapData, QRasterPixmapData, QRuntimePixmapData, QMacPixmapData, QMeeGoLivePixmapData, and QMeeGoPixmapData.

Definition at line 96 of file qpixmapdata.cpp.

Referenced by QPixmap::copy(), QRuntimePixmapData::createCompatiblePixmapData(), and QPixmap::fill().

97 {
98  QPixmapData *d;
100  if (gs)
101  d = gs->createPixmapData(pixelType());
102  else
104  return d;
105 }
PixelType pixelType() const
virtual QPixmapData * createPixmapData(QPixmapData::PixelType type) const =0
static QGraphicsSystem * graphicsSystem()
static QPixmapData * createDefaultPixmapData(QPixmapData::PixelType type)

◆ depth()

int QPixmapData::depth ( ) const
inline

◆ fill()

virtual void QPixmapData::fill ( const QColor color)
pure virtual

◆ fromData()

bool QPixmapData::fromData ( const uchar buffer,
uint  len,
const char *  format,
Qt::ImageConversionFlags  flags 
)
virtual

Reimplemented in QGLPixmapData, QVGPixmapData, QRuntimePixmapData, QRasterPixmapData, and QDirectFBPixmapData.

Definition at line 144 of file qpixmapdata.cpp.

Referenced by QDirectFBPixmapData::fromData(), QRuntimePixmapData::fromData(), and QPixmap::loadFromData().

145 {
146  QByteArray a = QByteArray::fromRawData(reinterpret_cast<const char *>(buf), len);
147  QBuffer b(&a);
148  b.open(QIODevice::ReadOnly);
149  QImage image = QImageReader(&b, format).read();
150  fromImage(makeBitmapCompliantIfNeeded(this, image, flags), flags);
151  return !isNull();
152 }
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
long ASN1_INTEGER_get ASN1_INTEGER * a
The QBuffer class provides a QIODevice interface for a QByteArray.
Definition: qbuffer.h:57
virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags)=0
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...
Definition: qimage.h:87
The QImageReader class provides a format independent interface for reading images from files or other...
Definition: qimagereader.h:62
static QImage makeBitmapCompliantIfNeeded(QPixmapData *d, const QImage &image, Qt::ImageConversionFlags flags)
bool isNull() const
QImage read()
Reads an image from the device.

◆ fromFile()

bool QPixmapData::fromFile ( const QString filename,
const char *  format,
Qt::ImageConversionFlags  flags 
)
virtual

Reimplemented in QGLPixmapData, QVGPixmapData, QDirectFbBlitterPlatformPixmap, QRuntimePixmapData, and QDirectFBPixmapData.

Definition at line 134 of file qpixmapdata.cpp.

Referenced by QDirectFBPixmapData::fromFile(), QRuntimePixmapData::fromFile(), QDirectFbBlitterPlatformPixmap::fromFile(), QGLPixmapData::fromFile(), and QPixmap::load().

136 {
137  QImage image = QImageReader(fileName, format).read();
138  if (image.isNull())
139  return false;
140  fromImage(makeBitmapCompliantIfNeeded(this, image, flags), flags);
141  return !isNull();
142 }
bool isNull() const
Returns true if it is a null image, otherwise returns false.
Definition: qimage.cpp:1542
virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags)=0
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
The QImageReader class provides a format independent interface for reading images from files or other...
Definition: qimagereader.h:62
static QImage makeBitmapCompliantIfNeeded(QPixmapData *d, const QImage &image, Qt::ImageConversionFlags flags)
bool isNull() const
static QString fileName(const QString &fileUrl)
QImage read()
Reads an image from the device.

◆ fromImage()

virtual void QPixmapData::fromImage ( const QImage image,
Qt::ImageConversionFlags  flags 
)
pure virtual

◆ fromImageReader()

void QPixmapData::fromImageReader ( QImageReader imageReader,
Qt::ImageConversionFlags  flags 
)
virtual

Reimplemented in QGLPixmapData, QVGPixmapData, and QRasterPixmapData.

Definition at line 127 of file qpixmapdata.cpp.

Referenced by QPixmap::fromImageReader().

129 {
130  const QImage image = imageReader->read();
131  fromImage(image, flags);
132 }
virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags)=0
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
QImage read()
Reads an image from the device.

◆ hasAlphaChannel()

virtual bool QPixmapData::hasAlphaChannel ( ) const
pure virtual

◆ height()

int QPixmapData::height ( ) const
inline

◆ isNull()

bool QPixmapData::isNull ( ) const
inline

◆ mask()

QBitmap QPixmapData::mask ( ) const
virtual

Reimplemented in QX11PixmapData, QRuntimePixmapData, and QMacPixmapData.

Definition at line 208 of file qpixmapdata.cpp.

Referenced by QRuntimePixmapData::mask(), and QPixmap::mask().

209 {
210  if (!hasAlphaChannel())
211  return QBitmap();
212 
213  const QImage img = toImage();
214  const QImage image = (img.depth() < 32 ? img.convertToFormat(QImage::Format_ARGB32_Premultiplied) : img);
215  const int w = image.width();
216  const int h = image.height();
217 
219  if (mask.isNull()) // allocation failed
220  return QBitmap();
221 
222  mask.setColorCount(2);
223  mask.setColor(0, QColor(Qt::color0).rgba());
224  mask.setColor(1, QColor(Qt::color1).rgba());
225 
226  const int bpl = mask.bytesPerLine();
227 
228  for (int y = 0; y < h; ++y) {
229  const QRgb *src = reinterpret_cast<const QRgb*>(image.scanLine(y));
230  uchar *dest = mask.scanLine(y);
231  memset(dest, 0, bpl);
232  for (int x = 0; x < w; ++x) {
233  if (qAlpha(*src) > 0)
234  dest[x >> 3] |= qt_pixmap_bit_mask[x & 7];
235  ++src;
236  }
237  }
238 
239  return QBitmap::fromImage(mask);
240 }
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
unsigned int QRgb
Definition: qrgb.h:53
Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb)
Definition: qrgb.h:66
virtual QBitmap mask() const
unsigned char uchar
Definition: qglobal.h:994
The QBitmap class provides monochrome (1-bit depth) pixmaps.
Definition: qbitmap.h:55
virtual QImage toImage() const =0
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
int depth() const
Returns the depth of the image.
Definition: qimage.cpp:1620
virtual bool hasAlphaChannel() const =0
int width() const
Returns the width of the image.
Definition: qimage.cpp:1557
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
Definition: qimage.cpp:3966
const uchar qt_pixmap_bit_mask[]
Definition: qpixmapdata.cpp:52
int height() const
Returns the height of the image.
Definition: qimage.cpp:1572
static QBitmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Returns a copy of the given image converted to a bitmap using the specified image conversion flags...
Definition: qbitmap.cpp:281
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
Definition: qpixmap.cpp:615
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
Definition: qimage.cpp:1886

◆ metric()

virtual int QPixmapData::metric ( QPaintDevice::PaintDeviceMetric  metric) const
pure virtual

◆ numColors()

QT_DEPRECATED int QPixmapData::numColors ( ) const
inline

Definition at line 128 of file qpixmapdata_p.h.

Referenced by QMacPixmapData::fromImage().

virtual int metric(QPaintDevice::PaintDeviceMetric metric) const =0

◆ paintEngine()

virtual QPaintEngine* QPixmapData::paintEngine ( ) const
pure virtual

◆ pixelType()

PixelType QPixmapData::pixelType ( ) const
inline

◆ resize()

virtual void QPixmapData::resize ( int  width,
int  height 
)
pure virtual

◆ runtimeData()

virtual QPixmapData* QPixmapData::runtimeData ( ) const
inlinevirtual

Reimplemented in QRuntimePixmapData.

Definition at line 149 of file qpixmapdata_p.h.

Referenced by QRuntimePixmapData::copy(), and QPixmap::pixmapData().

149 { return 0; }

◆ scroll()

bool QPixmapData::scroll ( int  dx,
int  dy,
const QRect rect 
)
virtual

Reimplemented in QGLPixmapData, QDirectFBPixmapData, QX11PixmapData, QRasterPixmapData, QRuntimePixmapData, QX11GLPixmapData, QMacPixmapData, and QMeeGoLivePixmapData.

Definition at line 159 of file qpixmapdata.cpp.

Referenced by QRuntimePixmapData::scroll(), and QPixmap::scroll().

160 {
161  Q_UNUSED(dx);
162  Q_UNUSED(dy);
163  Q_UNUSED(rect);
164  return false;
165 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ serialNumber()

int QPixmapData::serialNumber ( ) const
inline

Definition at line 119 of file qpixmapdata_p.h.

Referenced by QDirectFBPixmapData::fill(), and QPixmap::serialNumber().

119 { return ser_no; }

◆ setAlphaChannel()

void QPixmapData::setAlphaChannel ( const QPixmap alphaChannel)
virtual

Reimplemented in QVGPixmapData, QRuntimePixmapData, QX11PixmapData, QRasterPixmapData, and QMacPixmapData.

Definition at line 248 of file qpixmapdata.cpp.

Referenced by QRuntimePixmapData::setAlphaChannel(), and QPixmap::setAlphaChannel().

249 {
250  QImage image = toImage();
251  image.setAlphaChannel(alphaChannel.toImage());
252  fromImage(image, Qt::AutoColor);
253 }
QImage toImage() const
Converts the pixmap to a QImage.
Definition: qpixmap.cpp:542
virtual QImage toImage() const =0
virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags)=0
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
void setAlphaChannel(const QImage &alphaChannel)
Sets the alpha channel of this image to the given alphaChannel.
Definition: qimage.cpp:6329

◆ setMask()

void QPixmapData::setMask ( const QBitmap mask)
virtual

Reimplemented in QX11PixmapData, QRuntimePixmapData, QRasterPixmapData, and QMacPixmapData.

Definition at line 167 of file qpixmapdata.cpp.

Referenced by QRuntimePixmapData::setMask(), and QPixmap::setMask().

168 {
169  if (mask.size().isEmpty()) {
170  if (depth() != 1)
172  Qt::AutoColor);
173  } else {
174  QImage image = toImage();
175  const int w = image.width();
176  const int h = image.height();
177 
178  switch (image.depth()) {
179  case 1: {
180  const QImage imageMask = mask.toImage().convertToFormat(image.format());
181  for (int y = 0; y < h; ++y) {
182  const uchar *mscan = imageMask.scanLine(y);
183  uchar *tscan = image.scanLine(y);
184  int bytesPerLine = image.bytesPerLine();
185  for (int i = 0; i < bytesPerLine; ++i)
186  tscan[i] &= mscan[i];
187  }
188  break;
189  }
190  default: {
191  const QImage imageMask = mask.toImage().convertToFormat(QImage::Format_MonoLSB);
193  for (int y = 0; y < h; ++y) {
194  const uchar *mscan = imageMask.scanLine(y);
195  QRgb *tscan = (QRgb *)image.scanLine(y);
196  for (int x = 0; x < w; ++x) {
197  if (!(mscan[x>>3] & qt_pixmap_bit_mask[x&7]))
198  tscan[x] = 0;
199  }
200  }
201  break;
202  }
203  }
204  fromImage(image, Qt::AutoColor);
205  }
206 }
QImage toImage() const
Converts the pixmap to a QImage.
Definition: qpixmap.cpp:542
unsigned int QRgb
Definition: qrgb.h:53
QSize size() const
Returns the size of the pixmap.
Definition: qpixmap.cpp:661
int bytesPerLine() const
Returns the number of bytes per image scanline.
Definition: qimage.cpp:1812
Format format() const
Returns the format of the image.
Definition: qimage.cpp:2305
unsigned char uchar
Definition: qglobal.h:994
virtual QImage toImage() const =0
virtual void fromImage(const QImage &image, Qt::ImageConversionFlags flags)=0
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
int depth() const
Returns the depth of the image.
Definition: qimage.cpp:1620
int width() const
Returns the width of the image.
Definition: qimage.cpp:1557
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
Definition: qimage.cpp:3966
int depth() const
const uchar qt_pixmap_bit_mask[]
Definition: qpixmapdata.cpp:52
int height() const
Returns the height of the image.
Definition: qimage.cpp:1572
bool isEmpty() const
Returns true if either of the width and height is less than or equal to 0; otherwise returns false...
Definition: qsize.h:120
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
Definition: qimage.cpp:1886

◆ setSerialNumber()

void QPixmapData::setSerialNumber ( int  serNo)
protected

◆ toImage() [1/2]

virtual QImage QPixmapData::toImage ( ) const
pure virtual

◆ toImage() [2/2]

QImage QPixmapData::toImage ( const QRect rect) const
virtual

Reimplemented in QX11PixmapData, and QRasterPixmapData.

Definition at line 265 of file qpixmapdata.cpp.

266 {
267  if (rect.contains(QRect(0, 0, w, h)))
268  return toImage();
269  else
270  return toImage().copy(rect);
271 }
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
Definition: qimage.cpp:1410
virtual QImage toImage() const =0
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...
Definition: qrect.cpp:1101
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58

◆ transformed()

QPixmap QPixmapData::transformed ( const QTransform matrix,
Qt::TransformationMode  mode 
) const
virtual

Reimplemented in QX11PixmapData, QRuntimePixmapData, and QDirectFBPixmapData.

Definition at line 242 of file qpixmapdata.cpp.

Referenced by QMacPixmapData::macCreatePixels(), QRuntimePixmapData::transformed(), and QPixmap::transformed().

244 {
245  return QPixmap::fromImage(toImage().transformed(matrix, mode));
246 }
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
Definition: qpixmap.cpp:2197
virtual QPixmap transformed(const QTransform &matrix, Qt::TransformationMode mode) const
virtual QImage toImage() const =0

◆ width()

int QPixmapData::width ( ) const
inline

Friends and Related Functions

◆ QExplicitlySharedDataPointer< QPixmapData >

Definition at line 165 of file qpixmapdata_p.h.

◆ QGLTextureCache

friend class QGLTextureCache
friend

Definition at line 164 of file qpixmapdata_p.h.

◆ QImagePixmapCleanupHooks

Definition at line 163 of file qpixmapdata_p.h.

◆ QPixmap

friend class QPixmap
friend

◆ QSymbianRasterPixmapData

friend class QSymbianRasterPixmapData
friend

Definition at line 162 of file qpixmapdata_p.h.

◆ QX11PixmapData

friend class QX11PixmapData
friend

Definition at line 161 of file qpixmapdata_p.h.

Referenced by QMeeGoLivePixmapData::QMeeGoLivePixmapData().

Properties

◆ d

int QPixmapData::d
protected

◆ detach_no

int QPixmapData::detach_no
private

Definition at line 168 of file qpixmapdata_p.h.

Referenced by QPixmap::detach().

◆ h

int QPixmapData::h
protected

Definition at line 155 of file qpixmapdata_p.h.

Referenced by QMacPixmapData::alphaChannel(), QX11PixmapData::alphaChannel(), QGLPixmapData::bind(), QX11PixmapData::bitmap_to_mask(), QX11PixmapData::bitmapFromImage(), QBlittablePixmapData::blittable(), QX11PixmapData::convertToARGB32(), QMacPixmapData::copy(), QDirectFBPixmapData::copy(), QX11PixmapData::copy(), QVGPixmapData::copy(), QGLPixmapData::copy(), QGLPixmapData::copyBackFromRenderFbo(), QX11PixmapData::createBitmapFromImage(), QRasterPixmapData::createPixmapForImage(), QGLPixmapData::createPixmapForImage(), QMeeGoPixmapData::destroyEGLSharedImage(), QGLPixmapData::ensureCreated(), QVGPixmapData::ensureReadback(), QBlittablePixmapData::fill(), QMacPixmapData::fill(), QGLPixmapData::fillImage(), QVGPixmapData::forceToImage(), QGLPixmapData::fromData(), QDirectFBPixmapData::fromDataBufferDescription(), QGLPixmapData::fromFile(), QBlittablePixmapData::fromImage(), QDirectFBPixmapData::fromImage(), QMacPixmapData::fromImage(), QX11PixmapData::fromImage(), QPixmap::fromMacCGImageRef(), QPixmap::grabWindow(), QDirectFBPixmapData::invalidate(), QVGPixmapData::isValid(), QGLPixmapData::isValid(), QMacPixmapData::macCreateCGImageRef(), QMacPixmapData::macCreatePixels(), QMacPixmapData::macGetAlphaChannel(), QMacPixmapData::macSetAlphaChannel(), QMacPixmapData::mask(), mask(), QX11PixmapData::mask_to_bitmap(), QBlittablePixmapData::metric(), QMacPixmapData::metric(), QRasterPixmapData::metric(), QX11PixmapData::metric(), QGLPixmapData::metric(), QVGPixmapData::metric(), QBlittablePixmapData::paintEngine(), QX11PixmapData::paintEngine(), qt_mac_cg_context(), QRuntimePixmapData::readBackInfo(), QBlittablePixmapData::resize(), QDirectFBPixmapData::resize(), QMacPixmapData::resize(), QRasterPixmapData::resize(), QX11PixmapData::resize(), QVGPixmapData::resize(), QGLPixmapData::resize(), QMacPixmapData::setMask(), QRasterPixmapData::setMask(), QX11PixmapData::setMask(), setMask(), QX11GLPixmapData::size(), QDirectFBPixmapData::toImage(), QMacPixmapData::toImage(), QRasterPixmapData::toImage(), QX11PixmapData::toImage(), QVGPixmapData::toImage(), toImage(), QGLPixmapData::toImage(), QVGPixmapData::toVGImage(), QDirectFBPixmapData::transformed(), QX11PixmapData::transformed(), QMeeGoPixmapData::updateFromSoftImage(), QGLPixmapData::useFramebufferObjects(), and QX11PixmapData::x11ConvertToDefaultDepth().

◆ id

int QPixmapData::id
private

Definition at line 171 of file qpixmapdata_p.h.

Referenced by QGLPixmapData::bind().

◆ is_cached

uint QPixmapData::is_cached
private

◆ is_null

bool QPixmapData::is_null
protected

◆ ref

QAtomicInt QPixmapData::ref
private

◆ ser_no

int QPixmapData::ser_no
private

Definition at line 172 of file qpixmapdata_p.h.

Referenced by setSerialNumber().

◆ type

PixelType QPixmapData::type
private

◆ w

int QPixmapData::w
protected

Definition at line 154 of file qpixmapdata_p.h.

Referenced by QMacPixmapData::alphaChannel(), QX11PixmapData::alphaChannel(), QGLPixmapData::bind(), QX11PixmapData::bitmap_to_mask(), QX11PixmapData::bitmapFromImage(), QBlittablePixmapData::blittable(), QX11PixmapData::convertToARGB32(), QMacPixmapData::copy(), QDirectFBPixmapData::copy(), QX11PixmapData::copy(), QVGPixmapData::copy(), QGLPixmapData::copy(), QGLPixmapData::copyBackFromRenderFbo(), QX11PixmapData::createBitmapFromImage(), QRasterPixmapData::createPixmapForImage(), QGLPixmapData::createPixmapForImage(), QGLPixmapData::ensureCreated(), QVGPixmapData::ensureReadback(), QBlittablePixmapData::fill(), QGLPixmapData::fillImage(), QVGPixmapData::forceToImage(), QGLPixmapData::fromData(), QDirectFBPixmapData::fromDataBufferDescription(), QGLPixmapData::fromFile(), QBlittablePixmapData::fromImage(), QDirectFBPixmapData::fromImage(), QMacPixmapData::fromImage(), QX11PixmapData::fromImage(), QPixmap::fromMacCGImageRef(), QPixmap::grabWindow(), QDirectFBPixmapData::invalidate(), QVGPixmapData::isValid(), QGLPixmapData::isValid(), QMacPixmapData::macCreateCGImageRef(), QMacPixmapData::macCreatePixels(), QMacPixmapData::macGetAlphaChannel(), QMacPixmapData::macSetAlphaChannel(), QMacPixmapData::mask(), mask(), QX11PixmapData::mask_to_bitmap(), QBlittablePixmapData::metric(), QMacPixmapData::metric(), QRasterPixmapData::metric(), QX11PixmapData::metric(), QGLPixmapData::metric(), QVGPixmapData::metric(), QBlittablePixmapData::paintEngine(), QX11PixmapData::paintEngine(), qt_mac_cg_context(), QRuntimePixmapData::readBackInfo(), QBlittablePixmapData::resize(), QDirectFBPixmapData::resize(), QMacPixmapData::resize(), QRasterPixmapData::resize(), QX11PixmapData::resize(), QVGPixmapData::resize(), QGLPixmapData::resize(), QMacPixmapData::setMask(), QRasterPixmapData::setMask(), QX11PixmapData::setMask(), setMask(), QX11GLPixmapData::size(), QDirectFBPixmapData::toImage(), QMacPixmapData::toImage(), QRasterPixmapData::toImage(), QX11PixmapData::toImage(), QVGPixmapData::toImage(), toImage(), QGLPixmapData::toImage(), QVGPixmapData::toVGImage(), QDirectFBPixmapData::transformed(), QX11PixmapData::transformed(), QMeeGoPixmapData::updateFromSoftImage(), QGLPixmapData::useFramebufferObjects(), and QX11PixmapData::x11ConvertToDefaultDepth().


The documentation for this class was generated from the following files: