51 #include <private/qdrawhelper_p.h> 52 #include <private/qpixmap_mac_p.h> 53 #include <private/qpixmap_raster_p.h> 54 #include <private/qpaintengine_mac_p.h> 55 #include <private/qt_mac_p.h> 56 #include <private/qt_cocoa_helpers_mac_p.h> 57 #include <private/qapplication_p.h> 95 free(const_cast<void *>(memoryToFree));
98 free(const_cast<void *>(memoryToFree));
100 if (pmdata->
pixels == memoryToFree)
109 free(const_cast<void *>(memoryToFree));
120 int bitsPerColor = 8;
121 int bitsPerPixel = 32;
122 if (image.
depth() == 1) {
130 uint cgflags = kCGImageAlphaPremultipliedFirst;
131 #ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version 132 cgflags |= kCGBitmapByteOrder32Host;
141 kCGRenderingIntentDefault);
151 static const int qt_rbits = (565/100);
152 static const int qt_gbits = (565/10%10);
153 static const int qt_bbits = (565%10);
168 return qRgb(tr,tg,tb);
174 :
QPixmapData(type, MacClass), has_alpha(0), has_mask(0),
175 uninit(true), pixels(0), pixelsSize(0), pixelsToFree(0),
176 bytesPerRow(0), cg_data(0), cg_dataBeingReleased(0), cg_mask(0),
186 #define BEST_BYTE_ALIGNMENT 16 187 #define COMPTUE_BEST_BYTES_PER_ROW(bpr) \ 188 (((bpr) + (BEST_BYTE_ALIGNMENT - 1)) & ~(BEST_BYTE_ALIGNMENT - 1)) 198 bool make_null =
w <= 0 ||
h <= 0;
199 if (make_null ||
d == 0) {
205 qWarning(
"Qt: QPixmap: Invalid pixmap parameters");
220 #undef COMPUTE_BEST_BYTES_PER_ROW 223 Qt::ImageConversionFlags flags)
246 bool force_mono = (dd == 1 ||
255 if(
d > 8 && dd <= 8) {
278 if (image.
depth()==1) {
283 if (
d == 16 ||
d == 24) {
303 const uchar *sptr =
const_cast<const QImage &
>(image).bits(), *srow;
305 for (
int y = 0; y <
h; ++y) {
306 drow = dptr + (y * (dbpr / 4));
307 srow = sptr + (y * sbpr);
311 for (
int x = 0; x <
w; ++x) {
312 char one_bit = *(srow + (x / 8));
314 one_bit = one_bit >> (7 - (x % 8));
316 one_bit = one_bit >> (x % 8);
317 if ((one_bit & 0x01))
318 *(drow+x) = 0xFF000000;
320 *(drow+x) = 0xFFFFFFFF;
327 for (
int x = 0; x <
w; ++x) {
328 int index = *(srow + x);
334 for (
int x = 0; x <
w; ++x)
335 *(drow+x) = *(((
quint32*)srow) + x) | 0xFF000000;
339 for (
int x = 0; x <
w; ++x) {
341 *(drow+x) = 0xFF000000 | (*(((
quint32*)srow) + x) & 0x00FFFFFF);
343 *(drow+x) = *(((
quint32*)srow) + x);
349 qWarning(
"Qt: internal: Oops: Forgot a format [%d] %s:%d", sfmt,
355 bool alphamap = image.
depth() == 32;
358 for (
int i = 0, count = image.
colorCount(); i < count; ++i) {
359 const int alpha =
qAlpha(rgb[i]);
375 if(qi->
color(loopc)==mycol)
401 for (
int y = 0; y <
h; ++y) {
403 srow = sptr + (y * (sbpr/4));
404 for (
int x = 0; x <
w; ++x) {
406 scanLine[x >> 3] |= (1 << (x & 7));
410 for (
int y = 0; y <
h; ++y) {
411 srow = sptr + (y * (sbpr / 4));
429 memset(dptr, 0, nbytes);
431 for (
uint i = 0; i < nbytes /
sizeof(
quint32); ++i)
438 if (fillColor.
alpha() != 255)
514 qWarning(
"QPixmap::metric: Invalid metric command");
546 for (
int y=0; y <
h; ++y) {
547 drow = dptr + (y * (dbpr/4));
548 srow = sptr + (y * (sbpr/4));
550 for (
int x=0; x <
w; ++x) {
552 *(drow+x) = 0xFFFFFFFF;
555 for (
int x=0; x <
w; ++x)
556 *(drow+x) = (*(drow+x) &
RGB_MASK) | (*(srow+x) << 24);
558 for (
int x=0; x <
w; ++x) {
562 *(drow+x) = (*(drow+x) &
RGB_MASK) | 0xFF000000;
563 *(drow+x) =
PREMUL(*(drow+x));
566 for (
int x=0; x <
w; ++x) {
570 *(drow+x) = (*(drow+x) &
RGB_MASK) | (destAlpha << 24);
576 *(drow+x) =
PREMUL(*(drow+x));
589 for(
int y=0; y <
h; ++y) {
590 drow = dptr + (y * (dbpr/4));
591 srow = sptr + (y * (sbpr/4));
593 for (
int x = 0; x <
w; ++x) {
594 if (*(srow + x) &
qRgba(0, 0, 0, 255))
595 *(drow + x) = 0x00000000;
597 *(drow + x) = 0xFFFFFFFF;
600 for (
int x = 0; x <
w; ++x) {
601 const int alpha =
qAlpha(*(srow + x));
602 *(drow + x) =
qRgb(alpha, alpha, alpha);
623 uint cgflags = kCGImageAlphaPremultipliedFirst;
624 #ifdef kCGBitmapByteOrder32Host //only needed because CGImage.h added symbols in the minor version 625 cgflags |= kCGBitmapByteOrder32Host;
628 cgflags, provider, 0, 0, kCGRenderingIntentDefault);
660 base_pixels =
static_cast<quint32 *
>(malloc(numBytes));
662 qWarning(
"Failed to allocate memory for pixmap data, setting to NULL");
672 if (
pixels && base_pixels)
692 transform.
m21(), transform.
m22(), 0., 0.);
693 if (transform.
m12() == 0.0F && transform.
m21() == 0.0F &&
694 transform.
m11() >= 0.0F && transform.
m22() >= 0.0F)
696 h = int(
qAbs(mat.
m22()) * hs + 0.9999);
697 w = int(
qAbs(mat.
m11()) * ws + 0.9999);
704 w = int(r.
width() + 0.9999);
705 h = int(r.
height() + 0.9999);
719 #warning QMacPixmapData::transformed not properly implemented 720 qWarning(
"QMacPixmapData::transformed not properly implemented");
735 const int xbpl = (w * bpp) / 8;
739 qWarning(
"QMacPixmapData::transform(): failure");
751 #include <OpenGL/OpenGL.h> 752 #include <OpenGL/gl.h> 782 static bool triedResolve =
false;
807 int bottom = height - 1;
809 void *
buffer = malloc(rowBytes);
812 while ( top < bottom )
814 void *topP = (
void *)((top * rowBytes) + (
intptr_t)base);
815 void *bottomP = (
void *)((bottom * rowBytes) + (
intptr_t)base);
817 bcopy( topP, buffer, rowBytes );
818 bcopy( bottomP, topP, rowBytes );
819 bcopy( buffer, bottomP, rowBytes );
830 if (display == kCGNullDirectDisplay)
833 CGLPixelFormatAttribute attribs[] = {
836 (CGLPixelFormatAttribute)0,
837 (CGLPixelFormatAttribute)0
840 attribs[2] = (CGLPixelFormatAttribute)CGDisplayIDToOpenGLDisplayMask(display);
843 CGLPixelFormatObj pixelFormatObj;
844 long numPixelFormats;
851 CGLContextObj glContextObj;
871 #ifdef __BIG_ENDIAN__
874 GL_BGRA, GL_UNSIGNED_INT_8_8_8_8, buffer
883 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) 885 static QPixmap qt_mac_grabScreenRect_10_6(
const QRect &rect)
887 const int maxDisplays = 128;
888 CGDirectDisplayID displays[maxDisplays];
889 CGDisplayCount displayCount;
891 const CGDisplayErr err = CGGetDisplaysWithRect(cgRect, maxDisplays, displays, &displayCount);
896 if (err && displayCount == 0)
899 for (
uint i = 0; i < displayCount; ++i) {
900 const CGRect bounds = CGDisplayBounds(displays[i]);
904 CGRectMake(displayRect.
x(), displayRect.
y(), displayRect.
width(), displayRect.
height()));
907 painter.
drawPixmap(-bounds.origin.x, -bounds.origin.y, pix);
918 const int maxDisplays = 128;
919 CGDirectDisplayID displays[maxDisplays];
920 CGDisplayCount displayCount;
922 const CGDisplayErr err = CGGetDisplaysWithRect(cgRect, maxDisplays, displays, &displayCount);
924 if (err && displayCount == 0)
927 long bytewidth = rect.
width() * 4;
928 bytewidth = (bytewidth + 3) & ~3;
931 for (
uint i = 0; i < displayCount; ++i) {
932 const CGRect bounds = CGDisplayBounds(displays[i]);
942 rect.
height(), 8, bytewidth,
944 kCGImageAlphaNoneSkipFirst);
949 #ifndef QT_MAC_USE_COCOA // no QuickDraw in 64-bit mode 954 const BitMap *windowPort = 0;
957 if(!(gdh=GetMainDevice()))
958 qDebug(
"Qt: internal: Unexpected condition reached: %s:%d", __FILE__, __LINE__);
959 windowPort = (BitMap*)(*(*gdh)->gdPMap);
963 const BitMap *pixmapPort = GetPortBitMapForCopyBits(static_cast<GWorldPtr>(pm.macQDHandle()));
964 Rect macSrcRect, macDstRect;
965 SetRect(&macSrcRect, x, y, x + w, y + h);
966 SetRect(&macDstRect, 0, 0, w, h);
967 CopyBits(windowPort, pixmapPort, &macSrcRect, &macDstRect, srcCopy, 0);
979 w = widget->
width() - x;
985 QRect rect(globalCoord.
x() + x, globalCoord.
y() + y,
w,
h);
987 #ifdef QT_MAC_USE_COCOA 988 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) 990 return qt_mac_grabScreenRect_10_6(rect);
995 #if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4) 1003 #endif // ifdef Q_WS_MAC64 1091 const uint nbytes = sw * sh;
1096 for(
int y = sy, offset=0; y < sh; ++y) {
1097 srow = sptr + (y * (sbpr / 4));
1098 for(
int x = sx; x < sw; ++x)
1099 *(dptr+(offset++)) = (*(srow+x) & mask) ? 255 : 0;
1102 px->
cg_mask = CGImageMaskCreate(sw, sh, 8, 8, nbytes / sh, provider, 0, 0);
1108 #ifndef QT_MAC_USE_COCOA 1115 IconFamilyHandle iconFamily =
reinterpret_cast<IconFamilyHandle
>(NewHandle(0));
1123 { kThumbnail32BitData, 128, 128, 32,
false },
1124 { kThumbnail8BitMask, 128, 128, 8,
true },
1125 { 0, 0, 0, 0,
false }
1127 for(
int i = 0; images[i].mac_type; i++) {
1136 const int dbpr = images[i].width * (images[i].depth/8);
1137 Handle hdl = NewHandle(dbpr*images[i].height);
1139 memset((*hdl),
'\0', dbpr*images[i].height);
1140 }
else if(images[i].
mask) {
1141 if(images[i].mac_type == kThumbnail8BitMask) {
1142 for(
int y = 0, hindex = 0; y < images[i].height; ++y) {
1143 srow = sptr + (y * (sbpr/4));
1144 for(
int x = 0; x < images[i].width; ++x)
1145 *((*hdl)+(hindex++)) =
qAlpha(*(srow+x));
1149 char *dest = (*hdl);
1150 #if defined(__i386__) 1151 if(images[i].
depth == 32) {
1152 for(
int y = 0; y < images[i].height; ++y) {
1154 for(
int x = 0; x < images[i].width; ++x, dest += 4)
1155 *((
uint*)dest) = CFSwapInt32(*(source + x));
1160 for(
int y = 0; y < images[i].height; ++y)
1161 memcpy(dest+(y*dbpr), ((
const uchar*)sptr+(sbpr*y)), dbpr);
1166 OSStatus set = SetIconFamilyData(iconFamily, images[i].mac_type, hdl);
1168 qWarning(
"%s: %d -- Unable to create icon data[%d]!! %ld",
1169 __FILE__, __LINE__, i,
long(
set));
1176 static int counter = 0;
1177 const OSType kQtCreator =
'CUTE';
1178 RegisterIconRefFromIconFamily(kQtCreator, (OSType)counter, iconFamily, &ret);
1179 AcquireIconRef(ret);
1180 UnregisterIconRef(kQtCreator, (OSType)counter);
1181 DisposeHandle(reinterpret_cast<Handle>(iconFamily));
1213 const int x = rect.
x();
1214 const int y = rect.
y();
1215 char *dest =
reinterpret_cast<char*
>(
pixels);
1219 const char *src =
reinterpret_cast<const char*
>(macData->
pixels + x) + y * macData->
bytesPerRow;
1220 for (
int i = 0; i <
h; ++i) {
1221 memcpy(dest, src,
w * 4);
1273 const size_t w = CGImageGetWidth(image),
1274 h = CGImageGetHeight(image);
1277 CGRect rect = CGRectMake(0, 0, w,
h);
1280 CGContextRelease(ctx);
void fill(const QColor &color)
void setTransform(const QTransform &transform, bool combine=false)
Sets the world transformation matrix.
The QPainter class performs low-level painting on widgets and other paint devices.
The QColor class provides colors based on RGB, HSV or CMYK values.
QImage toImage() const
Converts the pixmap to a QImage.
static CGColorSpaceRef macDisplayColorSpace(const QWidget *widget=0)
virtual QPixmap transformed(const QTransform &matrix, Qt::TransformationMode mode) const
static CGColorSpaceRef macGenericColorSpace()
Format
The following image formats are available in Qt.
qreal y() const
Returns the y-coordinate of the rectangle's top edge.
QPixmap alphaChannel() const
static int defaultDepth()
Returns the default pixmap depth used by the application.
CGLError(* PtrCGLDestroyPixelFormat)(CGLPixelFormatObj)
friend IconRef qt_mac_create_iconref(const QPixmap &)
void setColor(int i, QRgb c)
Sets the color at the given index in the color table, to the given to colorValue. ...
static mach_timebase_info_data_t info
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
static QMatrix trueMatrix(const QMatrix &m, int w, int h)
This convenience function loads the matrix m into a QTransform and calls the overloaded function with...
#define QT_END_NAMESPACE
This macro expands to.
Q_CORE_EXPORT QTextStream & ws(QTextStream &s)
QPointer< QWidget > widget
Q_GUI_EXPORT int qt_mac_pixmap_get_bytes_per_line(const QPixmap *pix)
static PtrglReadPixels ptrglReadPixels
static PtrglFinish ptrglFinish
static PtrCGLDestroyContext ptrCGLDestroyContext
void setAlphaChannel(const QPixmap &alphaChannel)
friend void qt_mac_cgimage_data_free(void *, const void *, size_t)
static void qt_mac_grabDisplayRect(CGDirectDisplayID display, const QRect &displayRect, void *buffer)
Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb)
QExplicitlySharedDataPointer< QPixmapData > data
static PtrCGLSetFullScreen ptrCGLSetFullScreen
bool isNull() const
Returns true if it is a null image, otherwise returns false.
bool hasAlphaChannel() const
void fill(uint pixel)
Fills the entire image with the given pixelValue.
bool remove(const T &value)
static const int qt_bbits
static PtrCGLClearDrawable ptrCGLClearDrawable
void macSetHasAlpha(bool b)
CGFloat qt_mac_get_scalefactor()
#define GL_UNSIGNED_INT_8_8_8_8_REV
static PtrglPixelStorei ptrglPixelStorei
void macReleaseCGImageRef()
#define GL_PACK_ALIGNMENT
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
int width() const
Returns the width of the rectangle.
QRegion qt_mac_convert_mac_region(RgnHandle rgn)
struct CGImage * CGImageRef
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int bytesPerLine() const
Returns the number of bytes per image scanline.
long ASN1_INTEGER_get ASN1_INTEGER * a
void * resolve(const char *symbol)
Returns the address of the exported symbol symbol.
static const int qt_blue_mask
int height() const
Returns the height of the rectangle.
Q_DECL_CONSTEXPR T qAbs(const T &t)
QRectF boundingRect() const
Returns the bounding rectangle of the polygon, or QRectF(0,0,0,0) if the polygon is empty...
float qt_mac_defaultDpi_y()
static const int qt_red_mask
Format format() const
Returns the format of the image.
friend class QCoreGraphicsPaintEngine
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
static QPixmap fromMacCGImageRef(CGImageRef image)
Returns a QPixmap that is equivalent to the given image.
Q_GUI_EXPORT_INLINE int qRed(QRgb rgb)
OSWindowRef qt_mac_window_for(const QWidget *)
RgnHandle qt_mac_get_rgn()
void macSetAlphaChannel(const QMacPixmapData *, bool asMask)
Q_CORE_EXPORT void qDebug(const char *,...)
PixelType pixelType() const
The QBitmap class provides monochrome (1-bit depth) pixmaps.
T * data() const
Returns a pointer to the shared data object.
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint...
void setColorCount(int)
Resizes the color table to contain colorCount entries.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Q_GUI_EXPORT_INLINE QRgb qRgba(int r, int g, int b, int a)
The QRectF class defines a rectangle in the plane using floating point precision. ...
Q_GUI_EXPORT EGLDisplay display()
QMacPixmapData(PixelType type)
Q_STATIC_INLINE_FUNCTION uint PREMUL(uint x)
QPaintEngine * paintEngine() const
CGContextRef qt_mac_cg_context(const QPaintDevice *pdev)
Returns the CoreGraphics CGContextRef of the paint device.
qreal height() const
Returns the height of the rectangle.
QSize size() const
Returns the size of the rectangle.
CGLError(* PtrCGLSetCurrentContext)(CGLContextObj)
The QPolygonF class provides a vector of points using floating point precision.
const uchar * qt_get_bitflip_array()
static const int qt_gbits
static PtrCGLSetCurrentContext ptrCGLSetCurrentContext
Q_CORE_EXPORT void qWarning(const char *,...)
const_iterator insert(const T &value)
The QImage class provides a hardware-independent image representation that allows direct access to th...
void resize(int width, int height)
static const char * data(const QByteArray &arr)
QT_DEPRECATED int numColors() const
Returns the size of the color table for the image.
#define QT_XFORM_TYPE_MSBFIRST
qreal width() const
Returns the width of the rectangle.
The QRegion class specifies a clip region for a painter.
int depth() const
Returns the depth of the image.
static QPixmap qt_mac_grabScreenRect_10_3(int x, int y, int w, int h, QWidget *widget)
friend CGImageRef qt_mac_create_imagemask(const QPixmap &, const QRectF &)
static const int qt_green_shift
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb)
struct OpaqueRgnHandle * RgnHandle
static QString graphics_system_name
static const int qt_green_mask
void macGetAlphaChannel(QMacPixmapData *, bool asMask) const
void fill(const QColor &fillColor=Qt::white)
Fills the pixmap with the given color.
QRgb qRgb(int r, int g, int b)
Returns the ARGB quadruplet (255, {r}, {g}, {b}).
static const int qt_rbits
static int qt_pixmap_serial
Q_GUI_EXPORT_INLINE int qGray(int r, int g, int b)
CGLError(* PtrCGLSetFullScreen)(CGLContextObj)
uchar * bits()
Returns a pointer to the first pixel data.
void macCreateCGImageRef()
static QRgb qt_conv16ToRgb(ushort c)
#define Q_ASSERT_X(cond, where, what)
int width() const
Returns the width of the image.
void(* PtrglReadBuffer)(GLenum)
QT_DEPRECATED int numColors() const
struct CGColorSpace * CGColorSpaceRef
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
CGLError(* PtrCGLDestroyContext)(CGLContextObj)
static void qt_mac_flipPixmap(void *data, int rowBytes, int height)
ushort alpha
Returns the alpha color component of this color.
static bool resolveOpenGLSymbols()
int y() const
Returns the y-coordinate of the rectangle's top edge.
int colorCount() const
Returns the size of the color table for the image.
static const int qt_neg_blue_shift
qreal x() const
Returns the x-coordinate of the rectangle's left edge.
static QPixmap qt_mac_grabScreenRect(const QRect &rect)
static PtrCGLCreateContext ptrCGLCreateContext
float qt_mac_defaultDpi_x()
void copy(const QPixmapData *data, const QRect &rect)
int x() const
Returns the x-coordinate of the rectangle's left edge.
void setMask(const QBitmap &mask)
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)
#define COMPTUE_BEST_BYTES_PER_ROW(bpr)
The QPoint class defines a point in the plane using integer precision.
void qt_mac_cgimage_data_free(void *info, const void *memoryToFree, size_t)
OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage)
static const int qt_red_shift
bool qt_xForm_helper(const QTransform &trueMat, int xoffset, int type, int depth, uchar *dptr, int dbpl, int p_inc, int dHeight, const uchar *sptr, int sbpl, int sWidth, int sHeight)
The QRect class defines a rectangle in the plane using integer precision.
CGImageRef qt_mac_image_to_cgimage(const QImage &image)
int height() const
Returns the height of the image.
Q_GUI_EXPORT quint32 * qt_mac_pixmap_get_base(const QPixmap *pix)
int y() const
Returns the y coordinate of this point.
The QPixmap class is an off-screen image representation that can be used as a paint device...
Q_GUI_EXPORT_INLINE int qGreen(QRgb rgb)
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
virtual QImage * buffer()
Q_STATIC_INLINE_FUNCTION int qt_div_255(int x)
bool scroll(int dx, int dy, const QRect &rect)
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device...
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...
static const MacVersion MacintoshVersion
the version of the Macintosh operating system on which the application is run (Mac only)...
static QPixmap grabWindow(WId, int x=0, int y=0, int w=-1, int h=-1)
Creates and returns a pixmap constructed by grabbing the contents of the given window restricted by Q...
static PtrCGLChoosePixelFormat ptrCGLChoosePixelFormat
int x() const
Returns the x coordinate of this point.
struct CGContext * CGContextRef
static PtrCGLDestroyPixelFormat ptrCGLDestroyPixelFormat
QRgb rgba() const
Returns the RGB value of the color, including its alpha.
void moveTop(int pos)
Moves the rectangle vertically, leaving the rectangle's top edge at the given y coordinate.
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
QImage scaled(int w, int h, Qt::AspectRatioMode aspectMode=Qt::IgnoreAspectRatio, Qt::TransformationMode mode=Qt::FastTransformation) const
void setSerialNumber(int serNo)
CGImageRef toMacCGImageRef() const
Creates a CGImageRef equivalent to the QPixmap.
QRectF normalized() const
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height...
static PtrglReadBuffer ptrglReadBuffer
static QSet< QMacPixmapData * > validDataPointers
CGLError(* PtrCGLCreateContext)(CGLPixelFormatObj, CGLContextObj, CGLContextObj *)
friend CGContextRef qt_mac_cg_context(const QPaintDevice *)
Returns the CoreGraphics CGContextRef of the paint device.
QPixmapData * createCompatiblePixmapData() const
int metric(QPaintDevice::PaintDeviceMetric metric) const
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
CGLError(* PtrCGLClearDrawable)(CGLContextObj)
QVector< QRgb > colorTable() const
Returns a list of the colors contained in the image's color table, or an empty list if the image does...
CGImageRef cg_dataBeingReleased
QRgb color(int i) const
Returns the color in the color table at index i.
void(* PtrglPixelStorei)(GLenum, GLint)
Q_DECL_CONSTEXPR int qRound(qreal d)
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
The QLibrary class loads shared libraries at runtime.
void(* PtrglReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)
void fromImage(const QImage &image, Qt::ImageConversionFlags flags)
CGLError(* PtrCGLChoosePixelFormat)(const CGLPixelFormatAttribute *, CGLPixelFormatObj *, long *)
struct OpaqueIconRef * IconRef
void qt_mac_dispose_rgn(RgnHandle r)
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
int get_index(QImage *qi, QRgb mycol)