diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-09-13 14:08:27 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2016-09-18 11:38:47 +0000 |
commit | 49b3510bb929f37f1c549f25e999c42521f9a5fa (patch) | |
tree | 6d3b3054a6858e089c0742667f2a27f54f976bd6 /src/gui/painting/qcoregraphics_p.h | |
parent | e419403ebf98c6c0524d4db664caca36052c1fc9 (diff) |
macOS: Move image conversion functions to QtGui
Change-Id: I911f2648e506f27519e98be1bffe2c5ab0f388f1
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/gui/painting/qcoregraphics_p.h')
-rw-r--r-- | src/gui/painting/qcoregraphics_p.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/painting/qcoregraphics_p.h b/src/gui/painting/qcoregraphics_p.h index b6ea5474ec..b2b29ecf76 100644 --- a/src/gui/painting/qcoregraphics_p.h +++ b/src/gui/painting/qcoregraphics_p.h @@ -49,9 +49,23 @@ #include <QtGui/qregion.h> #include <CoreGraphics/CoreGraphics.h> +#ifdef Q_OS_MACOS +#include <AppKit/AppKit.h> +#endif QT_BEGIN_NAMESPACE +#ifdef Q_OS_MACOS +Q_GUI_EXPORT NSImage *qt_mac_create_nsimage(const QPixmap &pm); +Q_GUI_EXPORT NSImage *qt_mac_create_nsimage(const QIcon &icon); +Q_GUI_EXPORT QPixmap qt_mac_toQPixmap(const NSImage *image, const QSizeF &size); +#endif +Q_GUI_EXPORT CGImageRef qt_mac_toCGImage(const QImage &qImage); +Q_GUI_EXPORT CGImageRef qt_mac_toCGImageMask(const QImage &qImage); +Q_GUI_EXPORT QImage qt_mac_toQImage(CGImageRef image); + +Q_GUI_EXPORT OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage); + Q_GUI_EXPORT CGColorSpaceRef qt_mac_genericColorSpace(); Q_GUI_EXPORT CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintDevice); |