49 #include <private/qt_mac_p.h> 50 #include <private/qprintengine_mac_p.h> 51 #include <private/qpixmap_mac_p.h> 52 #include <private/qpixmap_raster_p.h> 94 return static_cast<GrafPtr
>(
static_cast<const QPixmap *
>(device)->macQDHandle());
96 return static_cast<GrafPtr
>(
static_cast<const QWidget *
>(device)->macQDHandle());
123 uint flags = kCGImageAlphaPremultipliedFirst;
124 #ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version 125 flags |= kCGBitmapByteOrder32Host;
133 ret = CGBitmapContextCreate(pmData->
pixels, pmData->
w, pmData->
h,
137 qWarning(
"QPaintDevice: Unable to create context for pixmap (%d/%d/%d)",
141 ret = CGBitmapContextCreate(image->
bits(), image->
width(), image->
height(),
145 CGContextTranslateCTM(ret, 0, pm->
height());
146 CGContextScaleCTM(ret, 1, -1);
150 CGContextRetain(ret);
#define QT_END_NAMESPACE
This macro expands to.
QExplicitlySharedDataPointer< QPixmapData > data
CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *pdev)
int bytesPerLine() const
Returns the number of bytes per image scanline.
float qt_mac_defaultDpi_y()
virtual int devType() const
T * data() const
Returns a pointer to the shared data object.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QPrinter class is a paint device that paints on a printer.
virtual Qt::HANDLE handle() const
Q_CORE_EXPORT void qWarning(const char *,...)
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
uchar * bits()
Returns a pointer to the first pixel data.
int width() const
Returns the width of the image.
struct CGColorSpace * CGColorSpaceRef
float qt_mac_defaultDpi_x()
Q_GUI_EXPORT CGContextRef qt_mac_cg_context(const QPaintDevice *pdev)
Returns the CoreGraphics CGContextRef of the paint device.
int height() const
Returns the height of the image.
The QPixmap class is an off-screen image representation that can be used as a paint device...
virtual QImage * buffer()
int height() const
Returns the height of the pixmap.
struct CGContext * CGContextRef
Q_GUI_EXPORT GrafPtr qt_mac_qd_context(const QPaintDevice *device)
Returns the QuickDraw CGrafPtr of the paint device.