44 #include <QtGui/private/qpaintengine_raster_p.h> 45 #include <QtGui/private/qpixmapdata_p.h> 247 int srcbpp = srcImgRef.depth() / 8;
248 const uchar *sptr = srcImgRef.constBits() + r.
y() * srcbpl;
251 if (!dstImgRef.
isNull()) {
254 for (
int y = 0; y < r.
height(); ++y) {
286 d->img->beginDataAccess();
294 d->img->endDataAccess();
QImage toImage() const
Converts the pixmap to a QImage.
Format
The following image formats are available in Qt.
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
bool isNull() const
Returns true if the rectangle is a null rectangle, otherwise returns false.
#define QT_END_NAMESPACE
This macro expands to.
QImage toImage() const
This will always perform a copy of the pixel data.
QVolatileImagePaintEnginePrivate()
void beginDataAccess() const
void beginDataAccess() const
T * data()
Returns a pointer to the shared data object.
bool isNull() const
Returns true if it is a null image, otherwise returns false.
void fill(uint pixel)
Fills the entire image with the given pixelValue.
The QPointF class defines a point in the plane using floating point precision.
void * duplicateNativeImage() const
bool begin(QPaintDevice *device)
Reimplemented Function
bool ensureFormat(QImage::Format format)
int byteCount() const
Returns the number of bytes occupied by the image data.
int width() const
Returns the width of the rectangle.
const QImage & constImageRef() const
Non-detaching version, for read-only access only.
void endDataAccess(bool readOnly=false) const
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false...
bool end()
Reimplement this function to finish painting on the current paint device.
int bytesPerLine() const
Returns the number of bytes per image scanline.
int height() const
Returns the height of the rectangle.
bool ensureFormat(QImage::Format format)
void drawPixmap(const QPointF &p, const QPixmap &pm)
void endDataAccess(bool readOnly=false) const
bool end()
Reimplemented Function
Format format() const
Returns the format of the image.
void fill(uint pixelValue)
void drawImage(const QPointF &p, const QImage &img)
bool begin(QPaintDevice *device)
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool isActive() const
Returns true if the paint engine is actively drawing; otherwise returns false.
The QRectF class defines a rectangle in the plane using floating point precision. ...
QVolatileImagePaintEngine(QPaintDevice *device, QVolatileImage *img)
The QImage class provides a hardware-independent image representation that allows direct access to th...
QSharedDataPointer< QVolatileImageData > d
int depth() const
Returns the depth of the image.
uchar * bits()
Access to pixel data via bits() or constBits() should be guarded by begin/endDataAccess().
const uchar * constBits() const
Returns a pointer to the first pixel data.
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
QImage::Format format() const
void drawPixmap(const QPointF &p, const QPixmap &pm)
void * qMemCopy(void *dest, const void *src, size_t n)
uchar * bits()
Returns a pointer to the first pixel data.
int width() const
Returns the width of the image.
int y() const
Returns the y-coordinate of the rectangle's top edge.
int x() const
Returns the x-coordinate of the rectangle's left edge.
bool hasAlphaChannel() const
QVolatileImage & operator=(const QVolatileImage &rhs)
The QRect class defines a rectangle in the plane using integer precision.
int height() const
Returns the height of the image.
bool paintingActive() const
The QPixmap class is an off-screen image representation that can be used as a paint device...
#define Q_DECLARE_PRIVATE(Class)
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded ...
void setAlphaChannel(const QImage &alphaChannel)
Sets the alpha channel of this image to the given alphaChannel.
static const KeyPair *const end
QImage & imageRef()
Returns a reference to the image that is potentially using some native buffer internally.
void copyFrom(QVolatileImage *source, const QRect &rect)
const uchar * constBits() const
QPaintEngine * paintEngine()
To be called from the PixmapData's paintEngine().
QPixmapData * pixmapData() const
void * duplicateNativeImage() const
void setAlphaChannel(const QPixmap &alphaChannel)